Closed Bug 1094925 Opened 10 years ago Closed 9 years ago

Web Audio ChannelMergerNode ignores inputs from GainNodes with zero gain

Categories

(Core :: Web Audio, defect, P2)

36 Branch
x86
All
defect

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: joe, Assigned: karlt)

References

Details

(Whiteboard: [spec])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:36.0) Gecko/20100101 Firefox/36.0
Build ID: 20141106030201

Steps to reproduce:

See http://jsfiddle.net/JBerkovitz/5byng2cj/ which routes a mono audio buffer through two gain nodes fed into two inputs of a ChannelMergerNode.

Click "Play" with the pan slider set to hard-left (default position). This causes the gain node fed to the 2nd input of the merger to have a gain of exactly zero.


Actual results:

The signal is center-panned.




Expected results:

It should cause a signal to emerge only from the left audio channel. 

(Compare with corresponding results when slider is set to hard-right, or to a value near the left end of the range but not at the extreme position).

The problem appears to be that ChannelMerger doesn't consider itself to be receiving an input when that input has been routed through a zero-gain node, and this affects its channel layout decisions which is not to spec.

Could this possibly be related to the optimization in #949683?
Component: Untriaged → Web Audio
Product: Firefox → Core
We need a way to indicate the number of channels, even with a null output chunk.
The GC issue in bug 916392 means we need to also track channel counts in some situations with no chunks at all.
Status: UNCONFIRMED → NEW
Ever confirmed: true
See Also: → 916392
Rank: 25
Priority: -- → P2
Whiteboard: [spec]
Spec changes for https://github.com/WebAudio/web-audio-api/issues/304 mean that this is now easier to fix:

"To merge multiple inputs into one stream, each input gets downmixed into one channel (mono) based on the specified mixing rule. An unconnected input still counts as one silent channel in the output. Changing input streams does not affect the order of output channels.

For ChannelMergerNode, channelCount and channelCountMode properties cannot be changed. InvalidState error MUST be thrown when they changed."

InvalidState may have been intended as InvalidStateError but even that would probably be a bug because other nodes with similar behaviour throw NotSupportedError.
Assignee: nobody → karlt
Status: NEW → ASSIGNED
OS: Mac OS X → All
bug 1094925 adopt spec changes for one channel per input ChannelMerger behavior r?padenot

https://github.com/WebAudio/web-audio-api/issues/304

NotSupportedError is chosen for more sensible meaning and consistency with
other nodes.
Attachment #8681076 - Flags: review?(padenot)
Attachment #8681076 - Flags: review?(padenot) → review+
Comment on attachment 8681076 [details]
MozReview Request: bug 1094925 adopt spec changes for one channel per input ChannelMerger behavior r?padenot

https://reviewboard.mozilla.org/r/23741/#review21493
https://hg.mozilla.org/mozilla-central/rev/d2e3c40c476f
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: