mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-21 04:56:13 +02:00
buffering
git-svn-id: svn://elaine/murooma/trunk@40 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
73ac7236b5
commit
3b40a08f1e
1 changed files with 2 additions and 2 deletions
|
@ -189,14 +189,14 @@ static int patestCallback( const void *inputBuffer, void *outputBuffer,
|
|||
int median = buffer.median();
|
||||
std::cerr << "age: " << getAge(*chunk) << "\t" << age << "\t" << median << "\t" << buffer.size() << "\t" << timeInfo->outputBufferDacTime*1000 << "\n";
|
||||
|
||||
if (age > bufferMs + 2*MS)
|
||||
if (!buffer.full() && (age > bufferMs + 2*MS))
|
||||
{
|
||||
chunks->pop_front();
|
||||
delete chunk;
|
||||
std::cerr << "packe too old, dropping\n";
|
||||
usleep(100);
|
||||
}
|
||||
else if (age < bufferMs - 2*MS)
|
||||
else if (!buffer.full() && (age < bufferMs - 2*MS))
|
||||
{
|
||||
chunk = new Chunk();
|
||||
memset(&(chunk->payload[0]), 0, SIZE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue