android - How can i use AudioTrack to play mp3 file and also seek to position -
iam trying develop application can set speed of music file(mp3) set 1x,1.5x,2x,2.5x this.but mediaplayer not support feauture unless 23 api.how can use audiotrack play mp3 file , seek position.the below code gives me "zzzzzzz" sound. public void playaudio(){ int minbuffersize = audiotrack.getminbuffersize(8000, audioformat.channel_configuration_mono, audioformat.encoding_pcm_16bit); int buffersize = 512; audiotrack = new audiotrack(audiomanager.stream_music, 8000, audioformat.channel_configuration_mono, audioformat.encoding_pcm_16bit, minbuffersize, audiotrack.mode_stream); string filepath = environment.getexternalstoragedirectory().getabsolutepath(); int = 0; byte[] s = new byte[buffersize]; try { final string path= environment.getexternalstoragedirectory().getabsolutepath() + "/folioreader/audio"+".mp3"; fileinputstream fin = new fileinputstream(path); data...