[xaudio2] wait for buffer release before destroying the source voice.
commitb3b7410f68aa3177924068951c3bf4e9cf731203
authorCrystalP <crystalp@kodi.tv>
Sun, 25 Aug 2024 16:07:36 +0000 (25 12:07 -0400)
committerCrystalP <crystalp@kodi.tv>
Fri, 6 Sep 2024 02:07:57 +0000 (5 22:07 -0400)
tree9b3c0a6a5d65eebe6b62bbb5d5d89e67dd5b5589
parentbf4742620b37f91dcea2923dc139750f71048a2e
[xaudio2] wait for buffer release before destroying the source voice.

Stop and FlushSourceBuffers are async and callbacks on the queued buffers don't seem to be called when destroying the voice, with a leak of the buffers' memory.
xbmc/cores/AudioEngine/Sinks/AESinkXAudio.cpp