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/mp3-mpg123/nsvmain.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Src/mp3-mpg123/nsvmain.h (limited to 'Src/mp3-mpg123/nsvmain.h') diff --git a/Src/mp3-mpg123/nsvmain.h b/Src/mp3-mpg123/nsvmain.h new file mode 100644 index 00000000..802b6d88 --- /dev/null +++ b/Src/mp3-mpg123/nsvmain.h @@ -0,0 +1,20 @@ +#pragma once +#include +#include "../nsv/dec_if.h" + +class MP3_Decoder : public IAudioDecoder +{ +public: + MP3_Decoder(); + ~MP3_Decoder() { }; + int decode(void *in, int in_len, + void *out, int *out_len, + unsigned int out_fmt[8]); + void flush(); +private: + mpg123_handle *decoder; + float pcm_buf[1152*2*2]; + size_t pcm_buf_used; + int pcm_offs; + int fused; +}; -- cgit