diff options
author | Miika Pekkarinen <miipekk@ihme.org> | 2005-07-15 07:57:09 +0000 |
---|---|---|
committer | Miika Pekkarinen <miipekk@ihme.org> | 2005-07-15 07:57:09 +0000 |
commit | 2159811c66ba3c33407f04da7767c6ba77972b07 (patch) | |
tree | 16568c7a688a0677eab1290f123fd0babde2d7d4 /apps | |
parent | a2e8cf713e13b5e98f711c723bd3e7eff3c6b9b2 (diff) | |
download | rockbox-2159811c66ba3c33407f04da7767c6ba77972b07.tar.gz rockbox-2159811c66ba3c33407f04da7767c6ba77972b07.zip |
Fixed a problem that cpu boost didn't always reset when stopping the
playback.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7153 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/pcmbuf.c | 7 | ||||
-rw-r--r-- | apps/playback.c | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/apps/pcmbuf.c b/apps/pcmbuf.c index ae8f0c2c33..eb6c43e284 100644 --- a/apps/pcmbuf.c +++ b/apps/pcmbuf.c @@ -312,7 +312,7 @@ static void crossfade_start(void) int bytesleft = pcmbuf_unplayed_bytes; crossfade_init = 0; - if (bytesleft < CHUNK_SIZE * 3) { + if (bytesleft < CHUNK_SIZE * 4) { logf("crossfade rejected"); pcmbuf_play_stop(); return ; @@ -399,7 +399,10 @@ static bool prepare_insert(long length) void* pcmbuf_request_buffer(long length, long *realsize) { void *ptr = NULL; - + + if (crossfade_init) + crossfade_start(); + while (audiobuffer_free < length + audiobuffer_fillpos + CHUNK_SIZE && !crossfade_active) { pcmbuf_boost(false); diff --git a/apps/playback.c b/apps/playback.c index 0e20d97fb4..7fbfa6bb60 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -1192,16 +1192,18 @@ static void audio_stop_playback(void) { paused = false; playing = false; + filling = false; ci.stop_codec = true; if (current_fd >= 0) { close(current_fd); current_fd = -1; } + while (codec_loaded) + yield(); pcmbuf_play_stop(); pcm_play_pause(true); track_count = 0; audio_clear_track_entries(); - filling = false; } /* Request the next track with new codec. */ |