Could not open audio device (in Ubuntu)

Ask for help with ScummVM problems

Moderator: ScummVM Team

Post Reply
andy_blah
Posts: 35
Joined: Thu Sep 07, 2006 7:44 am

Could not open audio device (in Ubuntu)

Post by andy_blah »

Using configuration file: /home/andy/.scummvmrc
ALSA lib pcm.c:2105:(snd_pcm_open_conf) Cannot open shared library /usr/lib/alsa-lib/libasound_module_pcm_pulse.so
WARNING: Could not open audio device: No available audio device!

This is what I get in the terminal every time I start ScummVM. I`m a Ubuntu newbie, so please include as much detail as possible at the solution.

Specifications:
Ubuntu 7.10 (Gutsy Gibbon)
ScummVM 0.11.1 (from the .deb package of this site)

Please request more specs if needed

Thank-you in advance,
>-Andy-<
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3561
Joined: Mon Oct 31, 2005 7:39 am

Re: Could not open audio device (in Ubuntu)

Post by eriktorbjorn »

andy_blah wrote: ALSA lib pcm.c:2105:(snd_pcm_open_conf) Cannot open shared library /usr/lib/alsa-lib/libasound_module_pcm_pulse.so
According to the Ubuntu Packages Search page, the libasound_module_pcm_pulse.so file is in the libasound2-plugins package. But I don't use Ubuntu myself, so I don't know why it's needed, or if having it fixes the problem.
andy_blah
Posts: 35
Joined: Thu Sep 07, 2006 7:44 am

Post by andy_blah »

Thank-you for your help, I think it has fixed a problem but still there is a error message that is displayed in the Terminal:

Code: Select all

*** PULSEAUDIO&#58; Unable to connect&#58; Connection refused
WARNING&#58; Could not open audio device&#58; No available audio device!
And after starting a game (Maniac Mansion):

Code: Select all

Looking for maniac
Trying to start game 'Maniac Mansion'
WARNING&#58; Sound mixer initialization failed!
WARNING&#58; MIDI driver depends on sound mixer, switching to null MIDI driver
!
Enhanced V2 game detected
Thank-you in advance,
>-Andy-<
andy_blah
Posts: 35
Joined: Thu Sep 07, 2006 7:44 am

Post by andy_blah »

Never mind, I have found that I used set-pulseaudio in asoundconf. It works now ^_^
User avatar
abelthorne
Posts: 43
Joined: Fri Jun 02, 2006 11:50 am
Location: France

Post by abelthorne »

Hello,
I have the same problem and although installing libsdl-pulseaudio fixes it, I don't wan't to, as other SDL apps rely on libsdl-alsa (installing libsdl-pulseaudio removes it, installing libsdl-all has the same problem than with libsdl-alsa although it should incorporate support for PulseAudio).

I'm using ScummVM from the Ubuntu repositories (Hardy).

It seems that SDL in general has troubles with PulseAudio and the usual workaround seems to set SDL_AUDIODRIVER to "esd". It worked for Enemy Territory on my system, it worked for ScummVM on a Fedora 8 user's system (according to another post here), but it doesn't work for ScummVM on my system.

If setting SDL_AUDIODRIVER to "alsa" or keeping it as default (which, I guess, is "alsa"), ScummVM plays no sound and crashes on exit.
If setting SDL_AUDIODRIVER to "esd", ScummVM doesn't crash anymore, but it still plays no sound and displays "no available audio device" on startup.

Any idea ?
User avatar
abelthorne
Posts: 43
Joined: Fri Jun 02, 2006 11:50 am
Location: France

Post by abelthorne »

Well, I found out how to temporally fix the problem.

I installed libsdl-all (so that every sound output engine is available to SDL apps: the Ubuntu package is libsdl1.2debian-all). To run ScummVM, I have to set SDL_AUDIODRIVER as "pulse" so that it uses PulseAudio (in a terminal, type export SDL_AUDIODRIVER="pulse" then run ScummVM with scummvm. You may want to create a script that does so, as the export command is local to the terminal session; i.e. when you close it, SDL_AUDIODRIVER is not set anymore).
User avatar
eriktorbjorn
ScummVM Developer
Posts: 3561
Joined: Mon Oct 31, 2005 7:39 am

Post by eriktorbjorn »

abelthorne wrote:You may want to create a script that does so, as the export command is local to the terminal session; i.e. when you close it, SDL_AUDIODRIVER is not set anymore).
I think you could also type SDL_AUDIODRIVER=pulse scummvm (as one command, no export), to have the variable assignment only affect that one command.
Post Reply