diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2009-07-20 15:50:26 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2009-07-20 15:50:26 +0000 |
commit | c46669a230ccea798396a60f1fd78fc1156f2464 (patch) | |
tree | 8936aac1a85b8a56f7877f7002d2a1819a6ad3fb | |
parent | a7548d3bc7b4cb91553a59a06490290869270437 (diff) | |
download | rockbox-c46669a230ccea798396a60f1fd78fc1156f2464.tar.gz rockbox-c46669a230ccea798396a60f1fd78fc1156f2464.zip |
fix FS#10453 - the cuesheet changes broke playback on swcodec, rework it so it uses the audio buffer instead of a temp buffer from the start (which also removes one pretty big memcpy)
also remove the audio_filename from the cuesheet struct as its useless
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21982 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/cuesheet.h | 1 | ||||
-rw-r--r-- | apps/mpeg.c | 1 | ||||
-rw-r--r-- | apps/playback.c | 21 |
3 files changed, 14 insertions, 9 deletions
diff --git a/apps/cuesheet.h b/apps/cuesheet.h index 22ad92fdd3..8ee0f6b3a7 100644 --- a/apps/cuesheet.h +++ b/apps/cuesheet.h | |||
@@ -39,7 +39,6 @@ struct cue_track_info { | |||
39 | 39 | ||
40 | struct cuesheet { | 40 | struct cuesheet { |
41 | char path[MAX_PATH]; | 41 | char path[MAX_PATH]; |
42 | char audio_filename[MAX_PATH]; | ||
43 | 42 | ||
44 | char title[MAX_NAME*3+1]; | 43 | char title[MAX_NAME*3+1]; |
45 | char performer[MAX_NAME*3+1]; | 44 | char performer[MAX_NAME*3+1]; |
diff --git a/apps/mpeg.c b/apps/mpeg.c index e8cc03d014..e28260b6a7 100644 --- a/apps/mpeg.c +++ b/apps/mpeg.c | |||
@@ -2057,7 +2057,6 @@ struct mp3entry* audio_current_track() | |||
2057 | if (look_for_cuesheet_file(id3->path, cuepath) && | 2057 | if (look_for_cuesheet_file(id3->path, cuepath) && |
2058 | parse_cuesheet(cuepath, curr_cuesheet)) | 2058 | parse_cuesheet(cuepath, curr_cuesheet)) |
2059 | { | 2059 | { |
2060 | strcpy(curr_cuesheet->audio_filename, id3->path); | ||
2061 | id3->cuesheet = curr_cuesheet; | 2060 | id3->cuesheet = curr_cuesheet; |
2062 | cue_spoof_id3(curr_cuesheet, id3); | 2061 | cue_spoof_id3(curr_cuesheet, id3); |
2063 | } | 2062 | } |
diff --git a/apps/playback.c b/apps/playback.c index 7bd3f252ae..1874430823 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -1853,15 +1853,22 @@ static void audio_finish_load_track(void) | |||
1853 | if (curr_cue) | 1853 | if (curr_cue) |
1854 | { | 1854 | { |
1855 | char cuepath[MAX_PATH]; | 1855 | char cuepath[MAX_PATH]; |
1856 | 1856 | if (look_for_cuesheet_file(track_id3->path, cuepath)) | |
1857 | struct cuesheet temp_cue; | ||
1858 | |||
1859 | if (look_for_cuesheet_file(track_id3->path, cuepath) && | ||
1860 | parse_cuesheet(cuepath, &temp_cue)) | ||
1861 | { | 1857 | { |
1862 | strcpy(temp_cue.audio_filename, track_id3->path); | 1858 | void *temp; |
1863 | tracks[track_widx].cuesheet_hid = | 1859 | tracks[track_widx].cuesheet_hid = |
1864 | bufalloc(&temp_cue, sizeof(struct cuesheet), TYPE_CUESHEET); | 1860 | bufalloc(NULL, sizeof(struct cuesheet), TYPE_CUESHEET); |
1861 | if (tracks[track_widx].cuesheet_hid >= 0) | ||
1862 | { | ||
1863 | bufgetdata(tracks[track_widx].cuesheet_hid, | ||
1864 | sizeof(struct cuesheet), &temp); | ||
1865 | struct cuesheet *cuesheet = (struct cuesheet*)temp; | ||
1866 | if (!parse_cuesheet(cuepath, cuesheet)) | ||
1867 | { | ||
1868 | bufclose(tracks[track_widx].cuesheet_hid); | ||
1869 | track_id3->cuesheet = NULL; | ||
1870 | } | ||
1871 | } | ||
1865 | } | 1872 | } |
1866 | } | 1873 | } |
1867 | #ifdef HAVE_ALBUMART | 1874 | #ifdef HAVE_ALBUMART |