mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -04:00
pcm: multi plugin - adjust appl_ptr on rewind/forward operations
When doing rewind or forward operations, application pointer needs to be properly adjusted, in the same way when doing commit/write operations. Fixes: https://github.com/alsa-project/alsa-lib/pull/161 Signed-off-by: Sava Jakovljev <sava.jakovljev@teufel.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
c4972cb154
commit
1aeea94ce8
1 changed files with 3 additions and 2 deletions
|
|
@ -669,6 +669,7 @@ static snd_pcm_sframes_t snd_pcm_multi_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t
|
|||
return -EIO;
|
||||
}
|
||||
}
|
||||
snd_pcm_mmap_appl_backward(pcm, frames);
|
||||
return frames;
|
||||
}
|
||||
|
||||
|
|
@ -699,6 +700,7 @@ static snd_pcm_sframes_t snd_pcm_multi_forward(snd_pcm_t *pcm, snd_pcm_uframes_t
|
|||
return -EIO;
|
||||
}
|
||||
}
|
||||
snd_pcm_mmap_appl_forward(pcm, frames);
|
||||
return frames;
|
||||
}
|
||||
|
||||
|
|
@ -782,8 +784,7 @@ static snd_pcm_sframes_t snd_pcm_multi_mmap_commit(snd_pcm_t *pcm,
|
|||
if ((snd_pcm_uframes_t)result != size)
|
||||
return -EIO;
|
||||
}
|
||||
multi->appl_ptr += size;
|
||||
multi->appl_ptr %= pcm->boundary;
|
||||
snd_pcm_mmap_appl_forward(pcm, size);
|
||||
return size;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue