[vlc-commits] audiotrack: add pcm device id
Thomas Guillem
git at videolan.org
Wed Mar 8 15:03:17 CET 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Mar 7 18:25:02 2017 +0100| [1f3f317b37caa9ab634efcc7f9aaf0b7ce01a4e4] | committer: Thomas Guillem
audiotrack: add pcm device id
"pcm" should be used instead of "stereo" starting a recent Android Version
(like 21).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1f3f317b37caa9ab634efcc7f9aaf0b7ce01a4e4
---
modules/audio_output/audiotrack.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/audio_output/audiotrack.c b/modules/audio_output/audiotrack.c
index d3209c9..f823adc 100644
--- a/modules/audio_output/audiotrack.c
+++ b/modules/audio_output/audiotrack.c
@@ -55,6 +55,7 @@ static void *AudioTrack_Thread( void * );
* per default */
enum at_dev {
AT_DEV_STEREO = 0,
+ AT_DEV_PCM,
AT_DEV_ENCODED,
};
#define AT_DEV_DEFAULT AT_DEV_STEREO
@@ -66,6 +67,7 @@ static const struct {
enum at_dev at_dev;
} at_devs[] = {
{ "stereo", "Up to 2 channels (compat mode).", AT_DEV_STEREO },
+ { "pcm", "Up to 8 channels.", AT_DEV_PCM },
{ "encoded", "Up to 8 channels, passthrough if available.", AT_DEV_ENCODED },
{ NULL, NULL, AT_DEV_DEFAULT },
};
@@ -1096,7 +1098,7 @@ Start( audio_output_t *p_aout, audio_sample_format_t *restrict p_fmt )
else
{
b_try_passthrough = var_InheritBool( p_aout, "spdif" );
- i_max_channels = 2;
+ i_max_channels = p_sys->at_dev == AT_DEV_STEREO ? 2 : AT_DEV_MAX_CHANNELS;
}
if( !( env = GET_ENV() ) )
More information about the vlc-commits
mailing list