This introduces a new drv_wasapi.c driver using Windows Audio Session API (WASAPI), the modern audio backend on Windows 10/11.
The driver has been tested and works correctly with the current mixer. It aligns the mixing rate with the device mix format to avoid playback speed issues in shared mode.
For full integration details and related changes, see:
https://github.com/execomrt/mikmod/commit/08e8d00c4ea496c7ad9ba4009ec9360ff78364cd
Additional header updates may be required; I can prepare those if desired.
Note: DirectSound appears to behave incorrectly on Windows 11 (mono output). WASAPI should be preferred as the default backend when available.
Reference: https://learn.microsoft.com/en-us/windows/win32/coreaudio/wasapi
Looks like the code is in: https://sourceforge.net/p/mikmod/mikmod/ci/b9cf28cf3d96c73f2c44fe367c227aa5b7699992/
I'll do the necessary autotools, cmake, and visual studio integrations later.
New driver now fully integrated: See git current master (also miiroed at github.)
Closing the ticket.
P.S.: The directsound issue needs resolving. (Not tested myself, yet.)
@realtech: Got a segfault upon MıkMod_Reset() -- see https://sourceforge.net/p/mikmod/bugs/30/
Please resolve.
@realtech: I pushed the following three to drv_wasapi, make sure they are OK:
https://sourceforge.net/p/mikmod/mikmod/ci/f4ffb767367fbeba5f52c9334f6045097e7645bc/
https://sourceforge.net/p/mikmod/mikmod/ci/bcf8e5d85aa3698733cd59ce34d4f05adb9de089/
https://sourceforge.net/p/mikmod/mikmod/ci/0f63e3d7e1d08d9aeee9b26776dfaddc6d622def/
The last one is copyright / license header: Is it complete? Are there any authors other than you that we should give credit to?
This is complete, i've wrote this implementation based from my existing codebase.
Great, thanks!