memblock: Add pa_memblock_acquire_chunk().

Besides making the code a bit cleaner, this also gets rid of
a few "cast increases required alignment of target type"
warnings.
This commit is contained in:
Tanu Kaskinen 2012-08-17 18:09:34 +03:00 committed by Tanu Kaskinen
parent 33e5802df2
commit 3d6092bb0f
16 changed files with 52 additions and 40 deletions

View file

@ -133,7 +133,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
pa_sink_render_full(u->sink, nbytes, &chunk);
p = (uint8_t*) pa_memblock_acquire(chunk.memblock) + chunk.index;
p = pa_memblock_acquire_chunk(&chunk);
pa_deinterleave(p, u->buffer, u->channels, sizeof(float), (unsigned) offset);
pa_memblock_release(chunk.memblock);