From 813d40c13d27b15e647e014e0fb1e4508a2532a0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 15 May 2008 23:17:22 +0000 Subject: fix up requested latency when we move a record stream git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2441 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/pulsecore/source.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c index 426906eb..c767abcf 100644 --- a/src/pulsecore/source.c +++ b/src/pulsecore/source.c @@ -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; } -- cgit