]> git.alsa-project.org Git - alsa-lib.git/commitdiff
test/pcm: Fix generated values with float PCM format
authorChristophe Lohr <christophe.lohr@cegetel.net>
Mon, 1 Jun 2015 11:41:49 +0000 (13:41 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 1 Jun 2015 11:42:56 +0000 (13:42 +0200)
The float format should be generated [-1.0..1.0].

Signed-off-by: Takashi Iwai <tiwai@suse.de>
test/pcm.c

index abb83e4c30140002de8f938eb92d2809d3034450..18b61762b236854f8b83597a4ed4df19612af6f6 100644 (file)
@@ -68,7 +68,7 @@ static void generate_sine(const snd_pcm_channel_area_t *areas,
                } fval;
                int res, i;
                if (is_float) {
-                       fval.f = sin(phase) * maxval;
+                       fval.f = sin(phase);
                        res = fval.i;
                } else
                        res = sin(phase) * maxval;