mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -05:00
pcm: fix snd_pcm_plugin_status()
The appl_ptr difference must be computed before
the appl_ptr in the status structure is updated.
Fixes: da5b70d3f ("pcm: plugin - fix status code for capture")
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
19ad9bdc49
commit
1d1062d920
1 changed files with 1 additions and 1 deletions
|
|
@ -564,8 +564,8 @@ static int snd_pcm_plugin_status(snd_pcm_t *pcm, snd_pcm_status_t * status)
|
||||||
* snd_pcm_status()
|
* snd_pcm_status()
|
||||||
*/
|
*/
|
||||||
if (pcm->stream == SND_PCM_STREAM_CAPTURE) {
|
if (pcm->stream == SND_PCM_STREAM_CAPTURE) {
|
||||||
status->appl_ptr = *pcm->appl.ptr;
|
|
||||||
diff = pcm_frame_diff(status->appl_ptr, *pcm->appl.ptr, pcm->boundary);
|
diff = pcm_frame_diff(status->appl_ptr, *pcm->appl.ptr, pcm->boundary);
|
||||||
|
status->appl_ptr = *pcm->appl.ptr;
|
||||||
status->avail += diff;
|
status->avail += diff;
|
||||||
status->delay += diff;
|
status->delay += diff;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue