mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2026-02-10 04:27:45 -05:00
bluetooth: Move HSP_MAX_GAIN to header for reuse in n_volume_steps
Instead of hardcoding the number `16`, use `HSP_MAX_GAIN + 1`. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/239>
This commit is contained in:
parent
dbaf450394
commit
c098a75d10
3 changed files with 4 additions and 4 deletions
|
|
@ -930,7 +930,7 @@ static void source_setup_volume_callback(pa_source *s) {
|
|||
pa_source_set_soft_volume(s, NULL);
|
||||
|
||||
pa_source_set_set_volume_callback(s, source_set_volume_cb);
|
||||
s->n_volume_steps = 16;
|
||||
s->n_volume_steps = HSP_MAX_GAIN + 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1146,7 +1146,7 @@ static void sink_setup_volume_callback(pa_sink *s) {
|
|||
pa_sink_set_soft_volume(s, NULL);
|
||||
|
||||
pa_sink_set_set_volume_callback(s, sink_set_volume_cb);
|
||||
s->n_volume_steps = 16;
|
||||
s->n_volume_steps = HSP_MAX_GAIN + 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue