mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Use ENCODING_PCM_16BIT for keepSessionIdAudioTrack.
ENCODING_PCM_8BIT support is not required.
This commit is contained in:
parent
e4e6a1caf0
commit
3f1638de95
1 changed files with 2 additions and 2 deletions
|
|
@ -292,8 +292,8 @@ public final class AudioTrack {
|
|||
if (keepSessionIdAudioTrack == null) {
|
||||
int sampleRate = 4000; // Equal to private android.media.AudioTrack.MIN_SAMPLE_RATE.
|
||||
int channelConfig = AudioFormat.CHANNEL_OUT_MONO;
|
||||
int encoding = AudioFormat.ENCODING_PCM_8BIT;
|
||||
int bufferSize = 1; // Use a one byte buffer, as it is not actually used for playback.
|
||||
int encoding = AudioFormat.ENCODING_PCM_16BIT;
|
||||
int bufferSize = 2; // Use a two byte buffer, as it is not actually used for playback.
|
||||
keepSessionIdAudioTrack = new android.media.AudioTrack(AudioManager.STREAM_MUSIC,
|
||||
sampleRate, channelConfig, encoding, bufferSize, android.media.AudioTrack.MODE_STATIC,
|
||||
sessionId);
|
||||
|
|
|
|||
Loading…
Reference in a new issue