0

I would like to read an audio file and process the buffer while it is read. I am thinking about making an AudioPlayer (CreateAudioPlayer) with file as source and a buffer as sink. Then another AudioPlayer with a buffer as source and the outputmix as sink...and passing the buffer from one to the other while it is read.

Would this be correct ? Is there some available source code doing this? It is a pretty standard audio task but I can't find any example. I am working on Android but any OpenSL example doing this would work.

Cyril
  • 415
  • 1
  • 4
  • 8
  • there is an audio example with OpenSL in the NDK samples. – Decoy Aug 05 '14 at 08:17
  • Deacoy, could you specify please? I could find the example to read a file into the outputMix, but I don't get how to access the buffer data while it is played. thanks ! – Cyril Aug 05 '14 at 08:20
  • Maybe this will help : http://stackoverflow.com/questions/10770979/is-it-possible-to-get-a-byte-buffer-directly-from-an-audio-asset-in-opensl-es-f – Decoy Aug 05 '14 at 08:23

0 Answers0