mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
add subscription subsystem
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@112 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
fc618e9f31
commit
3d374e9f67
11 changed files with 236 additions and 2 deletions
|
|
@ -34,6 +34,7 @@
|
|||
#include "util.h"
|
||||
#include "sample-util.h"
|
||||
#include "xmalloc.h"
|
||||
#include "subscribe.h"
|
||||
|
||||
#define MAX_MIX_CHANNELS 32
|
||||
|
||||
|
|
@ -77,6 +78,8 @@ struct pa_sink* pa_sink_new(struct pa_core *core, const char *name, int fail, co
|
|||
|
||||
pa_sample_snprint(st, sizeof(st), spec);
|
||||
fprintf(stderr, "sink: created %u \"%s\" with sample spec \"%s\"\n", s->index, s->name, st);
|
||||
|
||||
pa_subscription_post(core, PA_SUBSCRIPTION_EVENT_SINK | PA_SUBSCRIPTION_EVENT_NEW, s->index);
|
||||
|
||||
return s;
|
||||
}
|
||||
|
|
@ -98,6 +101,8 @@ void pa_sink_free(struct pa_sink *s) {
|
|||
pa_idxset_remove_by_data(s->core->sinks, s, NULL);
|
||||
|
||||
fprintf(stderr, "sink: freed %u \"%s\"\n", s->index, s->name);
|
||||
|
||||
pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SINK | PA_SUBSCRIPTION_EVENT_REMOVE, s->index);
|
||||
|
||||
pa_xfree(s->name);
|
||||
pa_xfree(s->description);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue