https://bugs.winehq.org/show_bug.cgi?id=46450
Bug ID: 46450 Summary: Volume Control doesn't work in Firefox videos (and browsers based on it) with PulseAudio driver Product: Wine Version: 4.0-rc5 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winepulse.drv Assignee: wine-bugs@winehq.org Reporter: gabrielopcode@gmail.com CC: aeikum@codeweavers.com Distribution: ---
The volume control on videos does not work and has no effect. Tested on Firefox 52 ESR, Waterfox and latest Pale Moon (you have to enable media.wmf.vp9.enabled to true for the latter so you can play videos on Youtube without native mfplat / vdec DLLs).
I skimmed through Firefox's source code, it appears to be using IAudioStreamVolume::SetAllVolumes or similar calls. When I poked through Wine's code, it seems only coreaudio driver actually does anything here.
The pulseaudio driver's SetAllVolumes is basically a no-op because it doesn't do anything with the volume it sets (except retrieve it with GetAllVolumes), and it's never sent to libpulse so of course it doesn't have any effect. The coreaudio driver does call ca_setvol or ca_session_setvol where the pulse driver is missing such a thing completely.
With a quick search I found that pa_context_set_sink_input_volume might be useful for this purpose, but I don't really know much about libpulse, perhaps there's a better way. It definitely can't stay like this though, since right now it's basically a stub without even a FIXME for it...