alsa/0017-test-pcm-Fix-generated-values-with-float-PCM-format.patch
Stanislav Brabec 8cda421087 Accepting request 312533 from home:tiwai:branches:multimedia:libs
- Backport upstream fixes: fix bogus assert() in hw_params, a few
  PCM dmix/dshare/dsnoop fixes, enhacement of amixer, etc:
  0017-test-pcm-Fix-generated-values-with-float-PCM-format.patch
  0018-test-pcm_min-Fix-error-messages.patch
  0019-pcm-Don-t-assert-in-_snd_pcm_hw_params_internal.patch
  0020-pcm-Fix-snd_pcm_status-for-dmix-co.patch
  0021-control-Allow-cset-ing-specific-values-in-the-multi-.patch
  0022-PCM-snd_pcm_xxxx_drain-maybe-blocked-after-suspend-a.patch

OBS-URL: https://build.opensuse.org/request/show/312533
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=183
2015-06-18 18:33:24 +00:00

29 lines
763 B
Diff

From 9120f2de8608f49ee1cd4501b9eee39a1c71778f Mon Sep 17 00:00:00 2001
From: Christophe Lohr <christophe.lohr@cegetel.net>
Date: Mon, 1 Jun 2015 13:41:49 +0200
Subject: [PATCH] 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>
---
test/pcm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/pcm.c b/test/pcm.c
index abb83e4c3014..18b61762b236 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;
--
2.4.3