mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-21 10:27:39 +02:00
xxx
git-svn-id: svn://elaine/murooma/trunk@79 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
dc918a0553
commit
8f6e32cc76
1 changed files with 3 additions and 6 deletions
|
@ -94,10 +94,10 @@ timeval Stream::getNextPlayerChunk(short* outputBuffer, int correction)
|
|||
}
|
||||
*/
|
||||
|
||||
if (correction > 0)
|
||||
if (correction != 0)
|
||||
{
|
||||
std::cerr << "Correction: " << correction << "\n";
|
||||
size_t idxCorrection(0);
|
||||
// size_t idxCorrection(0);
|
||||
size_t idx(chunk->idx);
|
||||
for (size_t n=0; n<PLAYER_CHUNK_SIZE/2; ++n)
|
||||
{
|
||||
|
@ -116,11 +116,8 @@ timeval Stream::getNextPlayerChunk(short* outputBuffer, int correction)
|
|||
*(outputBuffer + 2*n) = chunk->payload[idx];
|
||||
*(outputBuffer + 2*n+1) = chunk->payload[idx + 1];
|
||||
}
|
||||
// if (correction > 0)
|
||||
// addMs(chunk, -PLAYER_CHUNK_MS*2);
|
||||
// else if (correction < 0)
|
||||
// addMs(chunk, -PLAYER_CHUNK_MS*0.5);
|
||||
chunk->idx = idx+2;
|
||||
addMs(chunk, -chunk->idx / PLAYER_CHUNK_MS_SIZE);
|
||||
if (chunk->idx >= WIRE_CHUNK_SIZE)
|
||||
{
|
||||
// mutex.lock();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue