Commit f862cf03 authored by Thomas Guillem's avatar Thomas Guillem

MediaPlayer: don't try multi channels PCM by default

AudioTrack will say it support multi channels but it will just cut every
channels after 2.0. That's why we could not hear the voice with some medias on
some devices (Nexus 6p, Chrome book).

Fixes #800
parent 2e78a8de
......@@ -504,7 +504,10 @@ public class MediaPlayer extends VLCObject<MediaPlayer.Event> {
for (int i = 0; i < mEncodedDevices.size(); ++i)
encodingFlags |= mEncodedDevices.valueAt(i);
updateAudioOutputDevice(encodingFlags, "pcm");
/* Very simple assumption: force stereo PCM if the audio device doesn't support
* any encoded codecs. */
final String defaultDevice = encodingFlags == 0 ? "stereo" : "pcm";
updateAudioOutputDevice(encodingFlags, defaultDevice);
}
@RequiresApi(Build.VERSION_CODES.M)
......
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