像标题一样,我想知道是否有什么可以允许我做的。 在javascript中,我使用了webAudio API createChannelSplitter()方法:
var ac = new (window.AudioContext || window.webkitAudioContext)();
var source = ac.createMediaElementSource(this.Video);
var gains = [];
var panners = [];
var analysers = [];
for (var i = 0; i < 6; i++) {
gains[i] = ac.createGain();
panners[i] = ac.createPanner();
analysers[i] = ac.createAnalyser();
}
var splitter = ac.createChannelSplitter(6);//this method will split my audio source to 5.1
this.Video.addEventListener('loadeddata', function () {
source.connect(splitter);
for (var i = 0; i < 6; i++) {
splitter.connect(gains[i], i);
gains[i].connect(panners[i]);
panners[i].connect(analysers[i]);
analysers[i].connect(ac.destination);
panners[i].setPosition(0.1, 0, 0.1);
}
}
Android和IOS中的相同内容如何?