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:
Wim Taymans 2021-08-17 17:56:31 +02:00
parent f7c91491cb
commit 49c1c0386f
4 changed files with 10 additions and 10 deletions

View file

@ -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;
}