From: Takashi Iwai <tiwai@suse.de>
To: Christophe Lohr <christophe.lohr@cegetel.net>
Cc: alsa-devel@alsa-project.org
Subject: Re: Remarks about alsa-lib-1.0.29/test/pcm*.c
Date: Mon, 01 Jun 2015 13:47:31 +0200 [thread overview]
Message-ID: <s5hd21fhcq4.wl-tiwai@suse.de> (raw)
In-Reply-To: <556AF5BE.1070409@cegetel.net>
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
prev parent reply other threads:[~2015-06-01 11:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-31 11:51 Remarks about alsa-lib-1.0.29/test/pcm*.c Christophe Lohr
2015-06-01 11:47 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s5hd21fhcq4.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=christophe.lohr@cegetel.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox