11 struct core* core_new(struct pa_mainloop_api *m) {
13 c = malloc(sizeof(struct core));
17 c->clients = idxset_new(NULL, NULL);
18 c->sinks = idxset_new(NULL, NULL);
19 c->sources = idxset_new(NULL, NULL);
20 c->source_outputs = idxset_new(NULL, NULL);
21 c->sink_inputs = idxset_new(NULL, NULL);
23 c->default_source_index = c->default_sink_index = IDXSET_INVALID;
31 void core_free(struct core *c) {
37 assert(idxset_isempty(c->clients));
38 idxset_free(c->clients, NULL, NULL);
40 assert(idxset_isempty(c->sinks));
41 idxset_free(c->sinks, NULL, NULL);
43 assert(idxset_isempty(c->sources));
44 idxset_free(c->sources, NULL, NULL);
46 assert(idxset_isempty(c->source_outputs));
47 idxset_free(c->source_outputs, NULL, NULL);
49 assert(idxset_isempty(c->sink_inputs));
50 idxset_free(c->sink_inputs, NULL, NULL);