Closed AliceLR closed 3 years ago
BTW, do you have write permissions, or should I apply this?
I have not encountered any crashes with the MikMod CLI player but when I run it with this setup it uses Open Sound System and not WinMM. edit: also, I do not have write permissions.
it uses Open Sound System and not WinMM
Eh? msys has OSS?
Apparently! It is the default output for my current build of libmikmod/MikMod player and I don't even have WinMM as an option.
$ mikmod -n
-= MikMod 3.2.8 =-
(c) 2004 Raphael Assenat and others - see file AUTHORS for complete list
Sound engine version 3.3.11
Available drivers are :
1 Open Sound System driver v1.7
2 Wav disk writer (music.wav) v1.3
3 AIFF disk writer (music.aiff) v1.2
4 Raw disk writer (music.raw) v1.1
5 Piped Output driver v0.2
6 Standard output driver v1.1
7 Nosound Driver v3.0
configure --disable-alldrv --enable-win
Cmake has a similar option, as I remember.
Okay, got MikMod to finally build with that driver and looked at it. MikMod is not affected by the same bug because MikMod_Exit
calls MikMod_DisableOutput_internal()
-> driver->PlayStop()
-> waveOutReset()
before it calls driver->Exit()
-> the equivalent code here.
This fixes a crash caused by freeing buffers that are still in use after failed
waveOutUnprepareHeader
calls. CallingwaveOutReset
first stops playback and releases the buffers, allowingwaveOutUnprepareHeader
to succeed consistently. Fixes #19.