mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-21 08:56:56 -05:00
spa/buffer: rename SPA_MEMBER to SPA_PTROFF
SPA_MEMBER is misleading, all we're doing here is pointer+offset and a type-casting the result. Rename to SPA_PTROFF which is more expressive (and has the same number of characters so we don't need to re-indent).
This commit is contained in:
parent
e598d0a422
commit
2405f0942b
92 changed files with 248 additions and 227 deletions
|
|
@ -330,7 +330,7 @@ static int impl_port_use_buffers(void *object,
|
|||
return -errno;
|
||||
|
||||
}
|
||||
b->ptr = SPA_MEMBER(b->ptr, datas[0].mapoffset, void);
|
||||
b->ptr = SPA_PTROFF(b->ptr, datas[0].mapoffset, void);
|
||||
b->mapped = true;
|
||||
}
|
||||
else {
|
||||
|
|
@ -435,9 +435,9 @@ static int impl_node_process(void *object)
|
|||
avail = maxsize - offset;
|
||||
|
||||
if (d->format.format == SPA_AUDIO_FORMAT_S16)
|
||||
fill_s16(d, SPA_MEMBER(b->ptr, offset, void), avail);
|
||||
fill_s16(d, SPA_PTROFF(b->ptr, offset, void), avail);
|
||||
else if (d->format.format == SPA_AUDIO_FORMAT_F32)
|
||||
fill_f32(d, SPA_MEMBER(b->ptr, offset, void), avail);
|
||||
fill_f32(d, SPA_PTROFF(b->ptr, offset, void), avail);
|
||||
|
||||
od[0].chunk->offset = 0;
|
||||
od[0].chunk->size = avail;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue