diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-05-14 02:44:38 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-05-14 02:44:38 +0000 |
commit | 37813d97452095b87cb160a21f52b9bdea5c50fb (patch) | |
tree | 50e220c545717fd3ef317060754b7dc39fa3222c | |
parent | 787b8696943ba3683486a9efcf729cb92e70ce39 (diff) |
modernizations
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2421 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r-- | src/modules/module-jack-sink.c | 6 | ||||
-rw-r--r-- | src/modules/module-jack-source.c | 4 | ||||
-rw-r--r-- | src/modules/module-null-sink.c | 2 | ||||
-rw-r--r-- | src/modules/module-pipe-source.c | 2 |
4 files changed, 5 insertions, 9 deletions
diff --git a/src/modules/module-jack-sink.c b/src/modules/module-jack-sink.c index f97041a8..1ef5d235 100644 --- a/src/modules/module-jack-sink.c +++ b/src/modules/module-jack-sink.c @@ -53,7 +53,7 @@ /* General overview: * - * Because JACK has a very unflexible event loop management, which + * Because JACK has a very unflexible event loop management which * doesn't allow us to add our own event sources to the event thread * we cannot use the JACK real-time thread for dispatching our PA * work. Instead, we run an additional RT thread which does most of @@ -276,7 +276,6 @@ int pa__init(pa_module*m) { pa_bool_t do_connect = TRUE; unsigned i; const char **ports = NULL, **p; - char *t; pa_sink_new_data data; pa_assert(m); @@ -364,8 +363,7 @@ int pa__init(pa_module*m) { pa_proplist_sets(data.proplist, PA_PROP_DEVICE_API, "jack"); if (server_name) pa_proplist_sets(data.proplist, PA_PROP_DEVICE_STRING, server_name); - pa_proplist_sets(data.proplist, PA_PROP_DEVICE_DESCRIPTION, t = pa_sprintf_malloc("Jack sink (%s)", jack_get_client_name(u->client))); - pa_xfree(t); + pa_proplist_setf(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Jack sink (%s)", jack_get_client_name(u->client)); pa_proplist_sets(data.proplist, "jack.client_name", jack_get_client_name(u->client)); u->sink = pa_sink_new(m->core, &data, PA_SINK_LATENCY); diff --git a/src/modules/module-jack-source.c b/src/modules/module-jack-source.c index 18ffa55c..fa2ec5eb 100644 --- a/src/modules/module-jack-source.c +++ b/src/modules/module-jack-source.c @@ -253,7 +253,6 @@ int pa__init(pa_module*m) { pa_bool_t do_connect = TRUE; unsigned i; const char **ports = NULL, **p; - char *t; pa_source_new_data data; pa_assert(m); @@ -335,8 +334,7 @@ int pa__init(pa_module*m) { pa_proplist_sets(data.proplist, PA_PROP_DEVICE_API, "jack"); if (server_name) pa_proplist_sets(data.proplist, PA_PROP_DEVICE_STRING, server_name); - pa_proplist_sets(data.proplist, PA_PROP_DEVICE_DESCRIPTION, t = pa_sprintf_malloc("Jack source (%s)", jack_get_client_name(u->client))); - pa_xfree(t); + pa_proplist_setf(data.proplist, PA_PROP_DEVICE_DESCRIPTION, "Jack source (%s)", jack_get_client_name(u->client)); pa_proplist_sets(data.proplist, "jack.client_name", jack_get_client_name(u->client)); u->source = pa_source_new(m->core, &data, PA_SOURCE_LATENCY); diff --git a/src/modules/module-null-sink.c b/src/modules/module-null-sink.c index ded4df98..aff244fa 100644 --- a/src/modules/module-null-sink.c +++ b/src/modules/module-null-sink.c @@ -219,7 +219,7 @@ static void thread_func(void *userdata) { pa_rtpoll_set_timer_disabled(u->rtpoll); /* Hmm, nothing to do. Let's sleep */ - if ((ret = pa_rtpoll_run(u->rtpoll, 1)) < 0) + if ((ret = pa_rtpoll_run(u->rtpoll, TRUE)) < 0) goto fail; if (ret == 0) diff --git a/src/modules/module-pipe-source.c b/src/modules/module-pipe-source.c index c2f464b8..83eb4f8a 100644 --- a/src/modules/module-pipe-source.c +++ b/src/modules/module-pipe-source.c @@ -153,7 +153,7 @@ static void thread_func(void *userdata) { /* Hmm, nothing to do. Let's sleep */ pollfd->events = u->source->thread_info.state == PA_SOURCE_RUNNING ? POLLIN : 0; - if ((ret = pa_rtpoll_run(u->rtpoll, 1)) < 0) + if ((ret = pa_rtpoll_run(u->rtpoll, TRUE)) < 0) goto fail; if (ret == 0) |