mirror of
https://github.com/badaix/snapcast.git
synced 2025-08-02 16:19:09 +02:00
xxxx
git-svn-id: svn://elaine/murooma/trunk@272 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
16ef1ae634
commit
feabfee936
50 changed files with 1996 additions and 1984 deletions
|
@ -18,37 +18,37 @@
|
|||
class Stream
|
||||
{
|
||||
public:
|
||||
Stream(const SampleFormat& format);
|
||||
void addChunk(PcmChunk* chunk);
|
||||
void clearChunks();
|
||||
bool getPlayerChunk(void* outputBuffer, double outputBufferDacTime, unsigned long framesPerBuffer, size_t timeout);
|
||||
void setBufferLen(size_t bufferLenMs);
|
||||
const SampleFormat& format;
|
||||
Stream(const SampleFormat& format);
|
||||
void addChunk(PcmChunk* chunk);
|
||||
void clearChunks();
|
||||
bool getPlayerChunk(void* outputBuffer, double outputBufferDacTime, unsigned long framesPerBuffer, size_t timeout);
|
||||
void setBufferLen(size_t bufferLenMs);
|
||||
const SampleFormat& format;
|
||||
|
||||
private:
|
||||
time_point_ms getNextPlayerChunk(void* outputBuffer, unsigned long framesPerBuffer, size_t timeout, int correction = 0);
|
||||
time_point_ms getSilentPlayerChunk(void* outputBuffer, unsigned long framesPerBuffer);
|
||||
time_point_ms seek(long ms);
|
||||
time_point_ms getNextPlayerChunk(void* outputBuffer, unsigned long framesPerBuffer, size_t timeout, 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);
|
||||
void updateBuffers(int age);
|
||||
void resetBuffers();
|
||||
void updateBuffers(int age);
|
||||
void resetBuffers();
|
||||
|
||||
SampleFormat format_;
|
||||
SampleFormat format_;
|
||||
|
||||
long lastTick;
|
||||
long sleep;
|
||||
long lastTick;
|
||||
long sleep;
|
||||
|
||||
Queue<std::shared_ptr<PcmChunk>> chunks;
|
||||
DoubleBuffer<long> cardBuffer;
|
||||
DoubleBuffer<long> miniBuffer;
|
||||
DoubleBuffer<long> buffer;
|
||||
DoubleBuffer<long> shortBuffer;
|
||||
std::shared_ptr<PcmChunk> chunk;
|
||||
Queue<std::shared_ptr<PcmChunk>> chunks;
|
||||
DoubleBuffer<long> cardBuffer;
|
||||
DoubleBuffer<long> miniBuffer;
|
||||
DoubleBuffer<long> buffer;
|
||||
DoubleBuffer<long> shortBuffer;
|
||||
std::shared_ptr<PcmChunk> chunk;
|
||||
|
||||
int median;
|
||||
int shortMedian;
|
||||
time_t lastUpdate;
|
||||
int bufferMs;
|
||||
int median;
|
||||
int shortMedian;
|
||||
time_t lastUpdate;
|
||||
int bufferMs;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue