mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Small optimization from Paul Davis
This commit is contained in:
parent
f65b035a45
commit
1498d2ea66
1 changed files with 1 additions and 1 deletions
|
|
@ -4032,11 +4032,11 @@ int snd_pcm_mmap_begin(snd_pcm_t *pcm,
|
|||
else
|
||||
*areas = pcm->running_areas;
|
||||
*offset = *pcm->appl_ptr % pcm->buffer_size;
|
||||
cont = pcm->buffer_size - *offset;
|
||||
avail = snd_pcm_mmap_avail(pcm);
|
||||
f = *frames;
|
||||
if (f > avail)
|
||||
f = avail;
|
||||
cont = pcm->buffer_size - *pcm->appl_ptr % pcm->buffer_size;
|
||||
if (f > cont)
|
||||
f = cont;
|
||||
*frames = f;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue