mirror of
https://github.com/badaix/snapcast.git
synced 2025-08-03 00:29:35 +02:00
git-svn-id: svn://elaine/murooma/trunk@132 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
ef80f16d05
commit
9223741af3
1 changed files with 8 additions and 2 deletions
10
stream.cpp
10
stream.cpp
|
@ -148,10 +148,16 @@ void Stream::getChunk(short* outputBuffer, double outputBufferDacTime, unsigned
|
|||
{
|
||||
for (size_t i=0; i<chunks.size(); ++i)
|
||||
std::cerr << "Chunk " << i << ": " << getAge(chunks[i]) - bufferMs << "\n";
|
||||
for (int i=0; i<(int)(round((float)sleep / (float)PLAYER_CHUNK_MS)) + 1; ++i)
|
||||
while (true)// (int i=0; i<(int)(round((float)sleep / (float)PLAYER_CHUNK_MS)) + 1; ++i)
|
||||
{
|
||||
// std::cerr << "Sleep: " << sleep << "\n";
|
||||
std::cerr << getAge(getNextPlayerChunk(outputBuffer)) - bufferMs << "\t";
|
||||
int age = getAge(getNextPlayerChunk(NULL)) - bufferMs;
|
||||
if (age < PLAYER_CHUNK_MS)
|
||||
{
|
||||
getNextPlayerChunk(outputBuffer);
|
||||
break;
|
||||
}
|
||||
// std::cerr << getAge(getNextPlayerChunk(outputBuffer)) - bufferMs << "\t";
|
||||
// usleep(10);
|
||||
}
|
||||
sleep = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue