mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
pcm: rate - use pcm_frame_diff() in snd_pcm_rate_playback_internal_delay()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
6cee452eab
commit
fc0f7af9ee
1 changed files with 1 additions and 5 deletions
|
|
@ -612,11 +612,7 @@ static snd_pcm_uframes_t snd_pcm_rate_playback_internal_delay(snd_pcm_t *pcm)
|
|||
{
|
||||
snd_pcm_rate_t *rate = pcm->private_data;
|
||||
|
||||
if (rate->appl_ptr < rate->last_commit_ptr) {
|
||||
return rate->appl_ptr - rate->last_commit_ptr + pcm->boundary;
|
||||
} else {
|
||||
return rate->appl_ptr - rate->last_commit_ptr;
|
||||
}
|
||||
return pcm_frame_diff(rate->appl_ptr, rate->last_commit_ptr, pcm->boundary);
|
||||
}
|
||||
|
||||
static int snd_pcm_rate_delay(snd_pcm_t *pcm, snd_pcm_sframes_t *delayp)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue