could you please advice - how can I (using existing JUCE features) play an AudioSampleBuffer with AudioSourcePlayer / AudioTransportSource.
As far as I understand, I should create a PositionableAudioSource for my AudioSampleBuffer, but I can’t find how, and it should be very simple I think - play an audiobuffer with AudioSourcePlayer / AudioTransportSource.
I mean that I can write a the code myself, but it’s better to use something “native” for JUCE I think…
AudioSourcePlayer needs one AudioSource for playback. As AudioSource is abstract class u can override to make MyAudioSource.
And in the pure virtual method
virtual void getNextAudioBlock (const AudioSourceChannelInfo &bufferToFill)=0
u can copy the AudioSampleBuffer ( wat u have ) to the incoming AudioSampleBuffer ( which is there in AudioSourceChannelInfo ).