]> code.delx.au - pulseaudio/commitdiff
fix up requested latency when we move a record stream
authorLennart Poettering <lennart@poettering.net>
Thu, 15 May 2008 23:17:22 +0000 (23:17 +0000)
committerLennart Poettering <lennart@poettering.net>
Thu, 15 May 2008 23:17:22 +0000 (23:17 +0000)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2441 fefdeb5f-60dc-0310-8127-8f9354f1896f

src/pulsecore/source.c

index 426906eb7ef22ff6aaf93d612a420e2980f413a2..c767abcf047c6cc05f24e4ad0c7b81ce54d6b7ec 100644 (file)
@@ -577,8 +577,6 @@ int pa_source_process_msg(pa_msgobject *object, int code, void *userdata, int64_
 
             pa_hashmap_put(s->thread_info.outputs, PA_UINT32_TO_PTR(o->index), pa_source_output_ref(o));
 
-            pa_source_output_update_max_rewind(o, s->thread_info.max_rewind);
-
             pa_assert(!o->thread_info.attached);
             o->thread_info.attached = TRUE;
 
@@ -587,7 +585,12 @@ int pa_source_process_msg(pa_msgobject *object, int code, void *userdata, int64_
 
             pa_source_output_set_state_within_thread(o, o->state);
 
-            pa_source_invalidate_requested_latency(s);
+            pa_source_output_update_max_rewind(o, s->thread_info.max_rewind);
+
+            /* We don't just invalidate the requested latency here,
+             * because if we are in a move we might need to fix up the
+             * requested latency. */
+            pa_source_output_set_requested_latency_within_thread(o, o->thread_info.requested_source_latency);
 
             return 0;
         }