I am trying to retrieve the channel count of a .wav sound file using TrackInfo
and MediaFormat
but I cant seem to get a handle of a MediaFormat
object which i believe would provide the channel count.
I have tried following this instruction but it is not helping.
here is what I have so far
mediaPlayer = new MediaPlayer();
mediaPlayer.setDataSource(soundPath);
mediaPlayer.prepare();
TrackInfo info = mediaPlayer.getTrackInfo()[0];
MediaFormat mf =