SDL pulseaudio workaround hack

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Tue Oct 30 2007 Warren Togami <wtogami@xxxxxxxxxx> - 1.2.8-4
- SDL_AUDIODRIVER=esd temporary hack until SDL supports pulseaudio directly
  avoids applications from locking up. (#358341)

At the last minute before F-8's release I added this ugly hack to SDL_mixer to force SDL to use esd for sound instead of the default ALSA. This change was made because it would at least allow sound on popular games like wesnoth to work, and make the Fedora Games spin not dead-on-arrival.

Unfortunately, this had the side-effect that we knew at the time of disabling SDL sound if you have pulseaudio disabled or removed.

I should have thought of this earlier, but the /etc/profile.d/* scripts that set the environment variable commanding SDL to use esd could have been conditional. Still not perfect, but better to tide us over until Lennart implements native pulseaudio for SDL that he promised to do before F9.

The following changes should improve our workaround. I am uncertain if the .csh version needs a matching unset for nonomatch or does it happen automatically?

Should we push this in a SDL_mixer update?

Warren Togami
wtogami@xxxxxxxxxx

cvs diff: Diffing .
Index: SDL_pulseaudio_hack.csh
===================================================================
RCS file: /cvs/pkgs/rpms/SDL_mixer/devel/SDL_pulseaudio_hack.csh,v
retrieving revision 1.1
diff -u -p -r1.1 SDL_pulseaudio_hack.csh
--- SDL_pulseaudio_hack.csh     31 Oct 2007 14:39:10 -0000      1.1
+++ SDL_pulseaudio_hack.csh     27 Nov 2007 01:33:43 -0000
@@ -1,2 +1,4 @@
 # Temporary hack until SDL directly supports pulseaudio
-setenv SDL_AUDIODRIVER esd
+# If alsa-plugins-pulseaudio is installed, force SDL to output sound to esd
+set nonomatch
+if ( -e /usr/lib*/alsa-lib/libasound_module_pcm_pulse.so ) setenv SDL_AUDIODRIVER esd
Index: SDL_pulseaudio_hack.sh
===================================================================
RCS file: /cvs/pkgs/rpms/SDL_mixer/devel/SDL_pulseaudio_hack.sh,v
retrieving revision 1.1
diff -u -p -r1.1 SDL_pulseaudio_hack.sh
--- SDL_pulseaudio_hack.sh      31 Oct 2007 14:39:10 -0000      1.1
+++ SDL_pulseaudio_hack.sh      27 Nov 2007 01:33:43 -0000
@@ -1,2 +1,3 @@
 # Temporary hack until SDL directly supports pulseaudio
-export SDL_AUDIODRIVER=esd
+# If alsa-plugins-pulseaudio is installed, force SDL to output sound to esd
+[ -e /usr/lib*/alsa-lib/libasound_module_pcm_pulse.so ] && export SDL_AUDIODRIVER=esd

--
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux