Closed Bug 1385556 Opened 7 years ago Closed 7 years ago

Web audio api 5.1 surround example not working in firefox

Categories

(Core :: Web Audio, defect)

54 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1378070

People

(Reporter: tomvalkeneers, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0 Build ID: 20170612122443 Steps to reproduce: A few days ago i started to experiment with a surround set. When i was trying surround audio in the web audio api i came to notice that my example works fine in Chrome v59 but not in Firefox v54. js code: // create web audio api context var audioCtx = new (window.AudioContext || window.webkitAudioContext)(); audioCtx.destination.channelInterpretation = 'discrete'; audioCtx.destination.channelCountMode = 'explicit'; audioCtx.destination.channelCount = 6; var oscillators = []; var merger = audioCtx.createChannelMerger(6); console.log(audioCtx.destination, merger); //merger.channelInterpretation = 'discrete'; //merger.channelCountMode = 'explicit'; //merger.channelCount = 6; var addOscilator = function(channel, frequency) { var oscillator = audioCtx.createOscillator(); oscillator.frequency.value = frequency; // value in hertz oscillator.connect(merger,0,channel); oscillator.start(); oscillators.push(oscillator); }; addOscilator(0,300); addOscilator(1,500); addOscilator(2,700); addOscilator(3,900); addOscilator(4,1100); addOscilator(5,1300); merger.connect(audioCtx.destination); Actual results: Instead of outputting to the surround 6 channels the audio gets downmixed to stereo audio and outputted only on the left and right channel. When i do a console log of the audio context destination the maxChannelCount is 6 and the channelCount is also 6 but i still get only output on the left and right channel. these channels play all the output. (So its downmixed from 5.1 to stereo) I also tried playing a 5.1 surround audiofile in a html-audio element in firefox and this worked fine. In other words, the browser is reconizing and able to output the surround set. Expected results: This example should output a different audio tone on every audio channel of the 5.1 surroundset (6 channels).
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.