[Bug 52592] New: MilkyTracker does not work: no valid waveout devices.
WineHQ Bugzilla
wine-bugs at winehq.org
Fri Feb 25 06:23:22 CST 2022
https://bugs.winehq.org/show_bug.cgi?id=52592
Bug ID: 52592
Summary: MilkyTracker does not work: no valid waveout devices.
Product: Wine
Version: unspecified
Hardware: aarch64
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: winmm&mci
Assignee: wine-bugs at winehq.org
Reporter: carlo.bramix at libero.it
Distribution: ---
MilkyTracker is an multi-platform music application for creating .MOD and .XM
module files.
https://github.com/milkytracker/MilkyTracker
Unfortunately, it doesn't work on WINE because it cannot open any waveout
device.
Sources of MilkyTracker do these actions:
1)
waveOutOpen(&hwo, WAVE_MAPPER, &format, 0, 0, CALLBACK_NULL);
This call is a success and it returns a valid handle.
2)
waveOutGetID(hwo,(LPUINT)&waveOutID);
This call also returns success and it returns a value of 63 into "waveOutID".
BUT THIS IS WRONG. "waveOutID" should be equal to WAVE_MAPPER, which equal to
-1, as you can see in point (1).
3)
waveOutGetDevCaps((UINT)waveOutID, &waveoutcaps, sizeof(waveoutcaps));
As result, this call to waveOutGetDevCaps() fails with return value of
MMSYSERR_BADDEVICEID.
Here there is the point where there is the code that I'm talking about:
https://github.com/milkytracker/MilkyTracker/blob/4f97b7011b20519890e30368e2c2cf17c81020b6/src/milkyplay/drivers/windows/AudioDriver_MMSYSTEM.cpp#L133
The cause of the trouble is the way the function waveOutGetID() is implemented.
waveOutGetID() calls WINMM_GetDeviceFromHWAVE().
And WINMM_GetDeviceFromHWAVE() calls WINMM_DecomposeHWAVE()
Into WINMM_DecomposeHWAVE(), there are these lines:
ULONG32 l = HandleToULong(hwave);
*device_index = l & 0xFF;
But this is wrong, because *device_index will be never able to return -1 that
is the value for WAVE_MAPPER.
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list