From 8f6e32cc76b00ec74e4b6deefd3e8aca40e86455 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@d8a302eb-03bc-478d-80e4-98257eca68ef> Date: Mon, 7 Jul 2014 21:33:42 +0000 Subject: [PATCH] xxx git-svn-id: svn://elaine/murooma/trunk@79 d8a302eb-03bc-478d-80e4-98257eca68ef --- stream.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/stream.cpp b/stream.cpp index 2b1b711a..b41bb1dc 100644 --- a/stream.cpp +++ b/stream.cpp @@ -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; npayload[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();