From 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d Mon Sep 17 00:00:00 2001 From: Jef Date: Tue, 24 Sep 2024 14:54:57 +0200 Subject: Initial community commit --- Src/pcm/mp4_ulaw_decoder.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Src/pcm/mp4_ulaw_decoder.h (limited to 'Src/pcm/mp4_ulaw_decoder.h') diff --git a/Src/pcm/mp4_ulaw_decoder.h b/Src/pcm/mp4_ulaw_decoder.h new file mode 100644 index 00000000..1c6f2480 --- /dev/null +++ b/Src/pcm/mp4_ulaw_decoder.h @@ -0,0 +1,26 @@ +#pragma once + +#include "../Plugins/Input/in_mp4/mpeg4audio.h" + +// {F05D2AAA-6F21-4970-AE9C-8D9FFB497957} +static const GUID mp4_ulaw_guid = +{ 0xf05d2aaa, 0x6f21, 0x4970, { 0xae, 0x9c, 0x8d, 0x9f, 0xfb, 0x49, 0x79, 0x57 } }; + + +class MP4ulawDecoder : public MP4AudioDecoder +{ +public: + static const char *getServiceName() { return "ulaw MP4 Decoder"; } + static GUID getServiceGuid() { return mp4_ulaw_guid; } + MP4ulawDecoder(); + int Open(); + 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 CanHandleCodec(const char *codecName); + //int SetGain(float _gain) { gain=_gain; return MP4_SUCCESS; } + int RequireChunks(); // return 1 if your decoder wants to read whole chunks rather than samples + +protected: + RECVS_DISPATCH; +}; \ No newline at end of file -- cgit