mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -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
|
|
@ -202,7 +202,7 @@ size_t pa_mix(
|
|||
}
|
||||
|
||||
for (k = 0; k < nstreams; k++)
|
||||
streams[k].ptr = (uint8_t*) pa_memblock_acquire(streams[k].chunk.memblock) + streams[k].chunk.index;
|
||||
streams[k].ptr = pa_memblock_acquire_chunk(&streams[k].chunk);
|
||||
|
||||
for (z = 0; z < nstreams; z++)
|
||||
if (length > streams[z].chunk.length)
|
||||
|
|
@ -741,7 +741,7 @@ void pa_volume_memchunk(
|
|||
|
||||
calc_volume_table[spec->format] ((void *)linear, volume);
|
||||
|
||||
ptr = (uint8_t*) pa_memblock_acquire(c->memblock) + c->index;
|
||||
ptr = pa_memblock_acquire_chunk(c);
|
||||
|
||||
do_volume (ptr, (void *)linear, spec->channels, c->length);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue