Playing audio from certain sources causes the mixer to show wrong audio level
Categories
(Core :: Audio/Video: cubeb, defect, P3)
Tracking
()
People
(Reporter: lilyh, Unassigned)
References
Details
Attachments
(4 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:69.0) Gecko/20100101 Firefox/69.0
Steps to reproduce:
In any Firefox window (also tested with a new profile):
- Visit the Spotify Web Player (https://open.spotify.com)
- Play any track with audio that is suitably loud, for example `Through Fire and Flames' (https://open.spotify.com/track/1iTb2vi8Bls7QY6CKL2gj2).
- Open the Windows volume mixer and watch the green volume indication next to the instance of Firefox.
Actual results:
The green volume indication shows significantly louder than the track plays and sometimes goes over the 100% mark.
Expected results:
The indication is showing similar values to the device output on the left (assuming no other audio is playing)
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
It is worth noting, this effect hasn't been seen with other sources of HTML video, audio and DRM-protected video. I have been unable to find another site providing DRM-protected audio, so cannot confirm whether this is the cause.
Could you navigate to about:support
and copy the information there to the clipboard (using the button provided), then attach that information to this bug, please?
If you lower the Firefox volume bar to 50% does the excess volume show up as green still?
Reporter | ||
Comment 3•5 years ago
|
||
At a reduced level, Windows indicates a proportional green bar as expected, although still at a higher level than output. Additionally, using the volume controller provided on the Spotify website, which clearly changes the audio level as heard, has no effect on the indication displayed.
Reporter | ||
Comment 4•5 years ago
|
||
The output from my browser. In addition this has been demonstrated on a separate machine in another copy of Firefox (Developer Edition again) - this output can be seen at https://pastebin.com/ZW3pcKRb.
Looking at my Windows machines, I generally see the applications and device bars not reach the same levels, so I'm not sure that's a cause for concern.
:kinetik, have you seen this before? I recall seeing something like what is mentioned in comment 3, namely that changing the in spotify app volume doesn't affect how Firefox appears in the mixer, but I don't recall the answer. My inkling is that this is due to where the mixer is reading levels from and that there are different places in the pipeline where levels are read and modulated. Do you know anything about that and/or the original issue with the volume showing as beyond the limit?
Reporter | ||
Comment 6•5 years ago
|
||
After some searching through the Spotify JavaScript and some experimentation of my own, it seems that the issue can be recreated by creating an audio element with JavaScript but not adding it to the DOM.
Any audio file can be used as the source.
Reporter | ||
Comment 7•5 years ago
|
||
Continuing to experiment, it seems that it doesn't matter whether it's been added to the DOM or not. I'll continue to update when I find new information.
Comment 8•5 years ago
|
||
I can reproduce most of the described issue locally: play the linked song (or any other audio, but it's easier to see with brickwalled audio) at 100% volume in Spotify, view sndvol and note green meter level, then adjust the volume via the Spotify controls to some lower value (e.g. 10%). sndvol still shows unscaled output via the green meter for the Firefox audio session, i.e. the apparent volume of the stream has not changed from 100%.
I think this is simply because the method we use to adjust per-stream volumes (IAudioStreamVolume) is not represented in sndvol's user interface. With this method, we send unscaled audio samples to the IAudioRenderClient, which WASAPI then volume adjusts for us per the settings supplied via IAudioStreamVolume calls. I can't find any documentation describing precisely what sndvol is doing, so it's hard to say what the correct/expected behaviour is.
Chrome adjusts sample volume before sending it to the IAudioRenderClient, so the visible behaviour in sndvol is quite different.
I can't reproduce the green meter being drawn above the volume slider. That may be a Windows version or hardware/driver specific issue with the metering, or possibly caused by audio enhancements on the output device. You could verify the latter by opening the (old) Sound control panel (mmsys.cpl), selecting Properties for the output device, then selecting "Disable all enhancements" in the Enhancements tab.
Comment 9•5 years ago
|
||
A quick test of IChannelAudioVolume shows the same behaviour as seen with IAudioStreamVolume. I suspect we'd need to move to using our own internal volume adjustment (as Chrome does, for example) if we want to change the visible behaviour in sndvol's UI.
I can't reproduce the green meter being drawn above the volume slider.
I've seen this happen now, with two loud songs playing in different tabs.
Updated•2 years ago
|
Description
•