mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
bluez5: fix volume ids
Node ids don't map directly to volume ids. Fix the indexing.
This commit is contained in:
parent
b15ec9bec9
commit
bbe1587f71
2 changed files with 19 additions and 7 deletions
|
|
@ -3608,9 +3608,13 @@ fail:
|
|||
static int transport_set_volume(void *data, int id, float volume)
|
||||
{
|
||||
struct spa_bt_transport *transport = data;
|
||||
struct spa_bt_transport_volume *t_volume = &transport->volumes[id];
|
||||
struct spa_bt_transport_volume *t_volume;
|
||||
uint16_t value;
|
||||
|
||||
spa_assert(id >= 0 && id < (int)SPA_N_ELEMENTS(transport->volumes));
|
||||
|
||||
t_volume = &transport->volumes[id];
|
||||
|
||||
if (!t_volume->active || !spa_bt_transport_volume_enabled(transport))
|
||||
return -ENOTSUP;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue