diff options
author | waker <wakeroid@gmail.com> | 2011-05-01 18:52:52 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-05-01 18:52:52 +0200 |
commit | dbd71ede2e7a5235b4310002ba60657f03420b0a (patch) | |
tree | 5642cc967c15dfc9702d28069671d5c5723d258d /plugins/mpgmad | |
parent | d7d4cb0eb1bd956a1f2fa4f48a1a2b4dc9e5fd98 (diff) |
added mp3 embedded cue support
Diffstat (limited to 'plugins/mpgmad')
-rw-r--r-- | plugins/mpgmad/mpgmad.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/mpgmad/mpgmad.c b/plugins/mpgmad/mpgmad.c index e0d806b8..3b7c23b5 100644 --- a/plugins/mpgmad/mpgmad.c +++ b/plugins/mpgmad/mpgmad.c @@ -1350,6 +1350,17 @@ cmp3_insert (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname) { deadbeef->plt_set_item_duration (plt, it, buffer.duration); deadbeef->fclose (fp); + const char *cuesheet = deadbeef->pl_find_meta (it, "cuesheet"); + if (cuesheet) { + DB_playItem_t *last = deadbeef->plt_insert_cue_from_buffer (plt, after, it, cuesheet, strlen (cuesheet), buffer.totalsamples-buffer.delay-buffer.padding, buffer.samplerate); + if (last) { + deadbeef->pl_item_unref (it); + deadbeef->pl_item_unref (last); + return last; + } + } + + // FIXME! bad numsamples passed to cue DB_playItem_t *cue_after = deadbeef->plt_insert_cue (plt, after, it, buffer.totalsamples-buffer.delay-buffer.padding, buffer.samplerate); if (cue_after) { |