# HG changeset patch # User Chris Cannam # Date 1202827680 0 # Node ID dd6d0bc05030b9c86092f4eca30037c02ddbe5e1 # Parent 9cc9862333bd7f89cbc2721d7fda33bf6e501aba * If the "default frame count" PA stream fails, try one with an explicit frame count diff -r 9cc9862333bd -r dd6d0bc05030 audioio/AudioPortAudioTarget.cpp --- a/audioio/AudioPortAudioTarget.cpp Mon Feb 11 17:08:59 2008 +0000 +++ b/audioio/AudioPortAudioTarget.cpp Tue Feb 12 14:48:00 2008 +0000 @@ -74,6 +74,17 @@ paNoFlag, processStatic, this); #endif +#ifndef HAVE_PORTAUDIO_V18 + if (err != paNoError) { + + std::cerr << "WARNING: AudioPortAudioTarget: Failed to open PortAudio stream with default frames per buffer, trying again with fixed frames per buffer..." << std::endl; + + err = Pa_OpenStream(&m_stream, 0, &op, m_sampleRate, + 1024, + paNoFlag, processStatic, this); + } +#endif + if (err != paNoError) { std::cerr << "ERROR: AudioPortAudioTarget: Failed to open PortAudio stream: " << Pa_GetErrorText(err) << std::endl; m_stream = 0;