Meaning of "volume"?

A discussion erupted this week at the office over the meaning of this 
construct:

dictionaryMediaSourceStates  {
     |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 typeunsigned 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 17:39:07 UTC