Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2:ARM
alsa-utils
0004-alsaloop-Improve-xrun_sync-fill-missing-pl...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0004-alsaloop-Improve-xrun_sync-fill-missing-playback-sam.patch of Package alsa-utils
From 53107e1e3146e3687e571b2c31f9d271623c5411 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela <perex@perex.cz> Date: Mon, 20 Feb 2012 16:41:19 +0100 Subject: [PATCH 04/13] alsaloop: Improve xrun_sync - fill missing playback samples Signed-off-by: Jaroslav Kysela <perex@perex.cz> --- alsaloop/pcmjob.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/alsaloop/pcmjob.c b/alsaloop/pcmjob.c index bfac2d3..c9b120f 100644 --- a/alsaloop/pcmjob.c +++ b/alsaloop/pcmjob.c @@ -949,6 +949,23 @@ static int xrun_sync(struct loopback *loop) logit(LOG_CRIT, "%s start failed: %s\n", play->id, snd_strerror(err)); return err; } + } else if (delay1 < fill) { + diff = (fill - delay1) / play->pitch; + while (diff > 0) { + delay1 = play->buf_size - play->buf_pos; + if (verbose > 6) + snd_output_printf(loop->output, + "sync: playback short, silence filling %li / buf_count=%li\n", (long)delay1, play->buf_count); + if (delay1 > diff) + delay1 = diff; + if ((err = snd_pcm_format_set_silence(play->format, play->buf + play->buf_pos * play->channels, delay1)) < 0) + return err; + play->buf_pos += delay1; + play->buf_pos %= play->buf_size; + play->buf_count += delay1; + diff -= delay1; + } + writeit(play); } if (verbose > 5) { snd_output_printf(loop->output, "%s: xrun sync ok\n", loop->id); -- 1.7.9.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor