Android AudioTrack playing .wav file, getting only white noise
问题 When I play a file with the following code: private void PlayAudioFileViaAudioTrack(int ResId) throws IOException { int intSize = android.media.AudioTrack.getMinBufferSize(11025, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT); AudioTrack at = new AudioTrack(AudioManager.STREAM_MUSIC, 11025, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT, intSize, AudioTrack.MODE_STREAM); int count = 256 * 1024; // 256 kb byte[] byteData = null; byteData = new