Failed to initialize audio driver

Hello. Sorry to start the 2nd post so soon.

But I find my game is without sound now. I checked the log it says “failed to initialize audio driver”

My system has ALSA installed but retroarch told me the only available driver is “oss”

So I had to choose oss for audio driver so that retroach would allow me to start. But now it can start just without sound.

In audio settings I have left the “audio device” blank coz I don’t know what to put in. Is that the problem?

Opensuse 12.3(latest stable version) 64bit

Thanks in advance.

When you configure/compile, you’ll need to have the correct development libraries for the sound libraries you want to have available. For alsa, I believe that would be alsa-devel on your system.

If you’re noticing a pattern, RetroArch will compile with a bare minimum of functionality according to the development libraries you have available at configure/compile-time. To get a fully functional build, you’ll need the opensuse equivalents of these debian packages (may be missing a few, but this is most of them): libsdl1.2-dev, libasound2-dev, libxv-dev, libopenal-dev, libsamplerate0-dev, libxml2-dev, nvidia-cg-toolkit, libswscale-dev, libsdl-ttf2.0-dev, libfreetype6-dev, libsdl-image1.2-dev, libgbm-dev, libdrm-dev, libegl1-mesa-dev, libavcodec-dev

Thank you for the reply.

Sorry, but what should I do now? Do I need to recompile from the start? Everything else works fine.

And I have checked that I have alsa-devel already installed.

If I need to recompile the whole thing, I intend to use alsa as the audio driver, which I believe is what my OS is using. Which library in your list should I add? Thank you !

You can try running ‘retroarch --features’ from a command line to see which features/drivers are currently available. If alsa is listed as ‘yes’ then we’ll have to figure out why it’s failing to initialize. If it’s listed as ‘no’ we’ll have to figure out why it’s not being picked up when you configure.

OK. Here’s the result.

ALSA:
                audio driver: no
        OSS:
                audio driver: yes
        Jack:
                audio driver: no
        RSound:
                audio driver: no
        RoarAudio:
                audio driver: no
        PulseAudio:
                audio driver: no
        DirectSound:
                audio driver: no
        XAudio2:
                audio driver: no

BTW, it’s the “oss” driver that failed to initialize. I couldn’t choose alsa for retroarch would fail to even start up if I choose it as the audio driver.

Your build doesn’t have the alsa driver compiled in, so either the library wasn’t present when you configured (i.e., you installed it later or something) or pkg-config couldn’t find the installed library properly at compile time.

fortunately recompiling is quite quick and easy. I have had this same experience when first getting started on my arch linux system but all you need to do is install the packages mentioned and recompile. Be sure to backup your configs just in case so you don’t have to reconfigure anything and you should be good from there.

Hello.

I recompiled retroarch. Now when I do

retroarch --feature

in CLI,

It shows yes for ALSA. I chose ALSA as the audio driver.

Nevertheless, the sound is still missing.

This is the log ALSA lib dlmisc.c:236:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib64/alsa-lib/libasound_module_pcm_pulse.so RetroArch [ERROR] :: ALSA: Failed to initialize… RetroArch [ERROR] :: Failed to initialize audio driver. Will continue without audio.

I searched libasound package with

zypper search libasound

It showed that I have installed libasound2 and libasound2-32bit

Am I still missing some library? My music is on when I compile. Does that matter?

zypper search pulse
S | Name                                     | Summary                                                                 | Type      
--+------------------------------------------+-------------------------------------------------------------------------+-----------
i | alsa-plugins-pulse                       | Pulseaudio Plug-In for the ALSA Library                                 | package   
  | alsa-plugins-pulse-32bit                 | Pulseaudio Plug-In for the ALSA Library                                 | package   
  | alsa-plugins-pulse-debuginfo             | Debug information for package alsa-plugins-pulse                        | package   
  | alsa-plugins-pulse-debuginfo-32bit       | Debug information for package alsa-plugins-pulse                        | package   
  | audacious-plugins-output-pulse           | Pulseaudio support plugins for Audacious                                | package   
  | audacious-plugins-output-pulse-debuginfo | Debug information for package audacious-plugins-output-pulse            | package   
  | cmus-plugin-pulse                        | Pulseaudio Output Plugin for the cmus Music Player                      | package   
  | libgvncpulse-1_0-0                       | Pulse audio bridge for VNC client connections                           | package   
  | libgvncpulse-1_0-0-debuginfo             | Debug information for package libgvncpulse-1_0-0                        | package   
  | libpt2_10_9-plugins-pulse                | Pulseaudio support for libpt2                                           | package   
  | libpt2_10_9-plugins-pulse-debuginfo      | Debug information for package libpt2_10_9-plugins-pulse                 | package   
  | libpulse-devel                           | Development package for the pulseaudio library                          | package   
i | libpulse-mainloop-glib0                  | GLIB 2.0 Main Loop wrapper for PulseAudio                               | package   
i | libpulse-mainloop-glib0-32bit            | GLIB 2.0 Main Loop wrapper for PulseAudio                               | package   
  | libpulse-mainloop-glib0-debuginfo        | Debug information for package libpulse-mainloop-glib0                   | package   
  | libpulse-mainloop-glib0-debuginfo-32bit  | Debug information for package libpulse-mainloop-glib0                   | package   
i | libpulse0                                | Client interface to PulseAudio                                          | package   
i | libpulse0-32bit                          | Client interface to PulseAudio                                          | package   
  | libpulse0-debuginfo                      | Debug information for package libpulse0                                 | package   
  | libpulse0-debuginfo-32bit                | Debug information for package libpulse0                                 | package   
i | libxine2-pulse                           | Pulseaudio plugin for xine                                              | package   
  | libxine2-pulse-debuginfo                 | Debug information for package libxine2-pulse                            | package   
  | mpg123-pulse                             | Pulseaudio Support for mpg123                                           | package   
  | mpg123-pulse-32bit                       | Pulseaudio Support for mpg123                                           | package   
  | mpg123-pulse-debuginfo                   | Debug information for package mpg123-pulse                              | package   
  | mpg123-pulse-debuginfo-32bit             | Debug information for package mpg123-pulse                              | package   
i | pulseaudio                               | A Networked Sound Server                                                | package   
  | pulseaudio                               | A Networked Sound Server                                                | srcpackage
  | pulseaudio-debuginfo                     | Debug information for package pulseaudio                                | package   
  | pulseaudio-debugsource                   | Debug sources for package pulseaudio                                    | package   
  | pulseaudio-equalizer                     | 15 Band Equalizer for PulseAudio                                        | package   
  | pulseaudio-equalizer                     | 15 Band Equalizer for PulseAudio                                        | srcpackage
  | pulseaudio-esound-compat                 | ESOUND compatibility for PulseAudio                                     | package   
  | pulseaudio-gdm-hooks                     | PulseAudio GDM integration                                              | package   
  | pulseaudio-lang                          | Languages for package pulseaudio                                        | package   
i | pulseaudio-module-bluetooth              | Bluetooth support for the PulseAudio sound server                       | package   
  | pulseaudio-module-bluetooth-debuginfo    | Debug information for package pulseaudio-module-bluetooth               | package   
  | pulseaudio-module-gconf                  | GCONF module for PulseAudio                                             | package   
  | pulseaudio-module-gconf-debuginfo        | Debug information for package pulseaudio-module-gconf                   | package   
i | pulseaudio-module-jack                   | JACK support for the PulseAudio sound server                            | package   
  | pulseaudio-module-jack-debuginfo         | Debug information for package pulseaudio-module-jack                    | package   
i | pulseaudio-module-lirc                   | LIRC module for PulseAudio                                              | package   
  | pulseaudio-module-lirc-debuginfo         | Debug information for package pulseaudio-module-lirc                    | package   
i | pulseaudio-module-x11                    | X11 module for PulseAudio                                               | package   
  | pulseaudio-module-x11-debuginfo          | Debug information for package pulseaudio-module-x11                     | package   
i | pulseaudio-module-zeroconf               | Zeroconf module for PulseAudio                                          | package   
  | pulseaudio-module-zeroconf-debuginfo     | Debug information for package pulseaudio-module-zeroconf                | package   
i | pulseaudio-utils                         | PulseAudio utilities                                                    | package   
  | pulseaudio-utils-debuginfo               | Debug information for package pulseaudio-utils                          | package   
  | typelib-1_0-GVncPulse-1_0                | Pulse audio bridge for VNC client connections -- Introspection bindings | package   
  | xmms2-plugin-pulse                       | Pulse Support for xmms2                                                 | package   
  | xmms2-plugin-pulse-debuginfo             | Debug information for package xmms2-plugin-pulse                        | package 

Maybe you’re running pulse, try pasuspend before running retroarch

pasuspend : command not found

Force reinstalled alsa-plugin-pulse now it’s OK !

THank you. I don’t know why the package was broken though.

Oh well, whatever works! Thanks for sharing your solution with us :slight_smile:

I solved it by starting retroarch without any command line options so you get presented with all kinds of options. One of them is sound. Once I selected that I could select all kind of audio drivers. I choose sdl2 and that worked fine.