mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-02-21 01:40:34 -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
|
|
@ -99,7 +99,7 @@ DEFINE_RESAMPLER(full,arch) \
|
|||
float *d = dst[c]; \
|
||||
\
|
||||
index = ioffs; \
|
||||
phase = data->phase; \
|
||||
phase = (uint32_t)data->phase; \
|
||||
\
|
||||
for (o = ooffs; o < olen && index + n_taps <= ilen; o++) { \
|
||||
inner_product_##arch(&d[o], &s[index], \
|
||||
|
|
@ -117,12 +117,12 @@ DEFINE_RESAMPLER(full,arch) \
|
|||
DEFINE_RESAMPLER(inter,arch) \
|
||||
{ \
|
||||
struct native_data *data = r->data; \
|
||||
uint32_t index, stride = data->filter_stride; \
|
||||
uint32_t index, stride = data->filter_stride; \
|
||||
uint32_t n_phases = data->n_phases, out_rate = data->out_rate; \
|
||||
uint32_t n_taps = data->n_taps; \
|
||||
uint32_t c, o, olen = *out_len, ilen = *in_len; \
|
||||
uint32_t inc = data->inc, frac = data->frac; \
|
||||
float phase; \
|
||||
float phase; \
|
||||
\
|
||||
if (r->channels == 0) \
|
||||
return; \
|
||||
|
|
@ -135,8 +135,8 @@ DEFINE_RESAMPLER(inter,arch) \
|
|||
phase = data->phase; \
|
||||
\
|
||||
for (o = ooffs; o < olen && index + n_taps <= ilen; o++) { \
|
||||
float ph = phase * n_phases / out_rate; \
|
||||
uint32_t offset = floorf(ph); \
|
||||
float ph = phase * n_phases / out_rate; \
|
||||
uint32_t offset = (uint32_t)floorf(ph); \
|
||||
inner_product_ip_##arch(&d[o], &s[index], \
|
||||
&data->filter[(offset + 0) * stride], \
|
||||
&data->filter[(offset + 1) * stride], \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue