This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 17400 - (AudioGainScale): GainNode scale underdefined
Summary: (AudioGainScale): GainNode scale underdefined
Status: CLOSED WONTFIX
Alias: None
Product: AudioWG
Classification: Unclassified
Component: Web Audio API (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: TBD
Assignee: Chris Rogers
QA Contact: This bug has no owner yet - up for the taking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-05 12:20 UTC by Michael[tm] Smith
Modified: 2014-10-28 17:16 UTC (History)
4 users (show)

See Also:


Attachments

Description Michael[tm] Smith 2012-06-05 12:20:04 UTC
Audio-ISSUE-45 (AudioGainScale): AudioGain scale underdefined [Web Audio API]

http://www.w3.org/2011/audio/track/issues/45

Raised by: Philip Jägenstedt
On product: Web Audio API

The spec says "The default amount is 1 (no gain change)" and 'The unit type is "linear gain"' but doesn't define what linear gain means. Particularly, does a gain of 2 mean that the float32 sample values are multiplied by 2, or is the scale something else?
Comment 1 Olivier Thereaux 2012-06-07 08:17:22 UTC
[admin] Assigning items currently being worked on by editor.
Comment 2 Olivier Thereaux 2012-06-07 14:55:40 UTC
From the editor:

More detailed text added:
https://dvcs.w3.org/hg/audio/rev/4de4b8263c21
Comment 3 Philip Jägenstedt 2012-06-12 14:18:58 UTC
The question was answered (output = input * gain) but no normative requirements on implementations were added. We suggest avoiding phrasing like "will" or "is".

A "must" is missing in somewhere in the following:

"Every PCM audio sample in the input is multiplied by the gain parameter's value for the specific time corresponding to that audio sample. This multiplied value represents the PCM audio sample for the output. 

The number of channels of the output will always equal the number of channels of the input, with each channel of the input being multiplied by the gain values and being copied into the corresponding channel of the output."

They could also be replaced by something like "output[t] = gain[t] * input[t]" given some basic definitions to support it, but that is editorial.

Editorial issues:

"By default, it will take the input and pass it through to the output unchanged, which represents a constant gain change of 1." can be removed since it's already defined in the attributes section.

"As with other <code>AudioParams</code>, the <code>gain</code> parameter represents a mapping from time (in the coordinate system of AudioContext.currentTime) to floating-point value." can be moved to the AudioParam section since it is generally true, or removed.
Comment 4 Olivier Thereaux 2012-12-18 13:18:18 UTC
Renaming issue to match renaming of AudioGain/GainNode interface.
Comment 5 Olivier Thereaux 2014-10-28 17:13:43 UTC
Web Audio API issues have been migrated to Github. 
See https://github.com/WebAudio/web-audio-api/issues
Comment 6 Olivier Thereaux 2014-10-28 17:16:36 UTC
Closing. See https://github.com/WebAudio/web-audio-api/issues for up to date list of issues for the Web Audio API.