selectAudioTrack

Selects an audio track during playback.

int selectAudioTrack(int index);

After obtaining the track index of the audio file, you can call this method to select a specific audio track for playback. For example, if different tracks in a multi-track file contain audio in different languages, you can call this method to set the playback language.

Note: selectAudioTrack must be called after obtaining the audio stream index via getStreamInfo.

Parameters

index
The index of the audio track.

Return Values

  • 0: The method call succeeds.
  • < 0: The method call fails.