OS: All
What steps will reproduce the problem?
(1) Run the following in the dev console (or wherever)
c = new AudioContext()
n = c.createGain()
n.channelInterpretation = "discrete"; console.log(n.channelInterpretation)
(2) It's really important that the last line be on one line.
(3) Now do
n.connect(c.destination)
(4) Wait a bit
console.log(n.channelInterpretation);
What is the expected output?
The console should print "discrete", "discrete"
What do you see instead?
"speakers", "discrete"
So, the channelInterpretation never gets set as expected unless the node is connected to the destination.
This change was done a while ago to fix a race condition where the audio thread needed the value while the main thread was changing it. The change is now deferred until the end (or beginning) of the audio thread rendering phase. Thus, this never gets changed if the node is not connected to the destination.
Comment 1 by rtoy@chromium.org
, Aug 10 2016