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>
This commit is contained in:
Christophe Lohr 2015-06-01 13:41:49 +02:00 committed by Takashi Iwai
parent 67f73b0fab
commit 9120f2de86

View 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;