24 #ifndef MPD_FLAC_COMMON_HXX 25 #define MPD_FLAC_COMMON_HXX 29 #include "../DecoderAPI.hxx" 31 #include <FLAC/stream_decoder.h> 60 bool Initialize(
unsigned sample_rate,
unsigned bits_per_sample,
61 unsigned channels, FLAC__uint64 total_frames);
63 void OnMetadata(
const FLAC__StreamMetadata &metadata);
65 FLAC__StreamDecoderWriteStatus
OnWrite(
const FLAC__Frame &frame,
66 const FLAC__int32 *
const buf[],
76 void OnStreamInfo(
const FLAC__StreamMetadata_StreamInfo &stream_info);
77 void OnVorbisComment(
const FLAC__StreamMetadata_VorbisComment &vc);
86 bool OnFirstFrame(
const FLAC__FrameHeader &header);
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.
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)