libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.38k stars 1.84k forks source link

[ERROR] Failed to initialize audio driver. Will continue without audio #14636

Open chomwitt opened 2 years ago

chomwitt commented 2 years ago

Description

Hi. I build retroarch from https://github.com/libretro/RetroArch.git Retroarch open successfully and work ok but i dont have sound in games i tried with various cores.

I tried all the sound settings but nothing.

Steps to reproduce the bug

Build retroarch from https://github.com/libretro/RetroArch.git in Devuan Stable.

$ ./retroarch -v [INFO] [Audio]: Set audio input rate to: 48000.00 Hz. .... [ERROR] Failed to initialize audio driver. Will continue without audio. [ERROR] failed_to_start_audio_driver

$ ./retroarch --features ALSA: Audio driver: yes OSS: Audio driver: yes

Version/Commit

2103280fdd

Environment information

System: Host: enous Kernel: 5.10.0-18-amd64 x86_64 bits: 64 Desktop: awesome 4.3 Distro: Devuan GNU/Linux 4 (chimaera)

hizzlekizzle commented 2 years ago

Can you attach (or link to) a full verbose log? Do you have audio if you run our official AppImage package? http://buildbot.libretro.com/nightly/linux/x86_64/RetroArch.7z

chomwitt commented 2 years ago

@hizzlekizzle I try to compile it because i got no sound with appimage and flatpack and itch.io But i'll tried also the one in your link. Yes no sound either.

$ ./retroarch --verbose
[INFO] [Config]: Looking for config in: "/home/chomwitt/.config/retroarch/retroarch.cfg".
[INFO] RetroArch 1.12.0 (Git 2103280fdd)
[INFO] === Build =======================================
[INFO] CPU Model Name: AMD Ryzen 9 5900X 12-Core Processor            
[INFO] Capabilities:  MMX MMXEXT SSE SSE2 SSE3 SSE4 SSE4.2 AES AVX AVX2
[INFO] Built: Nov 17 2022
[INFO] Version: 1.12.0
[INFO] Git: 2103280fdd
[INFO] =================================================
[INFO] [Input]: Found input driver: "x".
[INFO] [Environ]: SET_PIXEL_FORMAT: RGB565.
[INFO] [Core]: Version of libretro API: 1, Compiled against API: 1
[INFO] [Audio]: Set audio input rate to: 48000.00 Hz.
[INFO] [Video]: Set video size to: 960x720.
[ERROR] [Wayland]: Failed to connect to Wayland server.
[INFO] [GLX]: GLX_EXT_swap_control_tear supported.
[INFO] [GL]: Found GL context: "x".
[INFO] [GL]: Detecting screen resolution: 5360x1440.
[INFO] [GLX]: X = 0, Y = 0, W = 960, H = 720.
[INFO] [GLX]: Found swap function: glXSwapIntervalEXT.
[INFO] [GL]: Vendor: AMD, Renderer: Radeon RX 570 Series (POLARIS10, DRM 3.40.0, 5.10.0-18-amd64, LLVM 11.0.1).
[INFO] [GL]: Version: 4.6 (Compatibility Profile) Mesa 20.3.5.
[INFO] [GL]: Using resolution 960x720.
[INFO] [GL]: Default shader backend found: glsl.
[INFO] [Shader driver]: Using GLSL shader backend.
[INFO] [GLSL]: Checking GLSL shader support ...
[WARN] [GL]: Stock GLSL shaders will be used.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GLSL]: Found GLSL vertex shader.
[INFO] [GLSL]: Found GLSL fragment shader.
[INFO] [GLSL]: Linking GLSL program.
[INFO] [GL]: Using 4 textures.
[INFO] [GL]: Loaded 1 program(s).
[INFO] [GL]: Using GL_RGB565 for texture uploads.
[INFO] [udev]: Pad #0 (/dev/input/event7) supports force feedback.
[INFO] [udev]: Pad #0 (/dev/input/event7) supports 16 force feedback effects.
[INFO] [Autoconf]: Logitech Gamepad F310 (1133/49693) not configured.
[INFO] [Joypad]: Found joypad driver: "udev".
[INFO] [X11]: Suspending screensaver (X11, xdg-screensaver).
[INFO] [Video]: Found display server: "x11".
[ERROR] Failed to initialize audio driver. Will continue without audio.
[INFO] [Display]: Found display driver: "gl".
[INFO] [SRAM]: SRAM will not be saved.
[INFO] [Playlist]: Loading history file: "/home/chomwitt/.config/retroarch/content_history.lpl".
[INFO] [Playlist]: Loading history file: "/home/chomwitt/.config/retroarch/content_music_history.lpl".
[INFO] [Playlist]: Loading history file: "/home/chomwitt/.config/retroarch/content_image_history.lpl".
[INFO] [Playlist]: Loading favorites file: "/home/chomwitt/.config/retroarch/content_favorites.lpl".
[ERROR] failed_to_start_audio_driver
[INFO] [Config]: Saved new config to "/home/chomwitt/.config/retroarch/retroarch.cfg".
[ERROR] failed_to_start_audio_driver
[INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 00 seconds.
[INFO] [Core]: Unloading core..
[INFO] [Core]: Unloading core symbols..
[INFO] [XINERAMA]: Xinerama version: 1.1.
[INFO] [XINERAMA]: Xinerama screens: 2.
[INFO] [XINERAMA]: Saved monitor #0.
[INFO] [Video]: Average monitor Hz: 59.977209 Hz. (2.036 % frame time deviation, based on 2048 last samples).
LibretroAdmin commented 2 years ago

Which audio driver is it attempting to use?

chomwitt commented 2 years ago

Ok. i changed to alsa from sound/settings i restarted and a50f9ba worked. I'll check the other versions . 840c448 ok too ( that must be the appimage from retroarch site) 2103280fdd (build from https://github.com/libretro/RetroArch.git also ok)

It seems in my troubleshooting i must have done something wrong. Retroarch starts with 'pulse' audio driver set and so it complain starting up if it wont find it. So changing it to alsa helps.

But I remember for sure changing the audio driver and not having audio in 840c448 .

One other thing that could messed things is on trying various version each used ~/.conifg/retroarch so in my latest tries i was carefull to delete ~/.conifg/retroarch each time i wanted to test another version.

chomwitt commented 2 years ago

I did a small test and it seems that differeht builds use the same ~/.conifg/retroarch. What should i do to have separate retroarch installations ? I take a look at -c, --config=FILE but i am not sure how to use it and if it will lead to a seperate installation. Also in Settings/Directory most settings seems to use ~/.conifg/retroarch. So how can i change that folder? Must i do it in compile time ?

hizzlekizzle commented 2 years ago

the -c switch will indeed load a different config file, but you'll need to specify that on each launch. There is no way to make all of the paths look in a different location aside from replacing those paths with new paths. However, the AppImage comes with a 'portable home directory' that will do what you want.