# HG changeset patch # User Chris Cannam # Date 1277199919 0 # Node ID 2b1869fccec179a4a3139512bd5a63c0b8d77c53 # Parent 3bd87e04f060fcf0935db134f555fa77fd091ba0 * Avoid setting zero latency on source diff -r 3bd87e04f060 -r 2b1869fccec1 audioio/AudioPulseAudioTarget.cpp --- a/audioio/AudioPulseAudioTarget.cpp Tue Jun 15 11:36:02 2010 +0000 +++ b/audioio/AudioPulseAudioTarget.cpp Tue Jun 22 09:45:19 2010 +0000 @@ -163,12 +163,14 @@ pa_usec_t latency = 0; int negative = 0; if (pa_stream_get_latency(m_stream, &latency, &negative)) { - std::cerr << "AudioPulseAudioTarget::contextStateChanged: Failed to query latency" << std::endl; + std::cerr << "AudioPulseAudioTarget::streamWrite: Failed to query latency" << std::endl; } // std::cerr << "Latency = " << latency << " usec" << std::endl; int latframes = (latency / 1000000.f) * float(m_sampleRate); // std::cerr << "that's " << latframes << " frames" << std::endl; - m_source->setTargetPlayLatency(latframes); //!!! buh + if (latframes > 0) { + m_source->setTargetPlayLatency(latframes); //!!! buh + } } static float *output = 0;