Open JayFoxRox opened 4 years ago
Related #449 and #458 - XAudio api is most likely deprecated soon®.
Not strictly related: XAudio API is deprecated, but the implementation won't be.
So people should stop using XAudio directly, but the code will continue to be used, so all bugs are still valid. These issues also affect users who use XAudio through SDL audio (which is the recommended way of using audio on nxdk).
xaudio leaks memory; it also plays garbage while the application is quitting (because it will keep buffers alive, but they'll be overwritten / free'd by the kernel or next application).
A shutdown handler should be registered and a function for de-initializing AC97 should be added.
We should probably investigate #362 first, because even just calling
XAudioInit
shortly before shutting down actually seems to hide that issue.