diff -up phonon-4.4.1/phonon/pulsesupport.cpp.kde235193 phonon-4.4.1/phonon/pulsesupport.cpp --- phonon-4.4.1/phonon/pulsesupport.cpp.kde235193 2010-04-21 09:06:29.000000000 -0500 +++ phonon-4.4.1/phonon/pulsesupport.cpp 2010-04-24 13:19:46.019780887 -0500 @@ -569,6 +569,31 @@ static void context_state_callback(pa_co return; } pa_operation_unref(o); + + // In the case of reconnection or simply lagging behind the stream object creation + // on startup (due to the probe+reconnect system), we invalidate all loaded streams + // and then load up info about all streams. + for (QMap::iterator it = s_outputStreams.begin(); it != s_outputStreams.end(); ++it) { + PulseStream *stream = *it; + logMessage(QString("Phonon Output Stream %1 is gone at the PA end. Marking it as invalid in our cache as we may reuse it.").arg(stream->uuid())); + stream->setIndex(PA_INVALID_INDEX); + } + if (!(o = pa_context_get_sink_input_info_list(c, sink_input_cb, NULL))) { + logMessage(QString("pa_context_get_sink_input_info_list() failed")); + return; + } + pa_operation_unref(o); + + for (QMap::iterator it = s_captureStreams.begin(); it != s_captureStreams.end(); ++it) { + PulseStream *stream = *it; + logMessage(QString("Phonon Capture Stream %1 is gone at the PA end. Marking it as invalid in our cache as we may reuse it.").arg(stream->uuid())); + stream->setIndex(PA_INVALID_INDEX); + } + if (!(o = pa_context_get_source_output_info_list(c, source_output_cb, NULL))) { + logMessage(QString("pa_context_get_source_output_info_list() failed")); + return; + } + pa_operation_unref(o); } #ifdef HAVE_PULSEAUDIO_DEVICE_MANAGER diff -up phonon-4.4.1/xine/audiooutput.cpp.kde235193 phonon-4.4.1/xine/audiooutput.cpp --- phonon-4.4.1/xine/audiooutput.cpp.kde235193 2010-04-21 09:06:29.000000000 -0500 +++ phonon-4.4.1/xine/audiooutput.cpp 2010-04-24 13:16:09.495761750 -0500 @@ -48,6 +48,7 @@ namespace Xine AudioOutput::AudioOutput(QObject *parent) : AbstractAudioOutput(new AudioOutputXT, parent) + , m_volume(1.0) { }