From patchwork Thu Sep 28 13:46:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Ospite X-Patchwork-Id: 9976165 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A95286037E for ; Thu, 28 Sep 2017 13:46:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9AF7B295FB for ; Thu, 28 Sep 2017 13:46:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D82D295FE; Thu, 28 Sep 2017 13:46:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 39A39295FB for ; Thu, 28 Sep 2017 13:46:57 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id D3A6E267374; Thu, 28 Sep 2017 15:46:53 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id A0658267377; Thu, 28 Sep 2017 15:46:52 +0200 (CEST) Received: from smtp205.alice.it (smtp205.alice.it [82.57.200.101]) by alsa0.perex.cz (Postfix) with ESMTP id C3F84267373 for ; Thu, 28 Sep 2017 15:46:50 +0200 (CEST) Received: from jcn (87.10.139.70) by smtp205.alice.it (8.6.060.28) id 59C3CE95014CADC4; Thu, 28 Sep 2017 15:46:50 +0200 Received: from ao2 by jcn with local (Exim 4.89) (envelope-from ) id 1dxZ9M-0005Om-6X; Thu, 28 Sep 2017 15:46:48 +0200 From: Antonio Ospite To: alsa-devel@alsa-project.org Date: Thu, 28 Sep 2017 15:46:15 +0200 Message-Id: <20170928134615.20712-1-ao2@ao2.it> X-Mailer: git-send-email 2.14.2 X-Face: z*RaLf`X<@C75u6Ig9}{oW$H; 1_\2t5)({*|jhM/Vb; ]yA5\I~93>J<_`<4)A{':UrE Cc: Takashi Iwai , Antonio Ospite Subject: [alsa-devel] [alsa-lib][PATCH] seq: fix snd_seq_set_queue_tempo() usage example in the documentation X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Takashi Sakamoto --- 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 q 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