aboutsummaryrefslogtreecommitdiff
path: root/Src/replicant/nsmp3dec/mp2decode.h
diff options
context:
space:
mode:
authorJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
committerJef <jef@targetspot.com>2024-09-24 08:54:57 -0400
commit20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch)
tree12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/replicant/nsmp3dec/mp2decode.h
parent537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff)
downloadwinamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz
Initial community commit
Diffstat (limited to 'Src/replicant/nsmp3dec/mp2decode.h')
-rw-r--r--Src/replicant/nsmp3dec/mp2decode.h50
1 files changed, 50 insertions, 0 deletions
diff --git a/Src/replicant/nsmp3dec/mp2decode.h b/Src/replicant/nsmp3dec/mp2decode.h
new file mode 100644
index 00000000..d918330b
--- /dev/null
+++ b/Src/replicant/nsmp3dec/mp2decode.h
@@ -0,0 +1,50 @@
+#ifndef __MP2DECODE_H__
+#define __MP2DECODE_H__
+
+/* ------------------------ includes --------------------------------------*/
+
+#include "mpeg.h"
+#include "mpegbitstream.h"
+#include "polyphase.h"
+
+/*-------------------------------------------------------------------------*/
+
+//
+// MPEG Layer-2 decoding class.
+//
+// This is the main MPEG Layer-2 decoder object.
+//
+
+class CMp2Decode
+{
+public:
+ CMp2Decode(CMpegBitStream &_Bs, DecoderHooks *_hooks=0);
+ ~CMp2Decode();
+
+ void Init(bool fFullReset = true);
+
+ SSC Decode(void *pPcm, size_t cbPcm, size_t *pcbUsed);
+
+private:
+ SSC Decode2(void *pPcm);
+ SSC Decode1(void *pPcm);
+
+ void ZeroPolySpectrum();
+ void SetInfo();
+
+ CPolyphase m_Polyphase; // polyphase
+
+ MPEG_INFO m_Info; // info structure
+ CMpegBitStream &m_Bs; // bitstream
+
+ POLYSPECTRUM m_PolySpectrum; // spectrum (post-mdct)
+
+ char m_tab_3[32 * 3];
+ char m_tab_5[128 * 3];
+ char m_tab_9[1024 * 3];
+ float m_scales[27][64];
+ DecoderHooks *hooks;
+};
+
+/*-------------------------------------------------------------------------*/
+#endif