alsaloop: get_queued_playback_samples() - simplify code

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2021-01-08 18:29:56 +01:00
parent 90bbeb1d3e
commit c9b4293212

View file

@ -1698,9 +1698,8 @@ int pcmjob_pollfds_init(struct loopback *loop, struct pollfd *fds)
static snd_pcm_sframes_t get_queued_playback_samples(struct loopback *loop) static snd_pcm_sframes_t get_queued_playback_samples(struct loopback *loop)
{ {
snd_pcm_sframes_t delay; snd_pcm_sframes_t delay;
int err;
if ((err = snd_pcm_delay(loop->play->handle, &delay)) < 0) if (snd_pcm_delay(loop->play->handle, &delay) < 0)
return 0; return 0;
loop->play->last_delay = delay; loop->play->last_delay = delay;
delay += loop->play->buf_count; delay += loop->play->buf_count;