diff options
author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/alac/ALACMP4Decoder.h | |
parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz |
Merge pull request #5 from WinampDesktop/community
Merge to main
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 |