mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-21 21:16:15 +02:00
buffering
git-svn-id: svn://elaine/murooma/trunk@39 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
503f3ed83c
commit
73ac7236b5
2 changed files with 3 additions and 2 deletions
|
@ -209,6 +209,7 @@ static int patestCallback( const void *inputBuffer, void *outputBuffer,
|
|||
std::cerr << "median > bufferMs + MS (" << median << " > " << bufferMs + MS << "), dropping chunk\n";
|
||||
buffer.clear();
|
||||
chunks->pop_front();
|
||||
usleep((median - (bufferMs + MS)) * 1000);
|
||||
delete chunk;
|
||||
}
|
||||
else if (buffer.full() && (median + MS < bufferMs))
|
||||
|
@ -217,7 +218,7 @@ static int patestCallback( const void *inputBuffer, void *outputBuffer,
|
|||
buffer.clear();
|
||||
chunk = new Chunk();
|
||||
memset(&(chunk->payload[0]), 0, SIZE);
|
||||
usleep(10 * 1000);
|
||||
usleep((bufferMs - (median + MS)) * 1000);
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue