[PATCH 1/5] include: Add IMpegAudioDecoder definition.

Anton Baskanov wine at gitlab.winehq.org
Mon May 9 00:38:50 CDT 2022


From: Anton Baskanov <baskanov at gmail.com>

Signed-off-by: Anton Baskanov <baskanov at gmail.com>
---
 include/Makefile.in  |  1 +
 include/mmreg.h      | 12 ++++++++
 include/mpegtype.idl | 69 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 82 insertions(+)
 create mode 100644 include/mpegtype.idl

diff --git a/include/Makefile.in b/include/Makefile.in
index f3e62c4bb5a..14c4caeb688 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -435,6 +435,7 @@ SOURCES = \
 	mmreg.h \
 	mmstream.idl \
 	mmsystem.h \
+	mpegtype.idl \
 	mprapi.h \
 	mprerror.h \
 	msacm.h \
diff --git a/include/mmreg.h b/include/mmreg.h
index bcee2a5ec61..1b19e1f068f 100644
--- a/include/mmreg.h
+++ b/include/mmreg.h
@@ -836,6 +836,18 @@ typedef struct {
     GUID SubFormat;
 } WAVEFORMATEXTENSIBLE, *PWAVEFORMATEXTENSIBLE;
 
+typedef struct {
+	WAVEFORMATEX wfx;
+	WORD fwHeadLayer;
+	DWORD dwHeadBitrate;
+	WORD fwHeadMode;
+	WORD fwHeadModeExt;
+	WORD wHeadEmphasis;
+	WORD fwHeadFlags;
+	DWORD dwPTSLow;
+	DWORD dwPTSHigh;
+} MPEG1WAVEFORMAT;
+
 #pragma pack(pop)
 cpp_quote("#endif")
 
diff --git a/include/mpegtype.idl b/include/mpegtype.idl
new file mode 100644
index 00000000000..5f26283640c
--- /dev/null
+++ b/include/mpegtype.idl
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2022 Anton Baskanov
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+import "unknwn.idl";
+
+cpp_quote("#include <mmreg.h>")
+#include <mmreg.h>
+
+[
+    object,
+    /* uuid(b45dd570-3c77-11d1-abe1-00a0c905f375) conflicts with uuids.h */
+    pointer_default(unique)
+]
+interface IMpegAudioDecoder : IUnknown
+{
+    HRESULT get_AudioFormat(
+        MPEG1WAVEFORMAT *format);
+
+    HRESULT get_DecoderAccuracy(
+        unsigned long *accuracy);
+
+    HRESULT get_DecoderWordSize(
+        unsigned long *word_size);
+
+    HRESULT get_DualMode(
+        unsigned long *dual_mode);
+
+    HRESULT get_FrequencyDivider(
+        unsigned long *divider);
+
+    HRESULT get_IntegerDecode(
+        unsigned long *integer_decode);
+
+    HRESULT get_Stereo(
+        unsigned long *stereo);
+
+    HRESULT put_DecoderAccuracy(
+        unsigned long accuracy);
+
+    HRESULT put_DecoderWordSize(
+        unsigned long word_size);
+
+    HRESULT put_DualMode(
+        unsigned long dual_mode);
+
+    HRESULT put_FrequencyDivider(
+        unsigned long divider);
+
+    HRESULT put_IntegerDecode(
+        unsigned long integer_decode);
+
+    HRESULT put_Stereo(
+        unsigned long stereo);
+}
-- 
GitLab


https://gitlab.winehq.org/wine/wine/-/merge_requests/49



More information about the wine-devel mailing list