sleep when waiting for cross-fade chunks
When there are not enough decode cross-fade chunks in the buffer yet, the current code does busy-wait, which will delay the decoder even more. sleep instead, expecting the decoder to wake us up. git-svn-id: https://svn.musicpd.org/mpd/trunk@7272 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
9760325ee6
commit
f25ff42639
@ -536,12 +536,14 @@ static void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer *
|
|||||||
running, abort
|
running, abort
|
||||||
cross fading */
|
cross fading */
|
||||||
doCrossFade = -1;
|
doCrossFade = -1;
|
||||||
} else
|
} else {
|
||||||
/* wait for the
|
/* wait for the
|
||||||
decoder */
|
decoder */
|
||||||
|
player_sleep();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* play the current chunk */
|
/* play the current chunk */
|
||||||
pc->elapsedTime = beginChunk->times;
|
pc->elapsedTime = beginChunk->times;
|
||||||
|
Loading…
Reference in New Issue
Block a user