Re: No sound in games using sdl-mixer
Ricardo Wurmus (2015-10-04 22:46 +0300) wrote: > Ludovic Courtèswrites: > >> FWIW I just tried ExtremeTuxRacer and it works out of the box for me (on >> GuixSD). >> >> I do use PulseAudio though. To allow ETR’s sound output to mix with >> other things that may be playing sound already, I have this in my >> ~/.asoundrc: >> >> --8<---cut here---start->8--- >> pcm.!default { >> type pulse >> } >> --8<---cut here---end--->8--- >> >> Should we add it to the account skeletons? > > I don’t think that’s a good idea. This means that the ALSA library will > always try to output to the “pulse” backend, which may not exist. For > example, I do not use PulseAudio, so I do not have the “pulse” backend, > so this ~/.asoundrc setting would not work in my case. (I don’t know if > it would do harm, to be fair.) Oh, hey! We both use dvorak and don't use PulseAudio! :-) > Is there a better way to make sdl-mixer output to the ALSA backend by > default? I think outputing to ALSA is a safe default choice, as most > applications do not directly output to PulseAudio but to ALSA. So you also don't have a sound from sdl-mixer programs (games), right? Perhaps we can just add “export SDL_AUDIODRIVER=alsa” to /etc/profile, but then it would probably not be a pleasant default for pulseaudio people. BTW I also have “export AUDIODRIVER=alsa” in my ~/.bash_profile. Without it 'play' command (from 'sox' package) also tries to use pulseaudio. -- Alex
Re: No sound in games using sdl-mixer
Ricardo Wurmusskribis: > Ludovic Courtès writes: > >> FWIW I just tried ExtremeTuxRacer and it works out of the box for me (on >> GuixSD). >> >> I do use PulseAudio though. To allow ETR’s sound output to mix with >> other things that may be playing sound already, I have this in my >> ~/.asoundrc: >> >> --8<---cut here---start->8--- >> pcm.!default { >> type pulse >> } >> --8<---cut here---end--->8--- >> >> Should we add it to the account skeletons? > > I don’t think that’s a good idea. This means that the ALSA library will > always try to output to the “pulse” backend, which may not exist. For > example, I do not use PulseAudio, so I do not have the “pulse” backend, > so this ~/.asoundrc setting would not work in my case. (I don’t know if > it would do harm, to be fair.) OK, makes sense (I was expecting some push back, just wanted to make sure. ;-)) Ludo’.
Re: No sound in games using sdl-mixer
Ludovic Courtès (2015-10-04 15:45 +0300) wrote: > FWIW I just tried ExtremeTuxRacer and it works out of the box for me (on > GuixSD). > > I do use PulseAudio though. To allow ETR’s sound output to mix with > other things that may be playing sound already, I have this in my > ~/.asoundrc: > > > pcm.!default { > type pulse > } > > Should we add it to the account skeletons? Hm, wouldn't this break a sound somehow if a user doesn't have pulseaudio installed? BTW, I have never had problems with simultaneous sound from different programs with ALSA. -- Alex
Re: No sound in games using sdl-mixer
Ludovic Courtèswrites: > FWIW I just tried ExtremeTuxRacer and it works out of the box for me (on > GuixSD). > > I do use PulseAudio though. To allow ETR’s sound output to mix with > other things that may be playing sound already, I have this in my > ~/.asoundrc: > > --8<---cut here---start->8--- > pcm.!default { > type pulse > } > --8<---cut here---end--->8--- > > Should we add it to the account skeletons? I don’t think that’s a good idea. This means that the ALSA library will always try to output to the “pulse” backend, which may not exist. For example, I do not use PulseAudio, so I do not have the “pulse” backend, so this ~/.asoundrc setting would not work in my case. (I don’t know if it would do harm, to be fair.) Is there a better way to make sdl-mixer output to the ALSA backend by default? I think outputing to ALSA is a safe default choice, as most applications do not directly output to PulseAudio but to ALSA. ~~ Ricardo
Re: No sound in games using sdl-mixer
宋文武 (2015-10-03 06:33 +0300) wrote: > Alex Kostwrites: > >> Hello, I have tried several games that use sdl-mixer (wesnoth, pingus, >> gnujump, extremetuxracer) and I didn't get any sound from them. Does >> anyone have this issue? >> >> My audio system is OK, I can play various formats using "aplay", "mpv", >> etc., I just don't have sound in those games. >> >> It's just my guess that "sdl-mixer" is the problem, actually I'm >> absolutely clueless how to debug it. > I have no issue with sound on GuixSD. > > You can launch those games with 'SDL_AUDIODRIVER', > set to 'alsa' or 'pulse'. > > Hope it helps. Wow! This is it, thank you very much!! Now I'm happy :-) (I'm also on GuixSD) So I didn't get it: do you also use SDL_AUDIODRIVER or does it just work for you? If "no sound" is the default, I think we should probably do something about it. -- Alex
Re: No sound in games using sdl-mixer
Alex Kostwrites: > Hello, I have tried several games that use sdl-mixer (wesnoth, pingus, > gnujump, extremetuxracer) and I didn't get any sound from them. Does > anyone have this issue? > > My audio system is OK, I can play various formats using "aplay", "mpv", > etc., I just don't have sound in those games. > > It's just my guess that "sdl-mixer" is the problem, actually I'm > absolutely clueless how to debug it. I have no issue with sound on GuixSD. You can launch those games with 'SDL_AUDIODRIVER', set to 'alsa' or 'pulse'. Hope it helps.
No sound in games using sdl-mixer
Hello, I have tried several games that use sdl-mixer (wesnoth, pingus, gnujump, extremetuxracer) and I didn't get any sound from them. Does anyone have this issue? My audio system is OK, I can play various formats using "aplay", "mpv", etc., I just don't have sound in those games. It's just my guess that "sdl-mixer" is the problem, actually I'm absolutely clueless how to debug it. I also compiled a simple demo program¹ using our sdl-mixer package, and the result was the same — no sound. [1] http://www.libsdl.org/projects/SDL_mixer/docs/SDL_mixer_demos.tar.gz -- Alex