mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
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:
parent
33e5802df2
commit
3d6092bb0f
16 changed files with 52 additions and 40 deletions
|
|
@ -238,8 +238,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);
|
||||
|
||||
/* (3) PUT YOUR CODE HERE TO DO SOMETHING WITH THE DATA */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue