[Android] [PATCH] jni/aout: limit sample rate to 48kHz

Rafaël Carré funman at videolan.org
Sat Oct 19 12:11:59 CEST 2013


Hello,

Le 19/10/2013 08:53, Zhang Rui a écrit :
> ---
>  vlc-android/jni/aout.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/vlc-android/jni/aout.c b/vlc-android/jni/aout.c
> index 859509b..a8ae95d 100644
> --- a/vlc-android/jni/aout.c
> +++ b/vlc-android/jni/aout.c
> @@ -79,6 +79,9 @@ int aout_open(void **opaque, char *format, unsigned *rate, unsigned *nb_channels
>      LOGV ("Number of channels forced to 2, number of samples to %d", FRAME_SIZE);
>      *nb_channels = 2;
>  
> +    if (*rate > 48000)
> +        *rate = 48000;

Is the limit documented somewhere?

>      (*p_env)->CallVoidMethod (p_env, p_sys->j_libVlc, methodIdInitAout,
>                                *rate, *nb_channels, FRAME_SIZE);
>      if ((*p_env)->ExceptionCheck (p_env))
> 



More information about the Android mailing list