summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/sound-file.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-08-18 19:55:18 +0000
committerLennart Poettering <lennart@poettering.net>2006-08-18 19:55:18 +0000
commit0e436a6926af56f37a74a03bb5e143e078ca0d55 (patch)
treef837bc433ba8b6f904e6d512f9c9c2552a9827db /src/pulsecore/sound-file.c
parentff48681aaef919cd2c85e4572928e936397a615c (diff)
Rework memory management to allow shared memory data transfer. The central idea
is to allocate all audio memory blocks from a per-process memory pool which is available as read-only SHM segment to other local processes. Then, instead of writing the actual audio data to the socket just write references to this shared memory pool. To work optimally all memory blocks should now be of type PA_MEMBLOCK_POOL or PA_MEMBLOCK_POOL_EXTERNAL. The function pa_memblock_new() now generates memory blocks of this type by default. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1266 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/sound-file.c')
-rw-r--r--src/pulsecore/sound-file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pulsecore/sound-file.c b/src/pulsecore/sound-file.c
index d11d4b9d..256cce43 100644
--- a/src/pulsecore/sound-file.c
+++ b/src/pulsecore/sound-file.c
@@ -34,7 +34,7 @@
#include "sound-file.h"
#include "core-scache.h"
-int pa_sound_file_load(const char *fname, pa_sample_spec *ss, pa_channel_map *map, pa_memchunk *chunk, pa_memblock_stat *s) {
+int pa_sound_file_load(pa_mempool *pool, const char *fname, pa_sample_spec *ss, pa_channel_map *map, pa_memchunk *chunk) {
SNDFILE*sf = NULL;
SF_INFO sfinfo;
int ret = -1;
@@ -92,7 +92,7 @@ int pa_sound_file_load(const char *fname, pa_sample_spec *ss, pa_channel_map *ma
goto finish;
}
- chunk->memblock = pa_memblock_new(l, s);
+ chunk->memblock = pa_memblock_new(pool, l);
assert(chunk->memblock);
chunk->index = 0;
chunk->length = l;