[vlc-devel] [PATCH] amem: fix inconsistency in supported sampling rate

Farid HAMMANE farid.hammane at gmail.com
Thu Jan 2 08:01:49 CET 2020


Hi Tristan,

My first intention was to commit this patch on vlc-3.0 where the sampling
rate is still at 352800.I will increase it to 384k. But, should I first
create the patch for vlc.git, then doing a backport to vlc-3.0.git? Or just
send it for vlc-3.0? In the latter case, how should I specify that a patch
is intended for vlc-3.0?

Thank you in advance for your answers

Best regards
Farid

On Thu, Jan 2, 2020 at 4:54 AM Tristan Matthews <tmatth at videolan.org> wrote:

> Hi
>
> On Wed, Jan 1, 2020 at 4:09 PM Farid Hammane <farid.hammane at gmail.com>
> wrote:
> >
> > fixes a consistency issue between the module
> > descriptor and the test that ensures that the
> > sample rate is supported.
> > ---
> >  modules/audio_output/amem.c | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/modules/audio_output/amem.c b/modules/audio_output/amem.c
> > index b2d3d37f7e..35988a600f 100644
> > --- a/modules/audio_output/amem.c
> > +++ b/modules/audio_output/amem.c
> > @@ -30,6 +30,8 @@
> >  static int Open (vlc_object_t *);
> >  static void Close (vlc_object_t *);
> >
> > +#define AMEM_SAMPLE_RATE_MAX 352800
> > +
> >  vlc_module_begin ()
> >      set_shortname (N_("Audio memory"))
> >      set_description (N_("Audio memory output"))
> > @@ -43,7 +45,7 @@ vlc_module_begin ()
> >          change_private()
> >      add_integer ("amem-rate", 44100,
> >                   N_("Sample rate"), N_("Sample rate"), false)
> > -        change_integer_range (1, 352800)
> > +        change_integer_range (1, AMEM_SAMPLE_RATE_MAX)
> >          change_private()
> >      add_integer ("amem-channels", 2,
> >                   N_("Channels count"), N_("Channels count"), false)
> > @@ -186,7 +188,7 @@ static int Start (audio_output_t *aout,
> audio_sample_format_t *fmt)
> >          sys->set_volume(sys->opaque, sys->volume, sys->mute);
> >
> >      /* Ensure that format is supported */
> > -    if (fmt->i_rate == 0 || fmt->i_rate > 192000
> > +    if (fmt->i_rate == 0 || fmt->i_rate > AMEM_SAMPLE_RATE_MAX
> >       || channels == 0 || channels > AOUT_CHAN_MAX
> >       || strcmp(format, "S16N") /* TODO: amem-format */)
> >      {
> > --
> > 2.20.1
> >
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
>
> This doesn't apply on master, see:
>
> http://git.videolan.org/?p=vlc.git;a=blob;f=modules/audio_output/amem.c;h=9d21412f072b0fb8d1e0c9c1ca7c30b1489d4fc9;hb=bab14fed971d56417cd5faa6a00e36933bbf23fc
>
> Note that the upper bound was recently increased to 384000
>
> Best,
> -t
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20200102/cb2396fb/attachment.html>


More information about the vlc-devel mailing list