mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -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
|
|
@ -248,7 +248,7 @@ static void capture_destroy(void *d)
|
|||
|
||||
static void recalculate_delay(struct impl *impl)
|
||||
{
|
||||
uint32_t target = impl->rate * impl->target_delay, cdelay, pdelay;
|
||||
uint32_t target = (uint32_t)(impl->rate * impl->target_delay), cdelay, pdelay;
|
||||
uint32_t delay, w;
|
||||
struct pw_time pwt;
|
||||
|
||||
|
|
@ -435,7 +435,7 @@ static void param_format_changed(struct impl *impl, const struct spa_pod *param,
|
|||
static void recalculate_buffer(struct impl *impl)
|
||||
{
|
||||
if (impl->target_delay > 0.0f && impl->channels > 0 && impl->rate > 0) {
|
||||
uint32_t delay = impl->rate * impl->target_delay;
|
||||
uint32_t delay = (uint32_t)(impl->rate * impl->target_delay);
|
||||
void *data;
|
||||
|
||||
impl->buffer_size = (delay + (1u<<15)) * 4;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue