[PATCH 2/2]winmm: Fix no sound or recording when use waveform-audio
from MSDN, the waveInGetDevCaps and waveOutGetDevCaps function of parameter uDeviceID can be either a device identifier or a handle of an open waveform-audio input or output device. now the function not support handle. also same as waveOutOpen and waveInOpen.
On 4/28/20 10:14 AM, dead ash wrote:
diff --git a/dlls/winmm/waveform.c b/dlls/winmm/waveform.c index 42b888e1ac..dffc002c24 100644 --- a/dlls/winmm/waveform.c +++ b/dlls/winmm/waveform.c @@ -1243,10 +1243,17 @@ static LRESULT WOD_Open(WINMM_OpenInfo *info) lock = &g_devthread_lock; internal_index = MAPPER_INDEX; }else{ - if(info->req_device >= g_outmmdevices_count) - return MMSYSERR_BADDEVICEID; + if(info->req_device >= g_outmmdevices_count) { + WINMM_Device *device = WINMM_GetDeviceFromHWAVE((HWAVE)info->req_device); + + if(device == NULL) return MMSYSERR_BADDEVICEID; + + mmdevice = device->parent; + } + else { + mmdevice = read_map(g_out_map, info->req_device); + }
- mmdevice = read_map(g_out_map, info->req_device);
if(!mmdevice->out_caps.szPname[0]) Please add a test for this. Also note req_device is shorter than HWAVE, on 64-bit.
Hi, While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=70728 Your paranoid android. === debiant (build log) === error: patch failed: dlls/winmm/waveform.c:1243 Task: Patch failed to apply === debiant (build log) === error: patch failed: dlls/winmm/waveform.c:1243 Task: Patch failed to apply
participants (3)
-
dead ash -
Marvin -
Nikolay Sivov