From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: Remarks about alsa-lib-1.0.29/test/pcm*.c Date: Mon, 01 Jun 2015 13:47:31 +0200 Message-ID: References: <556AF5BE.1070409@cegetel.net> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id F36C326043E for ; Mon, 1 Jun 2015 13:47:31 +0200 (CEST) In-Reply-To: <556AF5BE.1070409@cegetel.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Christophe Lohr Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Sun, 31 May 2015 13:51:26 +0200, Christophe Lohr wrote: > > Hello, > I'm looking about examples in alsa-lib-1.0.29/test/ > > I have two questions about: > > pcm.c line 71: In case of a FLOAT format, maxval is 1.0, isn't it? > > pcm_min.c lin 79: Variable err does not refers to the previous call? > > Did I understood well? Yes, both are correct fixes. Now I merged to git tree. Thanks! Takashi > > Best regards > Christophe > diff -uprN alsa-lib-1.0.29.origin/test/pcm.c alsa-lib-1.0.29/test/pcm.c > --- alsa-lib-1.0.29.origin/test/pcm.c 2015-02-26 13:34:52.000000000 +0100 > +++ alsa-lib-1.0.29/test/pcm.c 2015-05-31 13:36:42.806463600 +0200 > @@ -68,7 +68,7 @@ static void generate_sine(const snd_pcm_ > } fval; > int res, i; > if (is_float) { > - fval.f = sin(phase) * maxval; > + fval.f = sin(phase); > res = fval.i; > } else > res = sin(phase) * maxval; > diff -uprN alsa-lib-1.0.29.origin/test/pcm_min.c alsa-lib-1.0.29/test/pcm_min.c > --- alsa-lib-1.0.29.origin/test/pcm_min.c 2015-02-26 13:34:52.000000000 +0100 > +++ alsa-lib-1.0.29/test/pcm_min.c 2015-05-31 13:38:58.166156767 +0200 > @@ -39,7 +39,7 @@ int main(void) > if (frames < 0) > frames = snd_pcm_recover(handle, frames, 0); > if (frames < 0) { > - printf("snd_pcm_writei failed: %s\n", snd_strerror(err)); > + printf("snd_pcm_writei failed: %s\n", snd_strerror(frames)); > break; > } > if (frames > 0 && frames < (long)sizeof(buffer)) > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel