waveformsink: Fix mingw warnings

https://bugzilla.gnome.org/show_bug.cgi?id=667719
This commit is contained in:
Raimo Järvi 2012-01-12 00:18:39 +02:00 committed by Tim-Philipp Müller
parent 654a04f90c
commit e886ef8f5b
2 changed files with 15 additions and 4 deletions

View file

@ -76,8 +76,8 @@ GstCaps *gst_waveform_sink_create_caps (gint rate, gint channels,
gint bits_per_sample); gint bits_per_sample);
WAVEHDR *bufferpool_get_buffer (GstWaveFormSink * wfsink, gpointer data, WAVEHDR *bufferpool_get_buffer (GstWaveFormSink * wfsink, gpointer data,
guint length); guint length);
void CALLBACK waveOutProc (HWAVEOUT hwo, UINT uMsg, unsigned long dwInstance, void CALLBACK waveOutProc (HWAVEOUT hwo, UINT uMsg, DWORD_PTR dwInstance,
DWORD dwParam1, DWORD dwParam2); DWORD_PTR dwParam1, DWORD_PTR dwParam2);
static GstStaticPadTemplate waveformsink_sink_factory = static GstStaticPadTemplate waveformsink_sink_factory =
GST_STATIC_PAD_TEMPLATE ("sink", 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 */ /* open the default audio device with the given caps */
mmresult = waveOutOpen (&wfsink->hwaveout, WAVE_MAPPER, 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) { if (mmresult != MMSYSERR_NOERROR) {
waveOutGetErrorText (mmresult, wfsink->error_string, ERROR_LENGTH - 1); waveOutGetErrorText (mmresult, wfsink->error_string, ERROR_LENGTH - 1);
GST_ELEMENT_ERROR (wfsink, RESOURCE, OPEN_WRITE, 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 void CALLBACK
waveOutProc (HWAVEOUT hwo, 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; GstWaveFormSink *wfsink = (GstWaveFormSink *) dwInstance;

View file

@ -28,10 +28,21 @@
#include <windows.h> #include <windows.h>
#include <mmsystem.h> #include <mmsystem.h>
#ifndef WAVE_FORMAT_96M08
#define WAVE_FORMAT_96M08 0x00001000 /* 96 kHz, Mono, 8-bit */ #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 */ #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 */ #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 */ #define WAVE_FORMAT_96S16 0x00008000 /* 96 kHz, Stereo, 16-bit */
#endif
#define ERROR_LENGTH MAXERRORLENGTH+50 #define ERROR_LENGTH MAXERRORLENGTH+50
#define BUFFER_COUNT 20 #define BUFFER_COUNT 20