OpenSL channel selection

130 views Asked by At

I have to play a single channel from an ogg file under Android. After a lot of searching, I think I found out a strategy.

Using OpenSL, I decode the file to PCM using something like this. Then I should copy the selected channel from the PCM buffer into another buffer linked to the OutputMix, using something like this.

Is this the best option? Is there something already available to look at?

Thank you.

1

There are 1 answers

0
neclepsio On BEST ANSWER

I solved using non-native code based on OpenMXPlayer.

Update: The general idea is to use MediaCodec to decode the file to memory, than modify the data in memory, than send it to an AudioTrack.