mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-01 10:21:46 +02:00
buffering
git-svn-id: svn://elaine/murooma/trunk@28 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
09346c274e
commit
d79f25ef5e
1 changed files with 5 additions and 2 deletions
|
@ -188,8 +188,11 @@ static int patestCallback( const void *inputBuffer, void *outputBuffer,
|
|||
std::cerr << "age: " << getAge(*chunk) << "\t" << age << "\n";
|
||||
if (age > bufferMs + 100)
|
||||
delete chunk;
|
||||
else if (age < bufferMs)
|
||||
usleep(((bufferMs - age)) * 1000);
|
||||
else if (age < bufferMs - 100)
|
||||
{
|
||||
usleep(((bufferMs - age) + 100) * 1000);
|
||||
delete chunk;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue