forked from len0rd/rockbox
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
This commit is contained in:
parent
a2e8cf713e
commit
2159811c66
2 changed files with 8 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue