RE: Meaning of "volume"?

Hi Chris,

It was called 'gain' at one time:  https://dvcs.w3.org/hg/dap/raw-file/tip/media-stream-capture/proposals/SettingsAPI_proposal_v6.html#audiostreamtrack-interface.  My suggestion at that time was to leverage the definition in WebAudio:  https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#GainNode.

-Giri

From: Chris Wilson [mailto:cwilso@google.com]
Sent: Monday, October 14, 2013 10:49 AM
To: Harald Alvestrand
Cc: public-media-capture@w3.org
Subject: Re: Meaning of "volume"?

I think it's gain.  There are too many parameters on how you would determine "how loud is the audio" (e.g. a VU meter is one standardization) - unless you clearly standardize how you want to do that, there could be significant differences.

On Mon, Oct 14, 2013 at 10:38 AM, Harald Alvestrand <harald@alvestrand.no<mailto:harald@alvestrand.no>> wrote:
A discussion erupted this week at the office over the meaning of this construct:





dictionary MediaSourceStates {

    SourceTypeEnum<http://dev.w3.org/2011/webrtc/editor/getusermedia.html#idl-def-SourceTypeEnum>       sourceType<http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaSourceStates-sourceType>;

    DOMString            sourceId<http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaSourceStates-sourceId>;

    unsigned long?       width<http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaSourceStates-width>;

    unsigned long?       height<http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaSourceStates-height>;

    float?               frameRate<http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaSourceStates-frameRate>;

    float?               aspectRatio<http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaSourceStates-aspectRatio>;

    VideoFacingModeEnum<http://dev.w3.org/2011/webrtc/editor/getusermedia.html#idl-def-VideoFacingModeEnum>? facingMode<http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaSourceStates-facingMode>;

    unsigned long?       volume<http://dev.w3.org/2011/webrtc/editor/getusermedia.html#widl-MediaSourceStates-volume>;

};



In particular the last field, which has the definition:


volume of type unsigned long, nullable
The current audio track's volume (as a percentage). A volume of 0 is silence, while a volume of 100 is the maximum supported volume. Returned for audio sources.


For all the other properties of MediaSourceStates, it's reasonably obvious that they are relatively static properties that are controlled mainly by setting constraints.

There's also a "volume" constraint in "Constraint Registrations":

volume    unsigned long or MinMaxConstraint    Constrain the audio source to the exact desired volume or volume range.

The two interpretations at the office were:

- Volume is "audio level" - how much sound is currently coming out.
- Volume is "gain" - how much the system will amplify (or dampen) the sound on the track.

For the constraint, it's obviously "gain". But is the MediaSourceState what it's currently set to, or is it the amount of sound coming down the channel?

(We have another discussion about the fact that we *need* a way to see how loud the audio is. But let's first figure out if this particular piece should be interpreted one way or the other.)

    Harald

Received on Monday, 14 October 2013 19:20:58 UTC