Mercurial > hg > svapp
comparison audioio/AudioPortAudioTarget.cpp @ 81:0948bf800422
* More latency for PortAudio output
* ...
author | Chris Cannam |
---|---|
date | Thu, 24 Jan 2008 22:49:19 +0000 |
parents | 448ff6e34b99 |
children | 9fc4b256c283 |
comparison
equal
deleted
inserted
replaced
80:448ff6e34b99 | 81:0948bf800422 |
---|---|
61 #ifdef HAVE_PORTAUDIO_V18 | 61 #ifdef HAVE_PORTAUDIO_V18 |
62 err = Pa_OpenDefaultStream(&m_stream, 0, 2, paFloat32, | 62 err = Pa_OpenDefaultStream(&m_stream, 0, 2, paFloat32, |
63 m_sampleRate, m_bufferSize, 0, | 63 m_sampleRate, m_bufferSize, 0, |
64 processStatic, this); | 64 processStatic, this); |
65 #else | 65 #else |
66 err = Pa_OpenDefaultStream(&m_stream, 0, 2, paFloat32, | 66 PaStreamParameters op; |
67 m_sampleRate, m_bufferSize, | 67 op.device = 0; |
68 processStatic, this); | 68 op.channelCount = 2; |
69 op.sampleFormat = paFloat32; | |
70 op.suggestedLatency = 0.2; | |
71 op.hostApiSpecificStreamInfo = 0; | |
72 err = Pa_OpenStream(&m_stream, 0, &op, m_sampleRate, m_bufferSize, | |
73 paNoFlag, processStatic, this); | |
69 #endif | 74 #endif |
70 | 75 |
71 if (err != paNoError) { | 76 if (err != paNoError) { |
72 std::cerr << "ERROR: AudioPortAudioTarget: Failed to open PortAudio stream: " << Pa_GetErrorText(err) << std::endl; | 77 std::cerr << "ERROR: AudioPortAudioTarget: Failed to open PortAudio stream: " << Pa_GetErrorText(err) << std::endl; |
73 m_stream = 0; | 78 m_stream = 0; |