mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04: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
|
|
@ -370,13 +370,13 @@ int resample_native_init(struct resample *r)
|
|||
d->n_phases = n_phases;
|
||||
d->in_rate = in_rate;
|
||||
d->out_rate = out_rate;
|
||||
d->filter = SPA_MEMBER_ALIGN(d, sizeof(struct native_data), 64, float);
|
||||
d->hist_mem = SPA_MEMBER_ALIGN(d->filter, filter_size, 64, float);
|
||||
d->history = SPA_MEMBER(d->hist_mem, history_size, float*);
|
||||
d->filter = SPA_PTROFF_ALIGN(d, sizeof(struct native_data), 64, float);
|
||||
d->hist_mem = SPA_PTROFF_ALIGN(d->filter, filter_size, 64, float);
|
||||
d->history = SPA_PTROFF(d->hist_mem, history_size, float*);
|
||||
d->filter_stride = filter_stride / sizeof(float);
|
||||
d->filter_stride_os = d->filter_stride * oversample;
|
||||
for (c = 0; c < r->channels; c++)
|
||||
d->history[c] = SPA_MEMBER(d->hist_mem, c * history_stride, float);
|
||||
d->history[c] = SPA_PTROFF(d->hist_mem, c * history_stride, float);
|
||||
|
||||
build_filter(d->filter, d->filter_stride, n_taps, n_phases, scale);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue