summaryrefslogtreecommitdiffstats
path: root/polyp/polyplib-context.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-08-17 19:37:29 +0000
committerLennart Poettering <lennart@poettering.net>2004-08-17 19:37:29 +0000
commite75b65715b2fc9a3363bd4ac598fe02888b7ed21 (patch)
tree4143a433981356e6a784ecf0a0c0bfc3806348ea /polyp/polyplib-context.c
parent81822a751929fbc153282de3af447b9430d5c474 (diff)
remove global memblock statistic variables in favor of memblock_stat objects
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@137 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/polyplib-context.c')
-rw-r--r--polyp/polyplib-context.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/polyp/polyplib-context.c b/polyp/polyplib-context.c
index 2a0c24a5..fcf3f6b9 100644
--- a/polyp/polyplib-context.c
+++ b/polyp/polyplib-context.c
@@ -78,6 +78,8 @@ struct pa_context *pa_context_new(struct pa_mainloop_api *mainloop, const char *
c->subscribe_callback = NULL;
c->subscribe_userdata = NULL;
+ c->memblock_stat = pa_memblock_stat_new();
+
pa_check_for_sigpipe();
return c;
}
@@ -104,7 +106,9 @@ static void context_free(struct pa_context *c) {
pa_dynarray_free(c->record_streams, NULL, NULL);
if (c->playback_streams)
pa_dynarray_free(c->playback_streams, NULL, NULL);
-
+
+ pa_memblock_stat_unref(c->memblock_stat);
+
pa_xfree(c->name);
pa_xfree(c);
}
@@ -280,7 +284,7 @@ static void on_connection(struct pa_socket_client *client, struct pa_iochannel*i
}
assert(!c->pstream);
- c->pstream = pa_pstream_new(c->mainloop, io);
+ c->pstream = pa_pstream_new(c->mainloop, io, c->memblock_stat);
assert(c->pstream);
pa_pstream_set_die_callback(c->pstream, pstream_die_callback, c);