mirror of
https://github.com/digarok/gsplus.git
synced 2024-11-24 06:34:02 +00:00
Merge branch 'fix_64_bit_win32_sound' into 'experimental'
64-bit fixes for win sound driver This fixes the win32 sound driver so it can be compiled (and run) with 64-bit Cygwin/gcc. Previously, it would crash due to pointer/int conversion losing information. See merge request !3
This commit is contained in:
commit
df15c0f6d9
@ -85,8 +85,8 @@ win32snd_shutdown()
|
|||||||
|
|
||||||
|
|
||||||
void CALLBACK
|
void CALLBACK
|
||||||
handle_wav_snd(HWAVEOUT hwo, UINT uMsg, DWORD dwInstance, DWORD dwParam1,
|
handle_wav_snd(HWAVEOUT hwo, UINT uMsg, DWORD_PTR dwInstance, DWORD_PTR dwParam1,
|
||||||
DWORD dwParam2)
|
DWORD_PTR dwParam2)
|
||||||
{
|
{
|
||||||
LPWAVEHDR lpwavehdr;
|
LPWAVEHDR lpwavehdr;
|
||||||
|
|
||||||
@ -155,7 +155,7 @@ child_sound_init_win32()
|
|||||||
}
|
}
|
||||||
|
|
||||||
res = waveOutOpen(&g_wave_handle, WAVE_MAPPER, &wavefmt,
|
res = waveOutOpen(&g_wave_handle, WAVE_MAPPER, &wavefmt,
|
||||||
(DWORD)handle_wav_snd, 0, CALLBACK_FUNCTION | WAVE_ALLOWSYNC);
|
(DWORD_PTR)handle_wav_snd, 0, CALLBACK_FUNCTION | WAVE_ALLOWSYNC);
|
||||||
|
|
||||||
if(res != MMSYSERR_NOERROR) {
|
if(res != MMSYSERR_NOERROR) {
|
||||||
printf("Cannot register audio\n");
|
printf("Cannot register audio\n");
|
||||||
@ -185,7 +185,7 @@ child_sound_init_win32()
|
|||||||
check_wave_error(res, "waveOutPrepareHeader");
|
check_wave_error(res, "waveOutPrepareHeader");
|
||||||
}
|
}
|
||||||
|
|
||||||
res = waveOutGetDevCaps((UINT)g_wave_handle, &caps, sizeof(caps));
|
res = waveOutGetDevCaps((UINT_PTR)g_wave_handle, &caps, sizeof(caps));
|
||||||
check_wave_error(res, "waveOutGetDevCaps");
|
check_wave_error(res, "waveOutGetDevCaps");
|
||||||
printf("Using %s\n", caps.szPname);
|
printf("Using %s\n", caps.szPname);
|
||||||
printf(" Bits per Sample = %d. Channels = %d\n",
|
printf(" Bits per Sample = %d. Channels = %d\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user