mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-22 08:56:52 -05:00
* introduce new functions pa_sink_set_description() and pa_source_set_description() for changing the description of a sink/source
* allow sinks without monitor sources attached git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1203 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
0aebc03d1a
commit
c90dd53268
4 changed files with 69 additions and 10 deletions
|
|
@ -313,3 +313,19 @@ int pa_source_get_mute(pa_source *s, pa_mixer_t m) {
|
|||
} else
|
||||
return s->sw_muted;
|
||||
}
|
||||
|
||||
void pa_source_set_description(pa_source *s, const char *description) {
|
||||
assert(s);
|
||||
assert(s->ref >= 1);
|
||||
|
||||
if (!description && !s->description)
|
||||
return;
|
||||
|
||||
if (description && s->description && !strcmp(description, s->description))
|
||||
return;
|
||||
|
||||
pa_xfree(s->description);
|
||||
s->description = pa_xstrdup(description);
|
||||
|
||||
pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE|PA_SUBSCRIPTION_EVENT_CHANGE, s->index);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue