mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
devices: Use wrapper functions to set the *_volume and *_mute callbacks.
This is not currently useful but future commits will make further changes concerning automatic setting of flags and event delivery that makes this structure necessary.
This commit is contained in:
parent
8840ebf9c3
commit
ded07a5898
17 changed files with 175 additions and 67 deletions
|
|
@ -449,6 +449,36 @@ static int sink_set_state(pa_sink *s, pa_sink_state_t state) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void pa_sink_set_get_volume_callback(pa_sink *s, pa_sink_cb_t cb) {
|
||||
pa_assert(s);
|
||||
|
||||
s->get_volume = cb;
|
||||
}
|
||||
|
||||
void pa_sink_set_set_volume_callback(pa_sink *s, pa_sink_cb_t cb) {
|
||||
pa_assert(s);
|
||||
|
||||
s->set_volume = cb;
|
||||
}
|
||||
|
||||
void pa_sink_set_write_volume_callback(pa_sink *s, pa_sink_cb_t cb) {
|
||||
pa_assert(s);
|
||||
|
||||
s->write_volume = cb;
|
||||
}
|
||||
|
||||
void pa_sink_set_get_mute_callback(pa_sink *s, pa_sink_cb_t cb) {
|
||||
pa_assert(s);
|
||||
|
||||
s->get_mute = cb;
|
||||
}
|
||||
|
||||
void pa_sink_set_set_mute_callback(pa_sink *s, pa_sink_cb_t cb) {
|
||||
pa_assert(s);
|
||||
|
||||
s->set_mute = cb;
|
||||
}
|
||||
|
||||
/* Called from main context */
|
||||
void pa_sink_put(pa_sink* s) {
|
||||
pa_sink_assert_ref(s);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue