#include "namereg.h"
#include "xmalloc.h"
#include "subscribe.h"
+#include "log.h"
struct pa_source* pa_source_new(struct pa_core *core, const char *name, int fail, const struct pa_sample_spec *spec) {
struct pa_source *s;
assert(s->index != PA_IDXSET_INVALID && r >= 0);
pa_sample_spec_snprint(st, sizeof(st), spec);
- fprintf(stderr, "source: created %u \"%s\" with sample spec \"%s\"\n", s->index, s->name, st);
+ pa_log(__FILE__": created %u \"%s\" with sample spec \"%s\"\n", s->index, s->name, st);
pa_subscription_post(core, PA_SUBSCRIPTION_EVENT_SOURCE | PA_SUBSCRIPTION_EVENT_NEW, s->index);
pa_idxset_remove_by_data(s->core->sources, s, NULL);
- fprintf(stderr, "source: freed %u \"%s\"\n", s->index, s->name);
+ pa_log(__FILE__": freed %u \"%s\"\n", s->index, s->name);
pa_subscription_post(s->core, PA_SUBSCRIPTION_EVENT_SOURCE | PA_SUBSCRIPTION_EVENT_REMOVE, s->index);