http://bugs.winehq.org/show_bug.cgi?id=58253
Bug ID: 58253 Summary: Multiple games have a beeping noise on exit (The Fidelio Incident, Vampyr) Product: Wine Version: 9.8 Hardware: x86-64 OS: Linux Status: NEW Keywords: regression Severity: normal Priority: P2 Component: xaudio2 Assignee: wine-bugs@winehq.org Reporter: andrey.goosev@gmail.com CC: pgofman@codeweavers.com Regression SHA1: 3e4185435843d368a4f521a1f6f14362d6286e24 Distribution: ---
Expected line since b928f0eb08da9a10dae3cb7b33ec16b164a2fddd
0024:err:xaudio2:destroy_voice Destroying voice 00007FFFFFC20CD0 failed.
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.
http://bugs.winehq.org/show_bug.cgi?id=58253
--- Comment #2 from Paul Gofman pgofman@codeweavers.com --- The above, in particular, means that with the tentative fix to FAudio the 'err:' in log is supposed to stay but the 'beep' should go away.
http://bugs.winehq.org/show_bug.cgi?id=58253
--- Comment #3 from Paul Gofman pgofman@codeweavers.com --- The patch got merged to FAudio, so should appear in Wine upon next FAudio sync.