mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-10 23:56:43 +02:00
refactoring
git-svn-id: svn://elaine/murooma/trunk@328 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
611b2a6c9f
commit
c40bfda64c
35 changed files with 192 additions and 178 deletions
|
@ -19,12 +19,12 @@
|
|||
class Stream
|
||||
{
|
||||
public:
|
||||
Stream(const SampleFormat& format);
|
||||
void addChunk(PcmChunk* chunk);
|
||||
Stream(const msg::SampleFormat& format);
|
||||
void addChunk(msg::PcmChunk* chunk);
|
||||
void clearChunks();
|
||||
bool getPlayerChunk(void* outputBuffer, const chronos::usec& outputBufferDacTime, unsigned long framesPerBuffer);
|
||||
void setBufferLen(size_t bufferLenMs);
|
||||
const SampleFormat& format;
|
||||
const msg::SampleFormat& format;
|
||||
|
||||
private:
|
||||
chronos::time_point_hrc getNextPlayerChunk(void* outputBuffer, const chronos::usec& timeout, unsigned long framesPerBuffer);
|
||||
|
@ -36,20 +36,17 @@ private:
|
|||
void resetBuffers();
|
||||
void setRealSampleRate(double sampleRate);
|
||||
|
||||
SampleFormat format_;
|
||||
msg::SampleFormat format_;
|
||||
|
||||
long lastTick;
|
||||
chronos::usec sleep;
|
||||
|
||||
unsigned long playedSamples;
|
||||
chronos::time_point_hrc playedSamplesTime;
|
||||
|
||||
Queue<std::shared_ptr<PcmChunk>> chunks;
|
||||
Queue<std::shared_ptr<msg::PcmChunk>> chunks;
|
||||
// DoubleBuffer<chronos::usec::rep> cardBuffer;
|
||||
DoubleBuffer<chronos::usec::rep> miniBuffer;
|
||||
DoubleBuffer<chronos::usec::rep> buffer;
|
||||
DoubleBuffer<chronos::usec::rep> shortBuffer;
|
||||
std::shared_ptr<PcmChunk> chunk;
|
||||
std::shared_ptr<msg::PcmChunk> chunk;
|
||||
|
||||
int median;
|
||||
int shortMedian;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue