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:
Wim Taymans 2024-06-18 12:17:56 +02:00
parent 50870aac57
commit 1ae4374ccf
71 changed files with 286 additions and 284 deletions

View file

@ -3172,7 +3172,7 @@ static void spa_bt_transport_volume_changed(struct spa_bt_transport *transport)
if (t_volume->hw_volume != t_volume->new_hw_volume) {
t_volume->hw_volume = t_volume->new_hw_volume;
t_volume->volume = spa_bt_volume_hw_to_linear(t_volume->hw_volume,
t_volume->volume = (float)spa_bt_volume_hw_to_linear(t_volume->hw_volume,
t_volume->hw_volume_max);
spa_log_debug(monitor->log, "transport %p: volume changed %d(%f) ",
transport, t_volume->new_hw_volume, t_volume->volume);