UltraStar-Deluxe / USDX

The free and open source karaoke singing game UltraStar Deluxe, inspired by Sony SingStar™
https://usdx.eu
GNU General Public License v2.0
851 stars 161 forks source link

Sound issues #136

Closed blacktemplar closed 7 years ago

blacktemplar commented 8 years ago

I am not sure if this is a bug or just misconfiguration on my side, but I have no idea how to fix the following problem and I also couldn't find help via searching in the web.

I installed USDX on my arch linux machine via the AUR ultrastardx-git, the installation worked without errors and I can start the program, but there is just no sound, neither in the menu nor when singing a song.

This is the console output when starting USDX:

ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave [11/2011]
ALSA lib pcm_dmix.c:1041:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_dmix.c:1041:(snd_pcm_dmix_open) unable to open slave
connect(2) call to /dev/shm/jack-1056/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: Interlace handling should be turned on when using png_read_image
libpng warning: Interlace handling should be turned on when using png_read_image
libpng warning: Interlace handling should be turned on when using png_read_image
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: Interlace handling should be turned on when using png_read_image
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: Interlace handling should be turned on when using png_read_image
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: Interlace handling should be turned on when using png_read_image
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: cHRM chunk does not match sRGB
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: Interlace handling should be turned on when using png_read_image
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
basisbit commented 8 years ago

connect(2) call to /dev/shm/jack-1056/default/jack_0 failed (err=No such file or directory) attempt to connect to server failed

Looks like a bad audio configuration on your machine.

blacktemplar commented 8 years ago

It seams so, but the weird thing is that the sound works on my machine for all other programs.

Maybe you can help me where to search for the wrong configuration... I am quite overwhelmed of the different interconnections of pavu, alsa and so on.

Emily9121 commented 8 years ago

I don't know much for your issue, if you don't have pulse you could always try, else it really seem something specific to your machine.

When I launch USDX here, I get almost the same output, except I don't have this line (And I have audio) ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave [11/2011]

blacktemplar commented 8 years ago

I just tried to run the test program TestPortAudioDevice and got the following output:

$ ./TestPortAudioDevice
Start: Test of Portaudio libs

*** Test of Pa_OpenStream and Pa_CloseStream ***
ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave
                                                                    ALSA lib pcm_dmix.c:1041:(snd_pcm_dmix_open) unable to open slave
                                                                                                                                     ALSA lib pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
              ALSA lib pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
                                                                                          ALSA lib pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
                                                                                                                                                                ALSA lib pcm_dmix.c:1041:(snd_pcm_dmix_open) unable to open slave
                                    connect(2) call to /dev/shm/jack-1056/default/jack_0 failed (err=No such file or directory)
                                                                                                                               attempt to connect to server failed
                                                                                                                                                                  Device[0] HDA Intel HDMI: 0 (hw:0,3):
Pa_OpenStream: success
Pa_StartStream: success
Wait for callback
Success: Device works
Pa_StopStream: success
Pa_CloseStream: success

Device[1] HDA Intel HDMI: 1 (hw:0,7):
Pa_OpenStream: success
Pa_StartStream: success
Wait for callback
Success: Device works
Pa_StopStream: success
Pa_CloseStream: success

Device[2] HDA Intel PCH: ALC3232 Analog (hw:1,0):
Pa_OpenStream: success
Pa_StartStream: success
Wait for callback
Success: Device works
Pa_StopStream: success
Pa_CloseStream: success

Device[3] hdmi:
Pa_OpenStream: success
Pa_StartStream: success
Wait for callback
Success: Device works
Pa_StopStream: success
Pa_CloseStream: success

Device[4] pulse:
Pa_OpenStream: success
Pa_StartStream: success
Wait for callback
Success: Device works
Pa_StopStream: success
Pa_CloseStream: success

Device[5] default:
Pa_OpenStream: success
Pa_StartStream: success
Wait for callback
Success: Device works
Pa_StopStream: success
Pa_CloseStream: success

