mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-25 04:19:16 +02:00
fixed FLAC playback timing
This commit is contained in:
parent
7e1a8279df
commit
a3dc6bb5a1
3 changed files with 64 additions and 51 deletions
|
@ -18,8 +18,27 @@
|
|||
|
||||
#ifndef FLAC_DECODER_H
|
||||
#define FLAC_DECODER_H
|
||||
|
||||
#include "decoder.h"
|
||||
|
||||
struct CacheInfo
|
||||
{
|
||||
CacheInfo() : sampleRate_(0)
|
||||
{
|
||||
reset();
|
||||
}
|
||||
|
||||
void reset()
|
||||
{
|
||||
isCachedChunk_ = true;
|
||||
cachedBlocks_ = 0;
|
||||
}
|
||||
|
||||
bool isCachedChunk_;
|
||||
size_t cachedBlocks_;
|
||||
size_t sampleRate_;
|
||||
};
|
||||
|
||||
|
||||
class FlacDecoder : public Decoder
|
||||
{
|
||||
|
@ -28,6 +47,8 @@ public:
|
|||
virtual ~FlacDecoder();
|
||||
virtual bool decode(msg::PcmChunk* chunk);
|
||||
virtual bool setHeader(msg::Header* chunk);
|
||||
|
||||
CacheInfo cacheInfo_;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue