diff options
-rw-r--r-- | apps/playback.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/apps/playback.c b/apps/playback.c index 0a43d958b9..3f4aee3e9b 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -17,6 +17,8 @@ | |||
17 | * | 17 | * |
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | 19 | ||
20 | /* TODO: Fast codecs seem to cause badness on track skipping (stop, old audio, | ||
21 | * then new audio). Investigate the CFL_FLUSH mode used for all track skips */ | ||
20 | /* TODO: Check for a possibly broken codepath on a rapid skip, stop event */ | 22 | /* TODO: Check for a possibly broken codepath on a rapid skip, stop event */ |
21 | /* TODO: Can use the track changed callback to detect end of track and seek | 23 | /* TODO: Can use the track changed callback to detect end of track and seek |
22 | * in the previous track until this happens */ | 24 | * in the previous track until this happens */ |
@@ -745,7 +747,6 @@ static bool buffer_wind_backward(int new_track_ridx, int old_track_ridx) { | |||
745 | 747 | ||
746 | static void audio_update_trackinfo(void) | 748 | static void audio_update_trackinfo(void) |
747 | { | 749 | { |
748 | logf("sk2:%s",playlist_peek(0)); | ||
749 | ci.filesize = cur_ti->filesize; | 750 | ci.filesize = cur_ti->filesize; |
750 | cur_ti->id3.elapsed = 0; | 751 | cur_ti->id3.elapsed = 0; |
751 | cur_ti->id3.offset = 0; | 752 | cur_ti->id3.offset = 0; |
@@ -1834,10 +1835,7 @@ static bool load_next_track(void) { | |||
1834 | manual_skip = false; | 1835 | manual_skip = false; |
1835 | } | 1836 | } |
1836 | else | 1837 | else |
1837 | { | ||
1838 | manual_skip = true; | 1838 | manual_skip = true; |
1839 | pcmbuf_play_stop(); | ||
1840 | } | ||
1841 | 1839 | ||
1842 | cpu_boost(true); | 1840 | cpu_boost(true); |
1843 | queue_post(&audio_queue, Q_AUDIO_CHECK_NEW_TRACK, 0); | 1841 | queue_post(&audio_queue, Q_AUDIO_CHECK_NEW_TRACK, 0); |
@@ -2586,6 +2584,7 @@ void mpeg_id3_options(bool _v1first) | |||
2586 | v1first = _v1first; | 2584 | v1first = _v1first; |
2587 | } | 2585 | } |
2588 | 2586 | ||
2587 | #if (ROCKBOX_HAS_LOGF == 1) | ||
2589 | void test_buffer_event(struct mp3entry *id3, bool last_track) | 2588 | void test_buffer_event(struct mp3entry *id3, bool last_track) |
2590 | { | 2589 | { |
2591 | (void)id3; | 2590 | (void)id3; |
@@ -2602,6 +2601,15 @@ void test_unbuffer_event(struct mp3entry *id3, bool last_track) | |||
2602 | logf("ube:%d%s", last_track, id3->path); | 2601 | logf("ube:%d%s", last_track, id3->path); |
2603 | } | 2602 | } |
2604 | 2603 | ||
2604 | void test_track_changed_event(struct mp3entry *id3) | ||
2605 | { | ||
2606 | (void)id3; | ||
2607 | |||
2608 | logf("tce:%s", id3->artist); | ||
2609 | logf("tce:%s", id3->album); | ||
2610 | } | ||
2611 | #endif | ||
2612 | |||
2605 | static void playback_init(void) | 2613 | static void playback_init(void) |
2606 | { | 2614 | { |
2607 | static bool voicetagtrue = true; | 2615 | static bool voicetagtrue = true; |
@@ -2615,8 +2623,11 @@ static void playback_init(void) | |||
2615 | pcm_rec_mux(0); | 2623 | pcm_rec_mux(0); |
2616 | #endif | 2624 | #endif |
2617 | 2625 | ||
2626 | #if (ROCKBOX_HAS_LOGF == 1) | ||
2618 | audio_set_track_buffer_event(test_buffer_event); | 2627 | audio_set_track_buffer_event(test_buffer_event); |
2619 | audio_set_track_unbuffer_event(test_unbuffer_event); | 2628 | audio_set_track_unbuffer_event(test_unbuffer_event); |
2629 | audio_set_track_changed_event(test_track_changed_event); | ||
2630 | #endif | ||
2620 | 2631 | ||
2621 | /* Initialize codec api. */ | 2632 | /* Initialize codec api. */ |
2622 | ci.read_filebuf = codec_filebuf_callback; | 2633 | ci.read_filebuf = codec_filebuf_callback; |