fix up if the smoother shall be resumed 'before' it was actually paused
authorLennart Poettering <lennart@poettering.net>
Wed, 25 Jun 2008 22:31:39 +0000 (00:31 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 25 Jun 2008 22:31:39 +0000 (00:31 +0200)
src/pulsecore/time-smoother.c

index 013edfc..40220ad 100644 (file)
@@ -421,7 +421,8 @@ void pa_smoother_resume(pa_smoother *s, pa_usec_t x) {
     if (!s->paused)
         return;
 
-    pa_assert(x >= s->pause_time);
+    if (x < s->pause_time)
+        x = s->pause_time;
 
 /*     pa_log_debug("resume(%llu)", (unsigned long long) x); */
 
@@ -458,5 +459,4 @@ void pa_smoother_reset(pa_smoother *s) {
 
     s->n_history = 0;
     s->abc_valid = FALSE;
-
 }