problem with audio in linux (PortAudio)

i have installed ubuntu 11.04 yesterday on my notebook (before i used ubuntu on an external Usb pen on the same pc) no problems with ubuntu , i can use differents multimedia softwares (jack, puredata and other players). i have also installed the new version of Openframework (007) ( before i used always the 007 version but one of 6 months ago, there are i think differences between…) . i’ve compiled the sound examples , all the compile process went to a completely succesfullness. But the apps don’t works at all, i don’t hear any sounds and also the graphical rappresentations of the sounds is missed. i’m referencing to audioInputExample and audioOutputExample. The same unluck with the ofxPD addon … comilation ok but no sound at all .
in the console i receive this error:

walter@walter-VGN-AR51E:~$ cd ‘/home/walter/openframeworks_007/apps/examples/audioOutputExample’


walter@walter-VGN-AR51E:~/openframeworks_007/apps/examples/audioOutputExample$ cd bin

walter@walter-VGN-AR51E:~/openframeworks_007/apps/examples/audioOutputExample/bin$ ./audioOutputExample_debug
OF: OF_LOG_ERROR: PortAudio error: Invalid device

as you can see it output PortAudio error… so look to my devices:

walter@walter-VGN-AR51E:~$ arecord -l
**** Lista di CAPTURE dispositivi hardware ****
scheda 0: Intel [HDA Intel], dispositivo 0: STAC92xx Analog [STAC92xx Analog]
Sottoperiferiche: 1/1
Sottoperiferica #0: subdevice #0

and i have changed my device in my testApp as you can see in the image. but nothing change…
i have installed all the dependencies with the .sh script, so i don’t understand what happens here…
Is it a bug this or someone else have had this issue? may i solve it?

thanks for the attention.

in some computers portaudio seems to not be detecting the default device properly. you can list the devices with listDevices() and try different options or switch to rtAudio:

listDevices() don’t works…
i have searched in the forum for this issues but i haven’t seen this post… many thanks @arturo ! i will try tomorrow!

i solved the problem putting a #define to RTAudio into ofCostant.h , now all the examples and my apps works fine. thanks again to @arturo