http://bugs.winehq.org/show_bug.cgi?id=22880
--- Comment #40 from Raymond superquad.vortex2@gmail.com 2010-12-12 05:51:11 CST --- (In reply to comment #25)
This issue about Lemmix is a strict duplicate of bug #22261. Likely, every bug about WAVE_Open dwRet = MMSYSERR_ALLOCATED is.
Lemmix first calls a waveOutOpen with 6 buffers for the background music, then uses PlaySound(SND_MEMORY|SND_ASYNC) to play sound effects. This second use fails for Wine's ALSA and OSS drivers because they only support a single output (dwUser is unused). It works with the Core Audio driver for MacOS (since Ken Thomases patches in October 2009). Perhaps it would work with the non-official PulseAudio driver.
Yes, Lemmix work with non-official winepulse driver too
I have modified winealsa.drv to enable multiple waveoutopen for those alsa drivers which support hardmixing and Lemmix seem also work with plug:dmix too
**** List of PLAYBACK Hardware Devices **** card 0: au8830 [Aureal Vortex au8830], device 0: AU88x0 ADB [adb] Subdevices: 31/32
static DWORD wodOpen(WORD wDevID, WINE_WAVE_VOICE **pInstance,LPWAVEOPENDESC lpDesc, DWORD dwFlags) { WINE_WAVEDEV* wwo; ...
wwo = &WOutDev[wDevID]; v = 0; while (( wwo->voice[v].pcm != NULL ) && ( v < MAX_ALSA_VOICE )) v++;
if ( v >= MAX_ALSA_VOICE ) { WARN("more than %d voices for device %s\n", MAX_ALSA_VOICE , wwo->pcmname); return MMSYSERR_ALLOCATED; }; voice=&wwo->voice[v];
...
flags = SND_PCM_NONBLOCK;
if ( (err = snd_pcm_open(&pcm, wwo->pcmname, SND_PCM_STREAM_PLAYBACK, flags)) < 0) { ERR("Error open: %s\n", snd_strerror(err)); return MMSYSERR_ALLOCATED; }
...
*pInstance = voice; return wodNotifyClient(voice, WOM_OPEN, 0L, 0L);
errexit:
...
}
DWORD WINAPI ALSA_wodMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, DWORD_PTR dwParam1, DWORD_PTR dwParam2) { WINE_WAVE_VOICE *voice = (WINE_WAVE_VOICE *)dwUser;
case WODM_OPEN: return wodOpen (wDevID, (WINE_WAVE_VOICE **)dwUser,(LPWAVEOPENDESC)dwParam1, dwParam2);
...