Wav files to different channels simultaneously



I’m new to using this library. I’m interested in loading four wav files (mono, 96khz, 32 bit) and outputting them simultaneously on four channels on a sound card.

Looking through the documentation I see I can make an AudioFormatReader for a file, send that to an AudioFormatReaderSource and send that to an AudioSourcePlayer which implements the necessary callback. But this doesn’t operate on more than one wav file.

How would I accomplish what I’m looking to do? Thanks



You need to create the AudioFormatReaderSource for all the four wave files.
Now use the MixerAudioSource object and add all AudioFormatReaderSource to this MixerAudioSource object. Now useMixerAudioSource object to the AudioSourcePlaye.

this should work.