mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Fixes to mmap size computing
This commit is contained in:
parent
c1ad051636
commit
6425734d82
1 changed files with 1 additions and 1 deletions
|
|
@ -271,7 +271,7 @@ int snd_pcm_mmap(snd_pcm_t *pcm)
|
|||
unsigned int c1;
|
||||
if (!i->addr) {
|
||||
char *ptr;
|
||||
size_t size = i->first + i->step * pcm->buffer_size;
|
||||
size_t size = i->first + i->step * (pcm->buffer_size - 1) + pcm->bits_per_sample;
|
||||
for (c1 = c + 1; c1 < pcm->channels; ++c1) {
|
||||
snd_pcm_channel_info_t *i1 = &pcm->mmap_channels[c1];
|
||||
size_t s;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue