mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
sconv: Fix generation of floats in SSE test code
the random floats x should be zero-mean with -(1+eps)<x<(1+eps) for some small epsilon; previously only negative x were generated
This commit is contained in:
parent
66d2f15f90
commit
c6e6d682ed
1 changed files with 1 additions and 1 deletions
|
|
@ -182,7 +182,7 @@ static void run_test(void) {
|
||||||
memset(samples, 0, sizeof(samples));
|
memset(samples, 0, sizeof(samples));
|
||||||
|
|
||||||
for (i = 0; i < SAMPLES; i++) {
|
for (i = 0; i < SAMPLES; i++) {
|
||||||
floats[i] = (rand()/(RAND_MAX+2.2)) - 1.1;
|
floats[i] = 2.1f * (rand()/(float) RAND_MAX - 0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
func = pa_get_convert_from_float32ne_function(PA_SAMPLE_S16LE);
|
func = pa_get_convert_from_float32ne_function(PA_SAMPLE_S16LE);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue