[alsa-devel] [PATCH] seq: fix snd_seq_set_queue_tempo() usage example in the documentation

Takashi Sakamoto o-takashi at sakamocchi.jp
Fri Sep 29 04:04:25 CEST 2017


Hi,

On Sep 28 2017 22:46, Antonio Ospite wrote:
> snd_seq_set_queue_tempo() requires a queue id as the second argument,
> fix the example in documentation to reflect that.
> 
> Also add the queue id as an argument of the set_tempo() function, just
> to keep the whole example compilable.
> 
> Signed-off-by: Antonio Ospite <ao2 at ao2.it>
> ---
>   src/seq/seq.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/seq/seq.c b/src/seq/seq.c
> index d5ed1c6a..808c7915 100644
> --- a/src/seq/seq.c
> +++ b/src/seq/seq.c
> @@ -452,13 +452,13 @@ For setting these tempo parameters, use #snd_seq_queue_tempo_t record.
>   For example, to set the tempo of the queue <code>q</code> to
>   48 PPQ, 60 BPM,
>   \code
> -void set_tempo(snd_seq_t *handle)
> +void set_tempo(snd_seq_t *handle, int queue)
>   {
>           snd_seq_queue_tempo_t *tempo;
>           snd_seq_queue_tempo_alloca(&tempo);
>           snd_seq_queue_tempo_set_tempo(tempo, 1000000); // 60 BPM
>           snd_seq_queue_tempo_set_ppq(tempo, 48); // 48 PPQ
> -        snd_seq_set_queue_tempo(handle, tempo);
> +        snd_seq_set_queue_tempo(handle, queue, tempo);
>   }
>   \endcode

This looks good catch for documentation.

Reviewed-by: Takashi Sakamoto <o-takashi at sakamocchi.jp>

Unfortunately, a maintainer of this subsystem is absent this week. Your 
patch is going to put into merge queue after he's back. It may takes a 
bit longer.


Thanks

Takashi Sakamoto


More information about the Alsa-devel mailing list