From 878fea16a2d7a319e59a0d7b4d470b0e3b1e42fb Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 16 Aug 2004 23:17:43 +0000 Subject: fix source output and sink input updateing git-svn-id: file:///home/lennart/svn/public/paman/trunk@14 cdefa82f-4ce1-0310-97f5-ab6066f37c3c --- src/ServerInfoManager.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/ServerInfoManager.cc') diff --git a/src/ServerInfoManager.cc b/src/ServerInfoManager.cc index f271354..1f454eb 100644 --- a/src/ServerInfoManager.cc +++ b/src/ServerInfoManager.cc @@ -206,9 +206,9 @@ SourceOutputInfo::SourceOutputInfo(const struct pa_source_output_info &i) : name(i.name), index(i.index), sample_spec(i.sample_spec), - source(source), - client(client), - owner_module(owner_module), + source(i.source), + client(i.client), + owner_module(i.owner_module), window(NULL) { } @@ -218,8 +218,8 @@ SourceOutputInfo::~SourceOutputInfo() { } void SourceOutputInfo::update(const struct pa_source_output_info &i) { - index = i.index; name = i.name; + index = i.index; sample_spec = i.sample_spec; source = i.source; client = i.client; @@ -296,7 +296,7 @@ static void source_output_info_callback(struct pa_context *c, const struct pa_so static void subscribe_callback(struct pa_context *c, enum pa_subscription_event_type t, uint32_t index, void *userdata) { ServerInfoManager *si = (ServerInfoManager*) userdata; - //fprintf(stderr, "EV: %u %u\n", t, index); +// fprintf(stderr, "EV: %u %u\n", t, index); switch (t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) { case PA_SUBSCRIPTION_EVENT_SINK: @@ -396,6 +396,7 @@ void ServerInfoManager::updateInfo(const struct pa_sink_info &i) { void ServerInfoManager::updateInfo(const struct pa_source_info &i) { SourceInfo *si; + if ((si = sources[i.index])) si->update(i); else { -- cgit