OpenSL, playing different sound clips at the same time with android ndk? -


i wanting use native android ndk , opensl es play multiple sounds simultaneously. i've taken @ native-audio example in ndk haven't been able figure out how generalize can play different audio clips, possibly @ same time. of examples i've been able find online via last 50 or search attempts i've made google seem dependent on additional code such third party library, written in java (i searching native solution), or else don't seem designed handle multiple sounds @ once.

if makes difference how approach this, each sound wanting play, have raw pcm data (little endian) in memory ready played, , each 1 know sampling rate, bits per sample (8 or 16), , number of channels (either 1 or 2).

any assistance can offer appreciated. in advance.

you can create multiple simple buffer queue audioplayers. should have mechanism know when queue has finished playing can utilize free ones pool. can use callback mechanism that. native-audio example covers callback.


Comments