I am trying to create a PortAudio application on Debian Wheezy 64 bit GNU/Linux. I read the documentation on how to do add the library and it compiles without errors.
Now when I want to initialize PortAudio using this script:
#include <stdio.h>
#include "portaudio.h"
int main(){
PaError err = Pa_Initialize();
if(err != paNoError){
fprintf(stderr, "Pa_Initialize error: %s\n", Pa_GetErrorText(err));
return 1;
}
return 0;
}
I get the following output: Pa_Initialize error: Host error.
When I try to run Audacity, which is also based on PortAudio I get the following errors:
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
audacity: symbol lookup error: audacity: undefined symbol: Pa_GetStreamHostApiType
And when I try to call this function:
const PaHostErrorInfo* hostError;
hostError = Pa_GetLastHostErrorInfo();
I get the following error: Undefined reference to 'Pa_GetLastHostErrorInfo'
How can I initialize PortAudio the correct way, and what is wrong with my host; does PortAudio requires me to do something with PulseAudio?
I already tried the bottom solution of this topic http://ubuntuforums.org/showthread.php?t=1756822, because I thought it had something to do with the configuration of the library files. But that also didn't work and it doesn't change the error.
apt-get install
method to install Audacity so any errors in incompatible versions should be raised that way. – tversteeg