mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-07 13:30:07 -05:00
pcm: rate - fix the remaining size calculation in snd_pcm_rate_drain()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
c996c9f52c
commit
a43074ba17
1 changed files with 2 additions and 0 deletions
|
|
@ -1060,6 +1060,8 @@ static int snd_pcm_rate_drain(snd_pcm_t *pcm)
|
||||||
snd_pcm_sw_params(rate->gen.slave, &sw_params);
|
snd_pcm_sw_params(rate->gen.slave, &sw_params);
|
||||||
|
|
||||||
size = rate->appl_ptr - rate->last_commit_ptr;
|
size = rate->appl_ptr - rate->last_commit_ptr;
|
||||||
|
if (size > pcm->boundary)
|
||||||
|
size -= pcm->boundary;
|
||||||
ofs = rate->last_commit_ptr % pcm->buffer_size;
|
ofs = rate->last_commit_ptr % pcm->buffer_size;
|
||||||
while (size > 0) {
|
while (size > 0) {
|
||||||
snd_pcm_uframes_t psize, spsize;
|
snd_pcm_uframes_t psize, spsize;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue