Commit f4a214fd authored by Sébastien Toque's avatar Sébastien Toque

AudioFormat.CHANNEL_CONFIGURATION_STEREO is deprecated

parent cd769ec1
......@@ -42,11 +42,11 @@ public class Aout {
public void init(int sampleRateInHz, int channels, int samples) {
Log.d(TAG, sampleRateInHz + ", " + channels + ", " + samples + "=>" + channels * samples);
int minBufferSize = AudioTrack.getMinBufferSize(sampleRateInHz,
AudioFormat.CHANNEL_CONFIGURATION_STEREO,
AudioFormat.CHANNEL_OUT_STEREO,
AudioFormat.ENCODING_PCM_16BIT);
mAudioTrack = new AudioTrack(AudioManager.STREAM_MUSIC,
sampleRateInHz,
AudioFormat.CHANNEL_CONFIGURATION_STEREO,
AudioFormat.CHANNEL_OUT_STEREO,
AudioFormat.ENCODING_PCM_16BIT,
Math.max(minBufferSize, channels * samples * 2),
AudioTrack.MODE_STREAM);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment