mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -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
|
|
@ -532,7 +532,7 @@ static int hsp_process_render(struct userdata *u) {
|
|||
* SEQPACKET, and we generated the data of the MTU size, so this
|
||||
* should just work. */
|
||||
|
||||
p = (const uint8_t*) pa_memblock_acquire(u->write_memchunk.memblock) + u->write_memchunk.index;
|
||||
p = (const uint8_t *) pa_memblock_acquire_chunk(&u->write_memchunk);
|
||||
l = pa_write(u->stream_fd, p, u->write_memchunk.length, &u->stream_write_type);
|
||||
pa_memblock_release(u->write_memchunk.memblock);
|
||||
|
||||
|
|
@ -706,7 +706,7 @@ static int a2dp_process_render(struct userdata *u) {
|
|||
|
||||
/* Try to create a packet of the full MTU */
|
||||
|
||||
p = (const uint8_t*) pa_memblock_acquire(u->write_memchunk.memblock) + u->write_memchunk.index;
|
||||
p = (const uint8_t *) pa_memblock_acquire_chunk(&u->write_memchunk);
|
||||
to_encode = u->write_memchunk.length;
|
||||
|
||||
d = (uint8_t*) a2dp->buffer + sizeof(*header) + sizeof(*payload);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue