From 429a2364b47ded3b64b67cec0ed96a251e878771 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@d8a302eb-03bc-478d-80e4-98257eca68ef> Date: Tue, 26 Aug 2014 17:09:30 +0000 Subject: [PATCH] abc git-svn-id: svn://elaine/murooma/trunk@212 d8a302eb-03bc-478d-80e4-98257eca68ef --- client/stream.cpp | 10 +++++----- client/stream.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/client/stream.cpp b/client/stream.cpp index cb6daf92..df463385 100644 --- a/client/stream.cpp +++ b/client/stream.cpp @@ -8,8 +8,8 @@ using namespace std; Stream::Stream(const SampleFormat& sampleFormat) : format(format_), format_(sampleFormat), sleep(0), median(0), shortMedian(0), lastUpdate(0) { - pBuffer = new DoubleBuffer(1000); - pShortBuffer = new DoubleBuffer(200); + pBuffer = new DoubleBuffer(500); + pShortBuffer = new DoubleBuffer(100); pMiniBuffer = new DoubleBuffer(20); pCardBuffer = new DoubleBuffer(50); bufferMs = 500; @@ -51,7 +51,7 @@ time_point_ms Stream::getSilentPlayerChunk(void* outputBuffer, unsigned long fra } - +/* time_point_ms Stream::seekTo(const time_point_ms& to) { if (!chunk) @@ -66,7 +66,7 @@ time_point_ms Stream::seekTo(const time_point_ms& to) chunk->seek(std::chrono::duration_cast(to - chunk->timePoint()).count() * format.msRate()); return chunk->timePoint(); } - +*/ time_point_ms Stream::seek(long ms) @@ -244,7 +244,7 @@ cout << "\nms: " << Chunk::getAge(ms) << "\t chunk: " << chunk->getAge() << "\n" cout << "pMiniBuffer->full() && (abs(pMiniBuffer->mean()) > 50): " << pMiniBuffer->median() << "\n"; sleep = pMiniBuffer->mean(); } - else if (abs(age) > 50) + else if (abs(age) > 200) { cout << "age > 50: " << age << "\n"; sleep = age; diff --git a/client/stream.h b/client/stream.h index 6c6de2b6..05c4b99b 100644 --- a/client/stream.h +++ b/client/stream.h @@ -28,7 +28,7 @@ private: time_point_ms getNextPlayerChunk(void* outputBuffer, unsigned long framesPerBuffer, int correction = 0); time_point_ms getSilentPlayerChunk(void* outputBuffer, unsigned long framesPerBuffer); time_point_ms seek(long ms); - time_point_ms seekTo(const time_point_ms& to); +// time_point_ms seekTo(const time_point_ms& to); void updateBuffers(int age); void resetBuffers();