XboxDev / nxdk

The cross-platform, open-source SDK to develop for original Xbox: *new* xdk
437 stars 66 forks source link

OpenXDK XAudio does not deinitialize itself #363

Open JayFoxRox opened 4 years ago

JayFoxRox commented 4 years ago

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.

Teufelchen1 commented 3 years ago

Related #449 and #458 - XAudio api is most likely deprecated soon®.

JayFoxRox commented 3 years ago

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).