[vlc-devel] [PATCH] auhal setMute (refs #7329)

Felix Paul Kühne fkuehne.videolan at gmail.com
Mon Aug 27 09:34:52 CEST 2012


Hello,

On 27.08.2012, at 03:06, "Rémi Denis-Courmont" <remi at remlab.net> wrote:

>   Hello,
> 
> On Sunday 26 August 2012, Felix Paul Kühne wrote:
>>> Also different outputs use different scales. ALSA would explode the
>>> eardrums if it used a volume saved by PulseAudio.
>> 
>> Sure, that makes perfect sense. This why we had the 0 to 512 scale in VLC
>> and left it as an implementation detail to the respective output module to
>> do something useful with it and to respect the scale.
> 
> Respect what scale? The only thing the scale specifies is that 0 means mute and 
> 1 (previously 256) means 100%. It fails to say what 100% is. And it cannot be 
> fixed. Ideally 100% should correspoind to a pair of voltage opposite levels on 
> the analog line output corresponding to the two extreme pulse codes. However, 
> I am yet to see any audio programming interface providing that data.

I see your point, but this is going to be really hard if not impossible especially cross-platform.
I expected every audio API to provide a range for the volume (e.g. linear 0 to 1 for CoreAudio), which could be mapped to VLC's. I guess this is what happens when I set the volume variable at the moment, no?

> 
>> This is not acceptable for me, since VLC would be the only media player on
>> any platform I know, where you can only move the slider if an input is
>> playing.
> 
> First, adjusting the volume level during silence is not normally possible. 
> There is no feedback to appreciate the actual volume then.
Well, obviously there is no audible feedback, but for most users, a volume slider (which is nothing else than a visual analog scale for the perceived volume on the most dominant frequencies, which in turn is only loosely correlated to the physical volume due to physical effects in the inner ear, further processing in the primary auditory cortex and some psychological phenomenons) is enough, since they are used to it.
Players supporting this feature: iTunes, QuickTime, Windows Media Player, Tomahawk, last.fm for desktops, etc. to name a few.

> Second, if the audio stream ends up being passed through digitally, a non-
> functional volume control makes for a lot worse user experience than no or a 
> greyed volume control.
I'd second your point. However, I'd like to have a working volume slider as long as it makes sense. When the aout opens and detects digital output, it sounds more than reasonable to disable the slider. On the other hand, we shipped a non-working control for this case for years and nobody ever complained.

Would you please comment on how a permenently available volume variable could be achieved?

Thanks,

Felix


More information about the vlc-devel mailing list