AudioOutputExample fail on Ubuntu 14.04 LTS

Hi!

It’s couple weeks i try to figure out why AudioOutputExample don’t produce sound.
At begining i tryed to uninstall PulseAudio to have only Alsa for direct access to sound card.
But too much troubles, loose the sound, too much dependencies to solve. So i reinstall pulseAudio, test alsamixer, and get back sound out from minijack output and laptop speakers…
Anyways, after this i also try call the function
pasuspender bash
to have direct acces to sound card (as suggested here)
it seems work because it cut the audio stream of a webpage if the browser is open,
and it suppress an error message like ‘…system busy’ sended by AudioOutputExample
But nothing changed :frowning:

It seems RtAudio don’t work properly on linux. Or should i try to install linux-rt has mentionned Arturo ?

Any ideas ?

try selecting the deviceID manually, you can get a device list from the sound stream sometimes in latest versions of ubuntu it seems it’s selecting the hdmi out in the computer so you don’t here anysound. usually figuring out which is the correct device solves the issue.

Hi Arturo!

Ok, i check my sound card,

aplay -l

**** List of PLAYBACK Hardware Devices **** 

Card 0: HDMI [HDA
Intel HDMI], peripheral 3: 0 HDMI [HDMI 0] 

   Sub-Device: 1/1 
   Subdevice # 0:
subdevice # 0 

Card 0: HDMI [HDA
Intel HDMI], peripheral 7: 1 HDMI [HDMI 1] 

   Sub-Device: 1/1 
   Subdevice # 0:
subdevice # 0 

Card 0: HDMI [HDA
Intel HDMI], peripheral 8: 2 HDMI [HDMI 2] 

   Sub-Device: 1/1 
   Subdevice # 0:
subdevice # 0 

Card 1: PCH [HDA
Intel PCH], device 0: ALC668 Analog [ALC668 Analog] 

   Sub-Device: 1/1 
   Subdevice # 0:
subdevice # 0 

If my sound card (PCM?) is ALC668 Analog i should target on Card 1
As i rode , device selection could performed by file /etc/asound.conf:

pcm.!default {
 type
 hw
 card 1
}
ctl.!default {
 type
 hw           
 card 1
}

Then i reboot to check if any change and call :

aplay-l
*** List of PLAYBACK Hardware Devices ****
Card 0: HDMI [HDA Intel
HDMI], peripheral 3: 0 HDMI [HDMI 0]
   Sub-Device:
1/1
   Subdevice # 0: subdevice # 0
Card 0: HDMI [HDA
Intel HDMI], peripheral 7: 1 HDMI [HDMI 1]
  
Sub-Device: 1/1
   Subdevice # 0: subdevice # 0
Card
0: HDMI [HDA Intel HDMI], peripheral 8: 2 HDMI [HDMI 2]
  
Sub-Device: 1/1
   Subdevice # 0: subdevice # 0
Card
1: PCH [HDA Intel PCH], device 0: ALC668 Analog [ALC668 Analog]
  
Sub-Device: 0/1
   Subdevice # 0: subdevice # 0

It seems asound.conf not working or i’m probably wrong somewhere…

I also tryed to set device by adding in /etc/modprobe.d/alsa-base.conf,

at the end :

options snd-hda-intel model=pch position_fix=1

Still no success

How would you set manually the deviceID ?

Uncomment this line: https://github.com/openframeworks/openFrameworks/blob/2347d2f/examples/sound/audioOutputExample/src/ofApp.cpp#L28

I remember had to set it manually too.

Oh god ! i feel so stupid :flushed:
I rode so many articles that make me blind and forget just to read all the source code before do something.
Thank’s a lot, you save me !!.