uber minor tweaks
git-svn-id: https://svn.musicpd.org/mpd/trunk@1563 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
e1a94f917d
commit
0228a4a5ca
@ -462,6 +462,7 @@ void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer * cb) {
|
||||
dc->state!=DECODE_STATE_STOP)
|
||||
{
|
||||
processDecodeInput();
|
||||
handleDecodeStart();
|
||||
if(quit) return;
|
||||
my_usleep(10000);
|
||||
}
|
||||
@ -561,10 +562,10 @@ void decodeParent(PlayerControl * pc, DecoderControl * dc, OutputBuffer * cb) {
|
||||
quit = 1;
|
||||
}
|
||||
pc->totalPlayTime+= sizeToTime*cb->chunkSize[cb->begin];
|
||||
cb->begin++;
|
||||
if(cb->begin>=buffered_chunks) {
|
||||
if( cb->begin+1 >= buffered_chunks ) {
|
||||
cb->begin = 0;
|
||||
}
|
||||
else cb->begin++;
|
||||
}
|
||||
else if(next==cb->begin) {
|
||||
if(doCrossFade==1 && nextChunk>=0) {
|
||||
|
@ -57,10 +57,11 @@ void clearOutputBuffer(OutputBuffer * cb) {
|
||||
|
||||
void flushOutputBuffer(OutputBuffer * cb) {
|
||||
if(currentChunk == cb->end) {
|
||||
cb->end++;
|
||||
if(cb->end>=buffered_chunks) {
|
||||
cb->end = 0;
|
||||
int next = cb->end+1;
|
||||
if(next>=buffered_chunks) {
|
||||
next = 0;
|
||||
}
|
||||
cb->end = next;
|
||||
currentChunk = -1;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user