It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Game outputs no sound during gameplay.

The intro and chapter movies play normally with sound.

I tried with 3 different sound cards (HDMI, on board, usb-external) and had the same result.

Any ideas/suggestions?
No posts in this topic were marked as the solution yet. If you can help, add your reply
I have been trying to identify the problem, but nothing definitive so far.

# strace ./start.sh
http://pastebin.com/hrtsw12Q

I believe the executable fails to identify the correct alsa output:

= ALSA =
0 - "default:CARD=SB"
1 - "hdmi:CARD=HDMI,DEV=1"
2 - "hdmi:CARD=HDMI,DEV=2"
3 - "hdmi:CARD=HDMI,DEV=3"
4 - "hdmi:CARD=HDMI,DEV=4"
5 - "hdmi:CARD=HDMI,DEV=5"
6 - "dmix:CARD=HDMI,DEV=3"
7 - "dmix:CARD=HDMI,DEV=7"
8 - "dmix:CARD=HDMI,DEV=8"
9 - "dmix:CARD=HDMI,DEV=9"
10 - "dmix:CARD=HDMI,DEV=10"
11 - "dmix:CARD=HDMI,DEV=11"
ALSA lib pcm_dsnoop.c:556:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
12 - "dsnoop:CARD=HDMI,DEV=3"
ALSA lib pcm_dsnoop.c:556:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
13 - "dsnoop:CARD=HDMI,DEV=7"
ALSA lib pcm_dsnoop.c:556:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
14 - "dsnoop:CARD=HDMI,DEV=8"
ALSA lib pcm_dsnoop.c:556:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
15 - "dsnoop:CARD=HDMI,DEV=9"
ALSA lib pcm_dsnoop.c:556:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
16 - "dsnoop:CARD=HDMI,DEV=10"
ALSA lib pcm_dsnoop.c:556:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
17 - "dsnoop:CARD=HDMI,DEV=11"
18 - "hw:CARD=HDMI,DEV=3"
19 - "hw:CARD=HDMI,DEV=7"
20 - "hw:CARD=HDMI,DEV=8"
21 - "hw:CARD=HDMI,DEV=9"
22 - "hw:CARD=HDMI,DEV=10"
23 - "hw:CARD=HDMI,DEV=11"
24 - "plughw:CARD=HDMI,DEV=3"
25 - "plughw:CARD=HDMI,DEV=7"
26 - "plughw:CARD=HDMI,DEV=8"
27 - "plughw:CARD=HDMI,DEV=9"
28 - "plughw:CARD=HDMI,DEV=10"
29 - "plughw:CARD=HDMI,DEV=11"
30 - "hdmi:CARD=HDMI,DEV=0"
31 - "sysdefault:CARD=SB"
Picking Output[11] Driver[31] and SpeakerMode[3]
Anyone having the same problem?

Edit:

Also tried forcing SDL to load a specific device, but I still get no sound after intro movie.
# SDL_AUDIODRIVER=alsa ./start.sh
# AUDIODEV=hw:2,0 ./start.sh
# SDL_AUDIODRIVER=alsa AUDIODEV=hw:2,0 ./start.sh
Post edited November 26, 2016 by zeden
Upon further investigation, if I remove the external usb-sound-card and set the onboard audio as default, the game will start with intro movies muted, but the game sound effects will play normally.

This is not ideal, but at least I can play the game.

It seems the game/SDL cannot find the external sound card when probing available sound card/devices.
I think I get the same issue.
I suspect that it has to do with that I do not use PulseAudio.
I also use an external USB device, which I have set as my default (UA25).
I think the SDL env variables do not help because the game uses FMOD for audio.
It is pretty obvious that the game does something stupid here, since it works with everything else.
Does anyone know of a way to tell FMOD which output to use?

$ ./start.sh
Running Darkest Dungeon
plinthConfiguration() called.
option: appname "Darkest Dungeon"
option: shortname "darkest"
option: vsync "1"
Setting random seed: 931056448 (0x377ecb40)
Read 'pin' file: #root folder#
plinthStart() called.
Available sound Drivers:
= ALSA =
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

0 - "pulse"
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
1 - "sysdefault:CARD=UA25"
2 - "front:CARD=UA25,DEV=0"
3 - "surround21:CARD=UA25,DEV=0"
4 - "surround40:CARD=UA25,DEV=0"
5 - "surround41:CARD=UA25,DEV=0"
6 - "surround50:CARD=UA25,DEV=0"
7 - "surround51:CARD=UA25,DEV=0"
8 - "surround71:CARD=UA25,DEV=0"
9 - "iec958:CARD=UA25,DEV=0"
10 - "sysdefault:CARD=PCH"
11 - "front:CARD=PCH,DEV=0"
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
12 - "surround21:CARD=PCH,DEV=0"
13 - "surround40:CARD=PCH,DEV=0"
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
14 - "surround41:CARD=PCH,DEV=0"
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
15 - "surround50:CARD=PCH,DEV=0"
16 - "surround51:CARD=PCH,DEV=0"
17 - "surround71:CARD=PCH,DEV=0"
18 - "hdmi:CARD=PCH,DEV=0"
19 - "hdmi:CARD=PCH,DEV=1"
20 - "hdmi:CARD=PCH,DEV=2"
21 - "sysdefault:CARD=Loopback"
22 - "front:CARD=Loopback,DEV=0"
23 - "surround21:CARD=Loopback,DEV=0"
24 - "surround40:CARD=Loopback,DEV=0"
25 - "surround41:CARD=Loopback,DEV=0"
26 - "surround50:CARD=Loopback,DEV=0"
27 - "surround51:CARD=Loopback,DEV=0"
28 - "surround71:CARD=Loopback,DEV=0"
Picking Output[11] Driver[1] and SpeakerMode[3]
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
FMOD error! (51) Error initializing output device.
FMOD error! (30) An invalid object handle was used.
FMOD error! (30) An invalid object handle was used.
Initialized Audio.
FMOD error! (30) An invalid object handle was used.
It turned out that in my case it was due to my rather obscure alsa routing setup. I still wonder why it does not work when everything else works, but at least it's fine with the default .asounrc.
avatar
zeden: Game outputs no sound during gameplay.

The intro and chapter movies play normally with sound.

I tried with 3 different sound cards (HDMI, on board, usb-external) and had the same result.

Any ideas/suggestions?
Are you still experiencing this with version 17449?
avatar
zeden: Game outputs no sound during gameplay.

The intro and chapter movies play normally with sound.

I tried with 3 different sound cards (HDMI, on board, usb-external) and had the same result.

Any ideas/suggestions?
avatar
JudasIscariot: Are you still experiencing this with version 17449?
Yep, still the same. It definitely does not pick up the ALSA_CARD variable. I wish I knew what "Picking Output[11] Driver[1] and SpeakerMode[3]" refers to, that would help debugging.
avatar
zeden: Game outputs no sound during gameplay.

The intro and chapter movies play normally with sound.

I tried with 3 different sound cards (HDMI, on board, usb-external) and had the same result.

Any ideas/suggestions?
avatar
JudasIscariot: Are you still experiencing this with version 17449?
Yes, I still have this issue. Right now I switch to my onboard sound card when playing this game.

Sorry for the late response.
I was finally about to post my problem to the Darkest Dungeon forums when I found a solution.
Contrary to what I said before, Darkest Dungeon does respect the ALSA_CARD variable.
Hence the solution in my case was: export ALSA_CARD='Loopback'
The card name will be different for you, aplay -l is the easiest way to find the available names on your system.

EDIT:
I was wrong once more.
The game audio is inconsistent. I believe they use two distinct systems for the videos (at least the intro) and the game.
The video system honors the ALSA_CARD variable but the game system does not.
Post edited April 02, 2017 by hollunder
This evening I tested a hypothesis I had, and it seems to be correct.
Here is how sound in Darkest Dungeon works:

The videos use a system (might be SDL2) that uses the default sound card and respects the default sound card settings. This can be set using various ways, for example through the ALSA_CARD env variable.

The actual game uses a different system, FMOD Studio, which always uses the sound card with index 0. There appears to be no user controllable way to change this. It is possible to manually assign indices to sound cards using /etc/modprobe.d and this requires a reboot to work AFAIK.

If you have only a single sound card, then it will have index 0 by default and it will be the default sound card as well. No problem. If you have more than one and your default is set to anything other than the index 0 sound card, then you will likely only hear either the videos or the in-game sounds.

@zeden, as far as I can tell from your description your on-board sound card had the index 0 and you had the USB set as default. You can force the USB card to index 0 and you should be able to hear everything through the USB card.
Here is one guide for doing this: https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture#Set_the_default_sound_card

I will report this problem to the developers. Maybe we will get some nicer solution.
Hi, @hollunder!

Indeed your information is correct. The intro respect ALSA_CARD, .asoundrc and other variables to select the desired sound card output.

Right now, my alsa cards are indexed as:
0 - Onboard sound (only used for Darkest Dungeon)
1 - HDMI (attached to my tv and used only for movies)
2 - external usb-sound card (Default card which I remove when I change PCs)

Indexing my external card as "0" makes my system inconsistent whenever I remove my usb-sound card (happens 3-5 times a week).

Since my use case is specific, I will keep changing cards until I find a better option.

Thank you for taking your time and investigating this issue!

If you need me to perform any test in the meantime, let me know.
For anyone else who has this problem and does have pulseaudio installed:

I had Pulse Audio Volume Control (pavucontrol) also installed (sudo apt-get install pavucontrol)

I started the game got past the intro-screen then alt-tabbed, then selected the card I wanted to play on, in this case usb headphones.

See attached image
Attachments:
screen.png (255 Kb)
Post edited June 24, 2017 by dmw1988