mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-27 23:17:04 +02:00
sleep
git-svn-id: svn://elaine/murooma/trunk@189 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
b60813c780
commit
18ec79e97a
1 changed files with 4 additions and 2 deletions
|
@ -140,11 +140,13 @@ void Stream::getPlayerChunk(short* outputBuffer, double outputBufferDacTime, uns
|
|||
while (true)// (int i=0; i<(int)(round((float)sleep / (float)PLAYER_CHUNK_MS)) + 1; ++i)
|
||||
{
|
||||
int age = Chunk::getAge(getNextPlayerChunk(outputBuffer, framesPerBuffer)) - bufferMs + latencyMs;
|
||||
sleep -= msBuffer;
|
||||
// age += 4*cardBuffer;
|
||||
if (age < msBuffer / 2)
|
||||
// cout << "age: " << age << ", msBuffer: " << msBuffer << "\n";
|
||||
if (sleep < msBuffer / 2)
|
||||
break;
|
||||
}
|
||||
sleep = 0;
|
||||
// sleep = 0;
|
||||
return;
|
||||
}
|
||||
else if (sleep < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue