javascript - Web audio api 5.1 surround example not working in firefox -


i've been playing lott lately web audio api on both firefox , chrome. few days ago started experiment surround set. when trying surround audio in web audio api came notice example works fine in chrome v59 not in firefox v54.

// 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); 

when console log of audio context destination maxchannelcount 6 , channelcount 6 still output on left , right channel. these channels play output. (so downmixed 5.1 stereo)

i tried playing 5.1 surround audiofile in html-audio element in firefox , worked fine. in other words, browser reconizing , able output o surround set.

am doing wrong in example or feature not yet implemented firefox(because web audio api still draft)? can't find reports think fault on side, inconsitency between browsers makes me doubt.

thanks in advance

after deeper research turned out bug in firefox v54.

https://bugzilla.mozilla.org/show_bug.cgi?id=1378070

the channels processed in end down mixed stereo. mozilla @ time of writing working on fix.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -