diff options
author | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
---|---|---|
committer | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
commit | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/alac/ALACMP4Decoder.h | |
parent | 537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff) | |
download | winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz |
Initial community commit
Diffstat (limited to 'Src/alac/ALACMP4Decoder.h')
-rw-r--r-- | Src/alac/ALACMP4Decoder.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Src/alac/ALACMP4Decoder.h b/Src/alac/ALACMP4Decoder.h new file mode 100644 index 00000000..3f994455 --- /dev/null +++ b/Src/alac/ALACMP4Decoder.h @@ -0,0 +1,43 @@ +/* copyright 2006 Ben Allison */ +#ifndef NULLSOFT_ALAC_DECODER_H +#define NULLSOFT_ALAC_DECODER_H + +#include "alac/ALACDecoder.h" +#include "../Plugins/Input/in_mp4/mpeg4audio.h" +#include "decomp.h" + +class ALACMP4Decoder : public MP4AudioDecoder +{ +public: + ALACMP4Decoder() + : mpAlacDecoder(0), + channels(0), + bps(0), + output_bits(0), + use_rg(0), + rg(0.0) + { + } + int OpenMP4(MP4FileHandle mp4_file, MP4TrackId mp4_track, size_t output_bits, size_t maxChannels, bool useFloat); + int GetCurrentBitrate(unsigned int *bitrate); + int AudioSpecificConfiguration(void *buffer, size_t buffer_size); // reads ASC block from mp4 file + void Flush(); + void Close(); + int GetOutputProperties(unsigned int *sampleRate, unsigned int *channels, unsigned int *bitsPerSample); + int DecodeSample(void *inputBuffer, size_t inputBufferBytes, void *outputBuffer, size_t *outputBufferBytes); + int OutputFrameSize(size_t *frameSize); + const char *GetCodecInfoString(); + int CanHandleCodec(const char *codecName); + int SetGain(float gain); + unsigned char setinfo_sample_size = 0x10; +private: + ALACDecoder *mpAlacDecoder; + int channels; + int bps; + int output_bits; + bool use_rg; + float rg; +protected: + RECVS_DISPATCH; +}; +#endif
\ No newline at end of file |