mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
spa: audioconvert: use SPA_N_ELEMENTS in noise_init()
This commit is contained in:
parent
a745374232
commit
43f7831d14
1 changed files with 2 additions and 2 deletions
|
|
@ -64,13 +64,13 @@ static void impl_noise_free(struct noise *ns)
|
|||
int noise_init(struct noise *ns)
|
||||
{
|
||||
const struct noise_info *info;
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
info = find_noise_info(ns->cpu_flags);
|
||||
if (info == NULL)
|
||||
return -ENOTSUP;
|
||||
|
||||
for (i = 0; i < NOISE_SIZE; i++)
|
||||
for (i = 0; i < SPA_N_ELEMENTS(ns->tab); i++)
|
||||
ns->tab[i] = (drand48() - 0.5) / (1 << ns->intensity);
|
||||
|
||||
ns->free = impl_noise_free;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue