audio-playback icon indicating copy to clipboard operation
audio-playback copied to clipboard

No sound and PCM warnings on Ubuntu 16.04

Open dfaulken opened this issue 7 years ago • 2 comments

Thanks for the great library – worked on Mac without any problems.

I'm trying to use my project on Ubuntu 16.04, on which I've installed portaudio19-dev and libsndfile1-dev. The gem then installs without problems.

Trying to play files from a Ruby script, I see the following warnings. The script does not exit, but I don't hear any sound:

ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib setup.c:548:(add_elem) Cannot obtain info for CTL elem (MIXER,'IEC958 Playback Default',0,0,0): No such file or directory
ALSA lib setup.c:548:(add_elem) Cannot obtain info for CTL elem (MIXER,'IEC958 Playback Default',0,0,0): No such file or directory
ALSA lib setup.c:548:(add_elem) Cannot obtain info for CTL elem (MIXER,'IEC958 Playback Default',0,0,0): No such file or directory
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline

I can comment out the lines relating to the unknown PCMs in /usr/share/alsa/alsa.conf, but that doesn't make the middle three lines go away, nor does it fix the issue (no audio).

I have tried aplaying the WAV files in question and that works fine.

Appreciate any thoughts as to how I can get audio working.

dfaulken avatar Jan 23 '18 19:01 dfaulken

@dfaulken

Cool project

Unfortunately, I'm unable to repro this issue on my Ubuntu setup.

Googling around, I get the impression that this is related most directly to PortAudio. I see that there are a number of reports of these "Cannot obtain info for CTL elem" errors. In addition to PortAudioo, I recommend searching pyaudio reports too since that library is similarly based on PortAudio.

Let me know if you make any progress, I'm happy to weigh in again at any point. Wish I had more for you right now...

arirusso avatar Jan 24 '18 16:01 arirusso

@arirusso Thanks for the quick response! Understood, I'll look in that direction.

dfaulken avatar Jan 24 '18 16:01 dfaulken