summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChristophe Lohr <christophe.lohr@cegetel.net>2015-06-01 13:41:49 +0200
committerTakashi Iwai <tiwai@suse.de>2015-06-01 13:42:56 +0200
commit9120f2de8608f49ee1cd4501b9eee39a1c71778f (patch)
tree97c1284891af5b9d878371d1150289446ce10994 /test
parent67f73b0fab466e780dcc0442e19894a1cbedc43b (diff)
downloadalsa-lib-9120f2de8608f49ee1cd4501b9eee39a1c71778f.tar.gz
test/pcm: Fix generated values with float PCM format
The float format should be generated [-1.0..1.0]. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'test')
-rw-r--r--test/pcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/pcm.c b/test/pcm.c
index abb83e4c..18b61762 100644
--- a/test/pcm.c
+++ b/test/pcm.c
@@ -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;