[Bug 59047] New: VRChat sound output is broken after video playback start when using AVPro player
http://bugs.winehq.org/show_bug.cgi?id=59047 Bug ID: 59047 Summary: VRChat sound output is broken after video playback start when using AVPro player Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: mmdevapi Assignee: wine-bugs(a)list.winehq.org Reporter: teardown(a)inbox.ru Distribution: --- The sound output is completely gone after video playback starts in worlds that use players based on AVPro library. Reverting commit https://gitlab.winehq.org/wine/wine/-/commit/768d3b19634eee54ef63b733c456bf3... fixes the issue. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59047 Infinite Loop <teardown(a)inbox.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |768d3b19634eee54ef63b733c45 | |6bf3c76b9c01b -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59047 Gijs Vermeulen <gijsvrm(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression CC| |matteo.mystral(a)gmail.com --- Comment #1 from Gijs Vermeulen <gijsvrm(a)gmail.com> --- Is there a free and legal download this could be reproduced with? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59047 --- Comment #2 from Infinite Loop <teardown(a)inbox.ru> --- VRChat is free on Steam, you will have to create a steam account to download it, and then create VRChat account to use VRChat itself. No purchase is necessary to use it. Side note: mainline wine might not support external URL playback due to minning http scheme handlers for winegstreamer. I'm using several patches taken from Proton to make it work, see directory here: https://github.com/SingleInfiniteLoop/wine-tkg-git/tree/master/wine-tkg-git/... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59047 Matteo Bruni <matteo.mystral@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #3 from Matteo Bruni <matteo.mystral@gmail.com> --- Thanks Infinite Loop for the bug report and thanks Gijs for the CC, I didn't notice it earlier. VRChat uses IMFMediaEngine and, at some point while loading the video, it calls SetVolume(0.0) on it. That's effectively implemented as IMFSimpleAudioVolume::SetMasterVolume() -> ISimpleAudioVolume::SetMasterVolume() on the whole audio session, which for VRChat turns out to be the default GUID_NULL one. That's the case both before and after the regressive commit. The commit breaks the application because now that IMFMediaEngine::SetVolume() call can actually affect the volume of all the audio clients in the default session. The short version is: media_engine_apply_volume() gets a IMFSimpleAudioVolume from SAR, which in turn eventually gets it from IAudioClient::GetService(). Before the commit in question, that IAudioClient would be created on a different session from any other client. I suspect that this is effectively a mfmediaengine bug exposed by the commit. I'm still investigating, but my current hypothesis is that IMFMediaEngine_SetVolume() should not map to IMFSimpleAudioVolume_SetMasterVolume(). It looks like mfmediaengine is used by the "normal" player, while AVPro directly uses the various media foundation pieces. So VRChat sets the media engine volume to 0 to "disable" it but doesn't expect that to set the volume to 0 to the whole audio session. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59047 --- Comment #4 from Nikolay Sivov <bunglehead@gmail.com> --- This needs some testing on Windows. There is a way to configure SAR to use specific session, using MF_AUDIO_RENDERER_ATTRIBUTE_SESSION_ID. This should already work. It's not clear if Media Engine uses NULL session, one per-process session, or something else. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59047 --- Comment #5 from Matteo Bruni <matteo.mystral@gmail.com> --- Created attachment 79941 --> http://bugs.winehq.org/attachment.cgi?id=79941 audio session tests It looks like it's both? Running the mfmediaengine tests with the attached hacks on Windows 10, it seems like it does not use the default audio session, but rather some randomly generated GUID one. It also doesn't seem to set the session-wide volumes, either with ISimpleAudioVolume or IChannelAudioVolume. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59047 --- Comment #6 from Matteo Bruni <matteo.mystral@gmail.com> --- Created attachment 79942 --> http://bugs.winehq.org/attachment.cgi?id=79942 hack volume fix Something like this fixes VRChat for me. There is no way in WASAPI / mmdevapi to enumerate the individual streams inside a session, so no way to verify (in a blackbox way) that this is what native does. I'll write a fix for the audio session GUID as well. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59047 Matteo Bruni <matteo.mystral@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #79942|hack volume fix |volume fix description| | -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59047 --- Comment #7 from Matteo Bruni <matteo.mystral@gmail.com> --- (In reply to Matteo Bruni from comment #6)
Created attachment 79942 [details] volume fix
Something like this fixes VRChat for me. There is no way in WASAPI / mmdevapi to enumerate the individual streams inside a session, so no way to verify (in a blackbox way) that this is what native does.
I forgot, I wanted to post this link as well: https://learn.microsoft.com/en-us/windows/win32/api/audioclient/nn-audioclie... There are quite a few ways to affect volumes in WASAPI... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59047 --- Comment #8 from Matteo Bruni <matteo.mystral@gmail.com> --- Infinite Loop, do you know if https://github.com/SingleInfiniteLoop/wine-tkg-git/blob/master/wine-tkg-git/... fixes a different regression? Or is it something that's always been necessary for VRChat? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59047 --- Comment #9 from Infinite Loop <teardown@inbox.ru> --- This is a leftover patch from my attempts to find change that caused the issue, I'll remove this patch and try again with the changes from following MRs: https://gitlab.winehq.org/wine/wine/-/merge_requests/9755 https://gitlab.winehq.org/wine/wine/-/merge_requests/9756 I'll report back as soon as I test VRChat with these changes. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59047 --- Comment #10 from Infinite Loop <teardown@inbox.ru> --- I think `count` variable should be initialised to zero, for cases when `IMFAudioStreamVolume_GetChannelCount` fails. https://gitlab.winehq.org/Mystral/wine/-/commit/2ade38951dc8ba3127a801d222eb... -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59047 --- Comment #11 from Infinite Loop <teardown@inbox.ru> --- I confirm that changes from https://gitlab.winehq.org/wine/wine/-/merge_requests/9755 fix sound output issue when using AVPro player in VRChat. P. S. Would be nice to add channel number to the warning message when `IMFAudioStreamVolume_SetChannelVolume` fails. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59047 Alexandre Julliard <julliard@winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #13 from Alexandre Julliard <julliard@winehq.org> --- Closing bugs fixed in 11.0-rc3. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (3)
-
WineHQ Bugzilla -
WineHQ Bugzilla -
WineHQ Bugzilla