mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
Fix compilation with -Werror=float-conversion
Better make the conversions explicit so that we don't get any surprises. Fixes #4065
This commit is contained in:
parent
50870aac57
commit
1ae4374ccf
71 changed files with 286 additions and 284 deletions
|
|
@ -63,7 +63,7 @@ static void on_process(void *userdata)
|
|||
for (n = c; n < n_samples; n += n_channels)
|
||||
max = fmaxf(max, fabsf(samples[n]));
|
||||
|
||||
peak = SPA_CLAMP(max * 30, 0, 39);
|
||||
peak = (uint32_t)SPA_CLAMPF(max * 30, 0.f, 39.f);
|
||||
|
||||
fprintf(stdout, "channel %d: |%*s%*s| peak:%f\n",
|
||||
c, peak+1, "*", 40 - peak, "", max);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue