我有两个音频文件(音乐和语音),我想使用tone.js 通道组件将它们混合在一起。目前我可以同时播放两个文件,如下所示
play()
{
var soundSamples = new ToneAudioBuffers({
Music: "assets/audio/music.mp3",
Voice: "assets/audio/voice.mp3",
}, () => {
const player1 = new Player().toDestination();
const player2 = new Player().toDestination();
// play one of the samples when they all load
player1.buffer = soundSamples.get("Music");
player2.buffer = soundSamples.get("Voice");
//player1.fadeOut= .10;
player1.start();
player2.start();
});
}
我想将这两个音频文件发送到tone.js 频道。
在此先感谢您的任何指点