mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-01 22:58:47 -04:00
core: svolume tests should generate realistic random volume data
assuming RAND_MAX is around 1<<31, rand() >> 1 generates large numbers as random volume data; these likely causes saturated sample values after applying the volume function -- not a good test
This commit is contained in:
parent
ee3e93c841
commit
d103f3a97a
4 changed files with 4 additions and 4 deletions
|
|
@ -75,7 +75,7 @@ static void run_test(void) {
|
|||
memcpy(samples_orig, samples, sizeof(samples));
|
||||
|
||||
for (i = 0; i < CHANNELS; i++)
|
||||
volumes[i] = PA_CLAMP_VOLUME(rand() >> 1);
|
||||
volumes[i] = PA_CLAMP_VOLUME(rand() >> 15);
|
||||
for (padding = 0; padding < PADDING; padding++, i++)
|
||||
volumes[i] = volumes[padding];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue