mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
pw-cat: fix raw read
raw read needs bytes, so use the stride to calculate it from frames. Move ulaw/alaw to packed formats.
This commit is contained in:
parent
f7c91491cb
commit
49c1c0386f
4 changed files with 10 additions and 10 deletions
|
|
@ -287,7 +287,7 @@ static int sf_playback_fill_x8(struct data *d, void *dest, unsigned int n_frames
|
|||
{
|
||||
sf_count_t rn;
|
||||
|
||||
rn = sf_read_raw(d->file, dest, n_frames);
|
||||
rn = sf_read_raw(d->file, dest, n_frames * d->stride);
|
||||
return (int)rn;
|
||||
}
|
||||
|
||||
|
|
@ -371,7 +371,7 @@ static int sf_record_fill_x8(struct data *d, void *src, unsigned int n_frames)
|
|||
{
|
||||
sf_count_t rn;
|
||||
|
||||
rn = sf_write_raw(d->file, src, n_frames);
|
||||
rn = sf_write_raw(d->file, src, n_frames * d->stride);
|
||||
return (int)rn;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue