mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-06 13:29:59 -05:00
rate plugin: fix fragment size calculation
When calculating the size of the second fragment, do not assume that the entire size is one period size (which is not true in the draining state) but use the actual size passed by the caller.
This commit is contained in:
parent
931e840a9f
commit
aaaf843871
1 changed files with 1 additions and 1 deletions
|
|
@ -1054,7 +1054,7 @@ static int snd_pcm_rate_commit_area(snd_pcm_t *pcm, snd_pcm_rate_t *rate,
|
|||
return 1;
|
||||
|
||||
/* commit second fragment */
|
||||
cont = rate->gen.slave->period_size - cont;
|
||||
cont = slave_size - cont;
|
||||
slave_frames = cont;
|
||||
result = snd_pcm_mmap_begin(rate->gen.slave, &slave_areas, &slave_offset, &slave_frames);
|
||||
if (result < 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue