Web audio api 5.1 surround example not working in firefox

RESOLVED DUPLICATE of bug 1378070

Status

()

Core
Web Audio
RESOLVED DUPLICATE of bug 1378070
10 months ago
10 months ago

People

(Reporter: tomvalkeneers, Unassigned)

Tracking

54 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

10 months ago
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
Last Resolved: 10 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1378070
You need to log in before you can comment on or make changes to this bug.