mirror of
https://github.com/badaix/snapcast.git
synced 2025-08-01 23:59:43 +02:00
buffer stuff
git-svn-id: svn://elaine/murooma/trunk@105 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
c1a36fed13
commit
82a9e1214f
1 changed files with 10 additions and 1 deletions
11
stream.cpp
11
stream.cpp
|
@ -168,7 +168,16 @@ void Stream::getChunk(short* outputBuffer, double outputBufferDacTime, unsigned
|
|||
pBuffer->clear();
|
||||
pShortBuffer->clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (pShortBuffer->full() && (abs(shortMedian) <= PLAYER_CHUNK_MS))
|
||||
{
|
||||
if (abs(shortMedian) > 3)
|
||||
{
|
||||
correction = -shortMedian;
|
||||
pBuffer->clear();
|
||||
pShortBuffer->clear();
|
||||
}
|
||||
}
|
||||
|
||||
timeval tv = getNextPlayerChunk(outputBuffer, correction);
|
||||
int age = getAge(tv) - bufferMs;// + outputBufferDacTime*1000;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue