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

Rémi Denis-Courmont remi at remlab.net
Mon Aug 27 17:02:39 CEST 2012


   Hello,

On Monday 27 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?

I don't see where you're going. Different audio outputs map the volume 
differently. Thus they cannot share a single volume parameter. That's all.

> >> 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.

No audible feedback, ergo not possible to adjust the volume.
It's as simple as that, but that's not the point anyway.

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

I don't know, you tell me.

-- 
Rémi Denis-Courmont
http://www.remlab.info



More information about the vlc-devel mailing list