Code comments

This commit is contained in:
badaix 2015-08-13 23:00:47 +02:00
parent c1cb395eb0
commit a88e218d91
6 changed files with 51 additions and 8 deletions

View file

@ -27,13 +27,12 @@ using namespace std;
namespace cs = chronos;
Stream::Stream(const msg::SampleFormat& sampleFormat) : format_(sampleFormat), sleep_(0), median_(0), shortMedian_(0), lastUpdate_(0), playedFrames_(0)
Stream::Stream(const msg::SampleFormat& sampleFormat) : format_(sampleFormat), sleep_(0), median_(0), shortMedian_(0), lastUpdate_(0), playedFrames_(0), bufferMs_(cs::msec(500))
{
buffer_.setSize(500);
shortBuffer_.setSize(100);
miniBuffer_.setSize(20);
// cardBuffer_.setSize(50);
bufferMs_ = cs::msec(500);
/*
48000 x
@ -278,7 +277,7 @@ bool Stream::getPlayerChunk(void* outputBuffer, const cs::usec& outputBufferDacT
// framesCorrection = number of frames to be read more or less to get in-sync
long framesCorrection = correction.count()*format_.usRate();
// sample rate correction
if ((correctAfterXFrames_ != 0) && (playedFrames_ >= (unsigned long)abs(correctAfterXFrames_)))
{