mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-11 16:16:42 +02:00
Code comments
This commit is contained in:
parent
c1cb395eb0
commit
a88e218d91
6 changed files with 51 additions and 8 deletions
|
@ -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_)))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue