diff options
author | Daniel Mack <daniel@caiaq.de> | 2009-12-06 15:53:36 +0100 |
---|---|---|
committer | Daniel Mack <daniel@caiaq.de> | 2009-12-06 15:53:36 +0100 |
commit | f9b03d3a44e905d50dfac1483dbf1818d2b84ffa (patch) | |
tree | f94902497876669b4238798f160dae765a430c58 /src/pulse/context.c | |
parent | 1b2cbe92dbffc1d8be12c64fdc647e3cb5e5c58c (diff) | |
parent | e8a5746f2fcae59bfd18d39b621509b3ef130453 (diff) |
Merge branch 'master' of git://0pointer.de/pulseaudio
Diffstat (limited to 'src/pulse/context.c')
-rw-r--r-- | src/pulse/context.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pulse/context.c b/src/pulse/context.c index e33143d9..00184920 100644 --- a/src/pulse/context.c +++ b/src/pulse/context.c @@ -63,7 +63,7 @@ #include <pulsecore/native-common.h> #include <pulsecore/pdispatch.h> #include <pulsecore/pstream.h> -#include <pulsecore/dynarray.h> +#include <pulsecore/hashmap.h> #include <pulsecore/socket-client.h> #include <pulsecore/pstream-util.h> #include <pulsecore/core-rtclock.h> @@ -160,8 +160,8 @@ pa_context *pa_context_new_with_proplist(pa_mainloop_api *mainloop, const char * c->client = NULL; c->pstream = NULL; c->pdispatch = NULL; - c->playback_streams = pa_dynarray_new(); - c->record_streams = pa_dynarray_new(); + c->playback_streams = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func); + c->record_streams = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func); c->client_index = PA_INVALID_INDEX; c->use_rtclock = pa_mainloop_is_our_api(mainloop); @@ -266,9 +266,9 @@ static void context_free(pa_context *c) { #endif if (c->record_streams) - pa_dynarray_free(c->record_streams, NULL, NULL); + pa_hashmap_free(c->record_streams, NULL, NULL); if (c->playback_streams) - pa_dynarray_free(c->playback_streams, NULL, NULL); + pa_hashmap_free(c->playback_streams, NULL, NULL); if (c->mempool) pa_mempool_free(c->mempool); @@ -375,7 +375,7 @@ static void pstream_memblock_callback(pa_pstream *p, uint32_t channel, int64_t o pa_context_ref(c); - if ((s = pa_dynarray_get(c->record_streams, channel))) { + if ((s = pa_hashmap_get(c->record_streams, PA_UINT32_TO_PTR(channel)))) { if (chunk->memblock) { pa_memblockq_seek(s->record_memblockq, offset, seek, TRUE); |