mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-06 04:41:44 +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";
|
std::cerr << "age: " << getAge(*chunk) << "\t" << age << "\n";
|
||||||
if (age > bufferMs + 100)
|
if (age > bufferMs + 100)
|
||||||
delete chunk;
|
delete chunk;
|
||||||
else if (age < bufferMs)
|
else if (age < bufferMs - 100)
|
||||||
usleep(((bufferMs - age)) * 1000);
|
{
|
||||||
|
usleep(((bufferMs - age) + 100) * 1000);
|
||||||
|
delete chunk;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue