mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-10 07:36:41 +02:00
buffer stuff
git-svn-id: svn://elaine/murooma/trunk@104 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
46fdc5df84
commit
c1a36fed13
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
Stream::Stream() : sleep(0), median(0), shortMedian(0), lastUpdate(0)
|
Stream::Stream() : sleep(0), median(0), shortMedian(0), lastUpdate(0)
|
||||||
{
|
{
|
||||||
pBuffer = new DoubleBuffer<int>(30000 / PLAYER_CHUNK_MS);
|
pBuffer = new DoubleBuffer<int>(15000 / PLAYER_CHUNK_MS);
|
||||||
pShortBuffer = new DoubleBuffer<int>(5000 / PLAYER_CHUNK_MS);
|
pShortBuffer = new DoubleBuffer<int>(5000 / PLAYER_CHUNK_MS);
|
||||||
pLock = new std::unique_lock<std::mutex>(mtx);
|
pLock = new std::unique_lock<std::mutex>(mtx);
|
||||||
bufferMs = 500;
|
bufferMs = 500;
|
||||||
|
@ -164,7 +164,7 @@ void Stream::getChunk(short* outputBuffer, double outputBufferDacTime, unsigned
|
||||||
{
|
{
|
||||||
if (abs(median) > 1)
|
if (abs(median) > 1)
|
||||||
{
|
{
|
||||||
correction = -median;
|
correction = -shortMedian;
|
||||||
pBuffer->clear();
|
pBuffer->clear();
|
||||||
pShortBuffer->clear();
|
pShortBuffer->clear();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue