I have two audio files(music and voice) and I want to mix these together using tone.js channel component. Currently I am able to play two files simultaneously together as below
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();
});
}
I would like to like to send send these two audio files to tone.js channel.
Thanks in advance for any pointers
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…