I'm looking for to play more than one file at the same time and do some stuff with their buffer (like changing the gain). But I don't know how to do it.
What is the method to do it ?
1°) Do I have to use N-AudioTransportSource to play N tracks? Or do I have to use MixerAudioSource?
2°) When the AudioTransportSource will start, the getNextAudioBlock() method will be called. How do I manage to know where buffer belong to a particular AudioTransportSource?
I'm totally lost, so if you could give a little exemple it will be nice.
Hi. I have the same problem, may someone know solution ? Especially how to get in: void getNextAudioBlock(const AudioSourceChannelInfo& bufferToFill) access to each channel from mixer to be able manipulate each in separate way. For example to change volume…
If you are using AudioTransportSource objects with a MixerAudioSource you can use the AudioTransportSource::setGain() method to change the volume of a source whilst it is being mixed. However if you’re using a custom AudioSource object then you should do your processing in its getNextAudioBlock() method as MixerAudioSource just iterates over each of its AudioSources and calls this.