End: Test of Portaudio libs

It seams like it gives the same error messages, but it prints success for all devices, so I am still not sure where to search for the problem.

AlexanderS commented 8 years ago

You may have to add something like this to your ~/.asoundrc:

pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}

(assuming your are using pulseaudio)

blacktemplar commented 8 years ago

I do not have a file ~/.asoundrc, but I have the default file /etc/asound.conf from the package pulseaudio-alsa:

# Use PulseAudio by default
pcm.!default {
  type pulse
  fallback "sysdefault"
  hint {
    show on
    description "Default ALSA Output (currently PulseAudio Sound Server)"
  }
}

ctl.!default {
  type pulse
  fallback "sysdefault"
}

# vim:set ft=alsaconf:
andy5995 commented 8 years ago

@blacktemplar That is the system-wide configuration file. You can create $HOME/.asoundrc if it doesn't exist.

I tried this, which allowed my 2 other mic devices (webcam and a USB headset) to show up in options -> record. I selected the USB media headset, but when I go to play a song, I get the message that Player 1 is not assigned a microphone.

pcm.!default { type pulse } ctl.!default { type pulse }

When I start ultrastardx, in the console, my output is

ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm_route.c:947:(find_matching_chmap) Found no matching channel map ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave connect(2) call to /dev/shm/jack-1000/default/jack_0 failed (err=No such file or directory) attempt to connect to server failed

AlexanderS commented 8 years ago

@andy5995 The quoted system-wide configuration file from @blacktemplar should be sufficient to use pulse. There is no need for a user-local configuration. I think it is a problem with portaudio, but I do not know what is exactly the issue.

Player 1 is not assigned a microphone

Are you sure you select the 1 in the Channel 1 select box in the recording options? It is not sufficient to only select the sound card, you have to assign the channels to some specific players.

andy5995 commented 8 years ago

Ah, thank you @AlexanderS ! I was confused by navigation, and didn't even think to select 1. It is working now. :)

blacktemplar commented 8 years ago

I solved now the problem on my side:

My laptop has two Built-In Audio outputs: one HDMI output and one analog output. In PulseAudio configurtion both outputs were turned on but the HDMI output was muted. What solved the problem for me was turning off the HDMI output (in PulseAudio Configuration Tab).

Somehow the problem must be the two outputs and that USDX uses just one of them regardless if its muted or not. But the weird thing is that all my other applications worked fine with the old configuration.

AlexanderS commented 8 years ago

@blacktemplar IIRC Pulseaudio tries to remember the last output for the applications. So it might be, that the correct output was saved for the other applications. You can select the correct output as fallback, so that new applications will use that. But now you it may have saved the other output for usdx and you might have to change it once using f.e. pavucontrol.

basisbit commented 7 years ago

I'll close this for now. If the issue still persists, feel free to continue using this issue report. From the previous messages this clearly seems to not be an issue of USDX but instead of users system configuration.

bxabi commented 7 years ago

hello. I have a similar issue on fedora 25. The build went ok, Ultrastar starts, I think the recording part is fine, it just doesn't play the song.

I hear only a static noise. I am using pulseaudio. I tried with the jack server also, but there is no sound output.

This is the log at start:

ultrastardx ALSA lib pcm_dsnoop.c:606:(snd_pcm_dsnoop_open) unable to open slave 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_route.c:867:(find_matching_chmap) Found no matching channel map ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started Cannot connect to server socket err = No such file or directory Cannot connect to server request channel jack server is not running or cannot be started

ePirat commented 7 years ago

I think the same problem exists with some files on macOS too, instead of the actual audio, you hear a lot of static noise mixed in with a little bit of the actual audio of the song you would expect to hear.

ePirat commented 7 years ago

Do the game sounds work fine for you? Or do you get static noise for all things?

basisbit commented 7 years ago

please open a new issue for this problem report.