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

@ -311,8 +311,7 @@ static void source_output_push_cb(pa_source_output *o, const pa_memchunk *chunk)
pa_assert( target_chunk.memblock );
/* get target pointer */
target = (void*)((uint8_t*)pa_memblock_acquire(target_chunk.memblock)
+ target_chunk.index);
target = pa_memblock_acquire_chunk(&target_chunk);
/* set-up mixing structure
volume was taken care of in sink and source already */