diff options
author | Lennart Poettering <lennart@poettering.net> | 2007-09-15 14:21:05 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2007-09-15 14:21:05 +0000 |
commit | 8389264d6560d32b3912c60474497742807efbde (patch) | |
tree | 5a9218108ee461f894c1829369e30a7c19788b00 /src/pulsecore/source.h | |
parent | 5ae4eed52e911fb3e9712e1cd7d6095427515cd1 (diff) |
count corked streams per sink/source and make pa_sink_used_by() return only the number of streams that are not corked. Introduce pa_sink_linked_by() returning the number of streams connected at all. This will allow suspending of sinks/sources when all streams connected to a sink are corked.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1824 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/source.h')
-rw-r--r-- | src/pulsecore/source.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pulsecore/source.h b/src/pulsecore/source.h index 0fd14860..4e488a74 100644 --- a/src/pulsecore/source.h +++ b/src/pulsecore/source.h @@ -79,6 +79,7 @@ struct pa_source { pa_channel_map channel_map; pa_idxset *outputs; + unsigned n_corked; pa_sink *monitor_of; /* may be NULL */ pa_cvolume volume; @@ -162,7 +163,8 @@ const pa_cvolume *pa_source_get_volume(pa_source *source); void pa_source_set_mute(pa_source *source, int mute); int pa_source_get_mute(pa_source *source); -unsigned pa_source_used_by(pa_source *s); +unsigned pa_source_linked_by(pa_source *s); /* Number of connected streams */ +unsigned pa_source_used_by(pa_source *s); /* Number of connected streams that are not corked */ #define pa_source_get_state(s) ((pa_source_state_t) (s)->state) /* To be called exclusively by the source driver, from IO context */ |