fixed FLAC playback timing

This commit is contained in:
badaix 2015-12-23 08:20:21 +01:00
parent 7e1a8279df
commit a3dc6bb5a1
3 changed files with 64 additions and 51 deletions

View file

@ -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_;
};