]> code.delx.au - pulseaudio/commitdiff
alsa: resume smoother after unsuspend
authorWim Taymans <wim.taymans@collabora.co.uk>
Mon, 23 Aug 2010 09:59:13 +0000 (11:59 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Mon, 23 Aug 2010 09:59:13 +0000 (11:59 +0200)
The smoother is paused when the device is suspended but never resumed on
unsuspend. Pass the paused = FALSE flag to the pa_smoother_reset() call to make
it unpause when unsuspending. This patch improves source timings quite a bit.

src/modules/alsa/alsa-source.c

index 381a7062b626fb9a5cf5e6350d815d4a20a34fdf..bc07c77e61fbe7821b82ebf27e4ec177851c1455 100644 (file)
@@ -949,7 +949,7 @@ static int unsuspend(struct userdata *u) {
     snd_pcm_start(u->pcm_handle);
 
     u->read_count = 0;
-    pa_smoother_reset(u->smoother, pa_rtclock_now(), TRUE);
+    pa_smoother_reset(u->smoother, pa_rtclock_now(), FALSE);
     u->smoother_interval = SMOOTHER_MIN_INTERVAL;
     u->last_smoother_update = 0;