mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pw-cat: improve DSD file reading
Support reading non-multiples of the blocksize. Stop reading at the end of the file.
This commit is contained in:
parent
ce2f1b3737
commit
a6304b47f6
2 changed files with 29 additions and 21 deletions
|
|
@ -915,7 +915,7 @@ on_param_changed(void *userdata, uint32_t id, const struct spa_pod *param)
|
|||
data->dsf.layout.channels = info.info.dsd.channels;
|
||||
data->dsf.layout.lsb = info.info.dsd.bitorder == SPA_PARAM_BITORDER_lsb;
|
||||
|
||||
data->stride = data->dsf.info.channels * SPA_ABS(data->dsf.layout.interleave);
|
||||
data->stride = data->dsf.layout.channels * SPA_ABS(data->dsf.layout.interleave);
|
||||
|
||||
if (data->verbose) {
|
||||
printf("DSD out: channels:%d bitorder:%s interleave:%d\n",
|
||||
|
|
@ -1268,9 +1268,10 @@ static int setup_dsffile(struct data *data)
|
|||
}
|
||||
|
||||
if (data->verbose)
|
||||
printf("opened file \"%s\" channels:%d rate:%d bitorder:%s\n",
|
||||
printf("opened file \"%s\" channels:%d rate:%d samples:%"PRIu64" bitorder:%s\n",
|
||||
data->filename,
|
||||
data->dsf.info.channels, data->dsf.info.rate,
|
||||
data->dsf.info.samples,
|
||||
data->dsf.info.lsb ? "lsb" : "msb");
|
||||
|
||||
data->fill = dsf_play;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue