[ekiga/gnome-2-26] Make sure the output device is set before a call



commit 39190d030c7784efdff243d98024812cb9bac3ec
Author: Michael Rickmann <mrickma gwdg de>
Date:   Tue Aug 18 21:48:14 2009 +0200

    Make sure the output device is set before a call
    
    Fixes the following bug: The main thread was closing the audioinput
    device, while the "Media Patch" thread which pumps the data into the
    internet was still active.  Consequently "Media Patch" switched to the
    silence device.  This was left in current_device of
    audioinput-core.cpp, and it was used for the next call.  Attached
    patch also sets internal_set_manager(desired_device); when the stream
    is started, i.e. when it is really needed.

 lib/engine/audioinput/audioinput-core.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/lib/engine/audioinput/audioinput-core.cpp b/lib/engine/audioinput/audioinput-core.cpp
index 94ab55d..767416b 100644
--- a/lib/engine/audioinput/audioinput-core.cpp
+++ b/lib/engine/audioinput/audioinput-core.cpp
@@ -327,6 +327,8 @@ void AudioInputCore::start_stream (unsigned channels, unsigned samplerate, unsig
 
   PTRACE(4, "AudioInputCore\tStarting stream " << channels << "x" << samplerate << "/" << bits_per_sample);
 
+  internal_set_manager(desired_device);  /* make sure it is set */
+
   if (preview_config.active || stream_config.active) {
     PTRACE(1, "AudioInputCore\tTrying to start stream in wrong state");
   }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]