mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-02 01:40:31 -05:00
pw-cat: fix DSD file reading
Now that the server asks for the right amount of samples for DSD, just give it the right amount of samples without doing some weird scaling. Make a method to calculate the size (stride) of one sample, which depends on the interleave and channels of the stream. See !2540
This commit is contained in:
parent
f8389cbdb7
commit
19198d2982
5 changed files with 17 additions and 11 deletions
|
|
@ -870,7 +870,7 @@ on_param_changed(void *userdata, uint32_t id, const struct spa_pod *param)
|
|||
data->dff.layout.channels = info.info.dsd.channels;
|
||||
data->dff.layout.lsb = info.info.dsd.bitorder == SPA_PARAM_BITORDER_lsb;
|
||||
|
||||
data->stride = data->dsf.layout.channels * SPA_ABS(data->dsf.layout.interleave);
|
||||
data->stride = dsf_layout_stride(&data->dsf.layout);
|
||||
|
||||
if (data->verbose) {
|
||||
fprintf(stderr, "DSD: channels:%d bitorder:%s interleave:%d stride:%d\n",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue