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

@ -488,8 +488,8 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk
pa_memblockq_drop(u->memblockq, chunk->length);
src = (float*) ((uint8_t*) pa_memblock_acquire(tchunk.memblock) + tchunk.index);
dst = (float*) pa_memblock_acquire(chunk->memblock);
src = pa_memblock_acquire_chunk(&tchunk);
dst = pa_memblock_acquire(chunk->memblock);
for (h = 0; h < (u->channels / u->max_ladspaport_count); h++) {
for (c = 0; c < u->input_count; c++)