24 #ifndef MPD_FLAC_COMMON_HXX
25 #define MPD_FLAC_COMMON_HXX
29 #include "../DecoderAPI.hxx"
32 #include <FLAC/stream_decoder.h>
74 bool Initialize(
unsigned sample_rate,
unsigned bits_per_sample,
75 unsigned channels, FLAC__uint64 total_frames);
77 void OnMetadata(
const FLAC__StreamMetadata &metadata);
79 FLAC__StreamDecoderWriteStatus
OnWrite(
const FLAC__Frame &frame,
80 const FLAC__int32 *
const buf[],
90 void OnStreamInfo(
const FLAC__StreamMetadata_StreamInfo &stream_info);
91 void OnVorbisComment(
const FLAC__StreamMetadata_VorbisComment &vc);
100 bool OnFirstFrame(
const FLAC__FrameHeader &header);
ConstBuffer< void > chunk
Decoded PCM data obtained by our libFLAC write callback.
An interface between the decoder plugin and the MPD core.
bool unsupported
Does the FLAC file contain an unsupported audio format?
The meta information about a song file.
FLAC__StreamDecoderWriteStatus OnWrite(const FLAC__Frame &frame, const FLAC__int32 *const buf[], FLAC__uint64 nbytes)
FLAC__uint64 position
End of last frame's position within the stream.
FLAC__uint64 GetDeltaPosition(const FLAC__StreamDecoder &sd)
Calculate the delta (in bytes) between the last frame and the current frame.
uint16_t kbit_rate
The kbit_rate parameter for the next DecoderBridge::SubmitData() call.
bool Initialize(unsigned sample_rate, unsigned bits_per_sample, unsigned channels, FLAC__uint64 total_frames)
Wrapper for DecoderClient::Ready().
FlacDecoder(DecoderClient &_client, InputStream &_input_stream)
bool initialized
Has DecoderClient::Ready() been called yet?
This class imports libFLAC PCM data into a PCM format supported by MPD.
void OnMetadata(const FLAC__StreamMetadata &metadata)