diff options
Diffstat (limited to 'apps/playback.c')
-rw-r--r-- | apps/playback.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/apps/playback.c b/apps/playback.c index d256f5a4f0..b80c449c47 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -57,6 +57,7 @@ | |||
57 | #include "buffer.h" | 57 | #include "buffer.h" |
58 | #include "dsp.h" | 58 | #include "dsp.h" |
59 | #include "abrepeat.h" | 59 | #include "abrepeat.h" |
60 | #include "cuesheet.h" | ||
60 | #ifdef HAVE_TAGCACHE | 61 | #ifdef HAVE_TAGCACHE |
61 | #include "tagcache.h" | 62 | #include "tagcache.h" |
62 | #endif | 63 | #endif |
@@ -2742,6 +2743,23 @@ static bool audio_load_track(int offset, bool start_play, bool rebuffer) | |||
2742 | 2743 | ||
2743 | } | 2744 | } |
2744 | 2745 | ||
2746 | if (cuesheet_is_enabled() && tracks[track_widx].id3.cuesheet_type == 1) | ||
2747 | { | ||
2748 | char cuepath[MAX_PATH]; | ||
2749 | strncpy(cuepath, trackname, MAX_PATH); | ||
2750 | char *dot = strrchr(cuepath, '.'); | ||
2751 | strcpy(dot, ".cue"); | ||
2752 | |||
2753 | struct cuesheet *cue = start_play ? curr_cue : temp_cue; | ||
2754 | |||
2755 | if (parse_cuesheet(cuepath, cue)) | ||
2756 | { | ||
2757 | strcpy((cue)->audio_filename, trackname); | ||
2758 | if (start_play) | ||
2759 | cue_spoof_id3(curr_cue, &tracks[track_widx].id3); | ||
2760 | } | ||
2761 | } | ||
2762 | |||
2745 | /* Load the codec. */ | 2763 | /* Load the codec. */ |
2746 | tracks[track_widx].codecbuf = &filebuf[buf_widx]; | 2764 | tracks[track_widx].codecbuf = &filebuf[buf_widx]; |
2747 | if (!audio_loadcodec(start_play)) | 2765 | if (!audio_loadcodec(start_play)) |