pa->setInputChannelCount(inputChannels); // stereo input
pa->setInputSampleFormat(PA_SAMPLE_TYPE);
pa->setInputLatency(pa->getInputDefaultLowLatency());
+ fprintf(stderr,"PA in; low: %f high: %f\n", pa->getInputDefaultLowLatency(), pa->getInputDefaultHighLatency());
pa->setInputHostApiStreamInfo(NULL);
}
pa->setOutputChannelCount(2); // stereo output
pa->setOutputSampleFormat(PA_SAMPLE_TYPE);
pa->setOutputLatency(pa->getOutputDefaultLowLatency());
+ fprintf(stderr,"PA out; low: %f high: %f\n", pa->getOutputDefaultLowLatency(), pa->getOutputDefaultHighLatency());
pa->setOutputHostApiStreamInfo(NULL);
}
On Linux, setting this to wxGetApp().m_framesPerBuffer caused
intermittant break up on the audio from my IC7200 on Ubuntu 14.
After a day of bug hunting I found that 0, as recommended by the
- PortAudio docunmentation, fixed the problem.
+ PortAudio documentation, fixed the problem.
*/
//pa->setFramesPerBuffer(wxGetApp().m_framesPerBuffer);
return Pa_GetDeviceInfo(m_inputBuffer.device)->defaultLowInputLatency;
}
+//----------------------------------------------------------------
+// getInputDefaultHighLatency()
+//----------------------------------------------------------------
+PaTime PortAudioWrap::getInputDefaultHighLatency()
+{
+ return Pa_GetDeviceInfo(m_inputBuffer.device)->defaultHighInputLatency;
+}
+
//----------------------------------------------------------------
// setOutputChannelCount()
//----------------------------------------------------------------
return Pa_GetDeviceInfo(m_outputBuffer.device)->defaultLowOutputLatency;
}
+//----------------------------------------------------------------
+// getOutputDefaultHighLatency()
+//----------------------------------------------------------------
+PaTime PortAudioWrap::getOutputDefaultHighLatency()
+{
+ return Pa_GetDeviceInfo(m_outputBuffer.device)->defaultHighOutputLatency;
+}
+
//----------------------------------------------------------------
// setFramesPerBuffer()
//----------------------------------------------------------------
PaError setInputLatency(PaTime latency);
void setInputHostApiStreamInfo(void *info = NULL);
PaTime getInputDefaultLowLatency();
+ PaTime getInputDefaultHighLatency();
const char *getDeviceName(PaDeviceIndex dev);
PaError setOutputDevice(PaDeviceIndex dev);
PaError setOutputLatency(PaTime latency);
void setOutputHostApiStreamInfo(void *info = NULL);
PaTime getOutputDefaultLowLatency();
+ PaTime getOutputDefaultHighLatency();
void setFdmdvState(FDMDV* fdmdv_state) {this->m_pFDMDV_state = fdmdv_state;}
void setOutputBuffer(const PaStreamParameters& outputBuffer) {this->m_outputBuffer = outputBuffer;}