mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
pass pa_suspend_cause_t to set_state() callbacks
The suspend cause isn't yet used by any of the callbacks. The alsa sink and source will use it to sync the mixer when the SESSION suspend cause is removed. Currently the syncing is done in pa_sink/source_suspend(), and I want to change that, because pa_sink/source_suspend() shouldn't have any alsa specific code.
This commit is contained in:
parent
3da0de5418
commit
6ed37aeef2
17 changed files with 58 additions and 27 deletions
|
|
@ -353,7 +353,7 @@ static int source_process_msg(pa_msgobject *o, int code, void *data, int64_t off
|
|||
return pa_source_process_msg(o, code, data, offset, chunk);;
|
||||
}
|
||||
|
||||
static int ca_sink_set_state(pa_sink *s, pa_sink_state_t state) {
|
||||
static int ca_sink_set_state(pa_sink *s, pa_sink_state_t state, pa_suspend_cause_t suspend_cause) {
|
||||
coreaudio_sink *sink = s->userdata;
|
||||
|
||||
switch (state) {
|
||||
|
|
@ -511,7 +511,7 @@ static int ca_device_create_sink(pa_module *m, AudioBuffer *buf, int channel_idx
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int ca_source_set_state(pa_source *s, pa_source_state_t state) {
|
||||
static int ca_source_set_state(pa_source *s, pa_source_state_t state, pa_suspend_cause_t suspend_cause) {
|
||||
coreaudio_source *source = s->userdata;
|
||||
|
||||
switch (state) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue