gst-plugins-good: waveformsink: Fix mingw warnings

Tim Müller tpm at kemper.freedesktop.org
Fri Jan 13 01:43:57 PST 2012


Module: gst-plugins-good
Branch: master
Commit: e886ef8f5bcd4dc10531c74a59b3288b7baf4b45
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=e886ef8f5bcd4dc10531c74a59b3288b7baf4b45

Author: Raimo Järvi <raimo.jarvi at gmail.com>
Date:   Thu Jan 12 00:18:39 2012 +0200

waveformsink: Fix mingw warnings

https://bugzilla.gnome.org/show_bug.cgi?id=667719

---

 sys/waveform/gstwaveformsink.c |    8 ++++----
 sys/waveform/gstwaveformsink.h |   11 +++++++++++
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/sys/waveform/gstwaveformsink.c b/sys/waveform/gstwaveformsink.c
index 83fe749..3ff72a9 100644
--- a/sys/waveform/gstwaveformsink.c
+++ b/sys/waveform/gstwaveformsink.c
@@ -76,8 +76,8 @@ GstCaps *gst_waveform_sink_create_caps (gint rate, gint channels,
     gint bits_per_sample);
 WAVEHDR *bufferpool_get_buffer (GstWaveFormSink * wfsink, gpointer data,
     guint length);
-void CALLBACK waveOutProc (HWAVEOUT hwo, UINT uMsg, unsigned long dwInstance,
-    DWORD dwParam1, DWORD dwParam2);
+void CALLBACK waveOutProc (HWAVEOUT hwo, UINT uMsg, DWORD_PTR dwInstance,
+    DWORD_PTR dwParam1, DWORD_PTR dwParam2);
 
 static GstStaticPadTemplate waveformsink_sink_factory =
     GST_STATIC_PAD_TEMPLATE ("sink",
@@ -374,7 +374,7 @@ gst_waveform_sink_prepare (GstAudioSink * asink, GstRingBufferSpec * spec)
 
   /* open the default audio device with the given caps */
   mmresult = waveOutOpen (&wfsink->hwaveout, WAVE_MAPPER,
-      &wfx, (DWORD) waveOutProc, (DWORD) wfsink, CALLBACK_FUNCTION);
+      &wfx, (DWORD_PTR) waveOutProc, (DWORD_PTR) wfsink, CALLBACK_FUNCTION);
   if (mmresult != MMSYSERR_NOERROR) {
     waveOutGetErrorText (mmresult, wfsink->error_string, ERROR_LENGTH - 1);
     GST_ELEMENT_ERROR (wfsink, RESOURCE, OPEN_WRITE,
@@ -569,7 +569,7 @@ gst_waveform_sink_create_caps (gint rate, gint channels, gint bits_per_sample)
 
 void CALLBACK
 waveOutProc (HWAVEOUT hwo,
-    UINT uMsg, unsigned long dwInstance, DWORD dwParam1, DWORD dwParam2)
+    UINT uMsg, DWORD_PTR dwInstance, DWORD_PTR dwParam1, DWORD_PTR dwParam2)
 {
   GstWaveFormSink *wfsink = (GstWaveFormSink *) dwInstance;
 
diff --git a/sys/waveform/gstwaveformsink.h b/sys/waveform/gstwaveformsink.h
index 7922779..b23aea1 100644
--- a/sys/waveform/gstwaveformsink.h
+++ b/sys/waveform/gstwaveformsink.h
@@ -28,10 +28,21 @@
 #include <windows.h>
 #include <mmsystem.h>
 
+#ifndef WAVE_FORMAT_96M08
 #define WAVE_FORMAT_96M08       0x00001000       /* 96   kHz, Mono,   8-bit  */
+#endif
+
+#ifndef WAVE_FORMAT_96S08
 #define WAVE_FORMAT_96S08       0x00002000       /* 96   kHz, Stereo, 8-bit  */
+#endif
+
+#ifndef WAVE_FORMAT_96M16
 #define WAVE_FORMAT_96M16       0x00004000       /* 96   kHz, Mono,   16-bit */
+#endif
+
+#ifndef WAVE_FORMAT_96S16
 #define WAVE_FORMAT_96S16       0x00008000       /* 96   kHz, Stereo, 16-bit */
+#endif
 
 #define ERROR_LENGTH MAXERRORLENGTH+50
 #define BUFFER_COUNT 20



More information about the gstreamer-commits mailing list