http://bugs.winehq.org/show_bug.cgi?id=58253
--- Comment #1 from Paul Gofman pgofman@codeweavers.com --- Thanks for the report!
I could reproduce and debugged the issue.
The blamed commits still look correct. The game leaves a source voice which outputs to mastrering voice and that prevents mastering voice from destruction (I confirmed with unit testing that it is also the case for mastering voice; my earlier tests only covered submix voices). The leftover source voice has a looping and all zero buffer, but after that cleanup the game frees buffer data internally and the looping starts to play garabage which gets there until the game fully exits. The game also releases audio engine in the end of the tear down and here is the problem: turns out on Windows voices do not reference engine and that release tears down all the audion, while with FAudio the engine is referenced by the voices (while we have 2 leftover).
I sent PR to FAudio (with a bit more of gory details and attached test): https://github.com/FNA-XNA/FAudio/pull/382 . Once that refcounting is fixed in FAudio and that version is pulled to Wine I am going to send the test upstream.