Android AudioTrack.write() returns -38 -
int bufsizemin = audiotrack.getminbuffersize( 44100, audioformat.channel_out_stereo, audioformat.encoding_pcm_16bit); audiotrack = new audiotrack( audiomanager.stream_music, 44100, audioformat.channel_out_stereo, audioformat.encoding_pcm_16bit, bufsizemin, audiotrack.mode_stream); short[] audiodata = new short[2000]; int writecount = audiotrack.write(audiodata, 0, audiodata.length);
sometime returns 2000 (length of audiodata) , -38. it should return 0 or positive values or -1 -2 or -3 if error generated. -38? please help..
Comments
Post a Comment