diff options
author | Mike Frysinger <vapier@gentoo.org> | 2004-02-01 20:32:42 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2004-02-01 20:32:42 +0000 |
commit | 0262d85086c4af9ebb37438f645b32d26ea35be2 (patch) | |
tree | ebf3230791a3dac940f59614a39f184ec0286817 /media-sound/esound/files | |
parent | adding virtual for cdrtools (diff) | |
download | historical-0262d85086c4af9ebb37438f645b32d26ea35be2.tar.gz historical-0262d85086c4af9ebb37438f645b32d26ea35be2.tar.bz2 historical-0262d85086c4af9ebb37438f645b32d26ea35be2.zip |
fix alsa segfaults #36417
Diffstat (limited to 'media-sound/esound/files')
-rw-r--r-- | media-sound/esound/files/digest-esound-0.2.32-r1 | 1 | ||||
-rw-r--r-- | media-sound/esound/files/esound-0.2.32-new-alsa.patch | 77 | ||||
-rw-r--r-- | media-sound/esound/files/esound.init.d | 4 |
3 files changed, 79 insertions, 3 deletions
diff --git a/media-sound/esound/files/digest-esound-0.2.32-r1 b/media-sound/esound/files/digest-esound-0.2.32-r1 new file mode 100644 index 000000000000..154179bdf316 --- /dev/null +++ b/media-sound/esound/files/digest-esound-0.2.32-r1 @@ -0,0 +1 @@ +MD5 b2a5e71ec8220fea1c22cc042f5f6e63 esound-0.2.32.tar.bz2 358563 diff --git a/media-sound/esound/files/esound-0.2.32-new-alsa.patch b/media-sound/esound/files/esound-0.2.32-new-alsa.patch new file mode 100644 index 000000000000..66d50ee1fb4c --- /dev/null +++ b/media-sound/esound/files/esound-0.2.32-new-alsa.patch @@ -0,0 +1,77 @@ +--- acconfig.h-dist 2003-08-01 06:56:21.000000000 -0700 ++++ acconfig.h 2004-01-09 23:01:42.620951280 -0800 +@@ -8,6 +8,7 @@ + #undef DRIVER_ALSA + #undef DRIVER_NEWALSA + #undef DRIVER_ALSA_09 ++#undef DRIVER_ALSA_09_AFTER_RC4 + #undef DRIVER_DART + #undef DRIVER_COREAUDIO + #undef DRIVER_NONE +--- audio_alsa09.c-dist 2003-03-20 00:34:19.000000000 -0800 ++++ audio_alsa09.c 2004-01-09 23:08:55.405986649 -0800 +@@ -136,15 +136,24 @@ + alsaerr = -1; + return handle; + } +- ++#ifndef DRIVER_ALSA_09_AFTER_RC4 + err = snd_pcm_hw_params_set_rate_near(handle, hwparams, speed, 0); ++#else ++ int t_dir=0; ++ int t_speed=speed; ++ err = snd_pcm_hw_params_set_rate_near(handle, hwparams, &t_speed, &t_dir); ++#endif + if (err < 0) { + if (alsadbg) + fprintf(stderr, "%s\n", snd_strerror(err)); + alsaerr = -1; + return handle; + } ++#ifndef DRIVER_ALSA_09_AFTER_RC4 + if (err != speed) { ++#else ++ if (t_speed != speed) { ++#endif + if (alsadbg) + fprintf(stderr, "Rate not avaliable %i != %i\n", speed, err); + alsaerr = -1; +@@ -176,8 +185,12 @@ + alsaerr = -1; + return handle; + } +- ++#ifndef DRIVER_ALSA_09_AFTER_RC4 + err = snd_pcm_hw_params_set_buffer_size_near(handle, hwparams, BUFFERSIZE); ++#else ++ snd_pcm_uframes_t t_bufsize=BUFFERSIZE; ++ err = snd_pcm_hw_params_set_buffer_size_near(handle, hwparams, &t_bufsize); ++#endif + if (err < 0) { + if (alsadbg) + fprintf(stderr, "Buffersize:%s\n", snd_strerror(err)); +--- configure.in-dist 2003-09-03 09:23:23.000000000 -0700 ++++ configure.in 2004-01-09 23:50:32.092247517 -0800 +@@ -269,6 +269,22 @@ + AC_CHECK_FUNC(snd_cards,,[AC_CHECK_LIB(sound,snd_cards)]) + AC_CHECK_FUNC(snd_cards,,[AC_CHECK_LIB(asound,snd_cards)]) + AC_CHECK_FUNC(snd_pcm_pause,,[AC_CHECK_LIB(asound,snd_pcm_pause)]) ++ ++ dnl Check if ALSA uses new API ++ CFLAGS="${CFLAGS} -Werror" ++ AC_TRY_LINK([ ++ #include <alsa/asoundlib.h> ++ ], [ ++ snd_pcm_t *pcm; ++ snd_pcm_hw_params_t *params; ++ unsigned int val; ++ int dir; ++ /* intentionally uses non-pointers, trying to replicate bug 129709 */ ++ snd_pcm_hw_params_set_rate_near(pcm, params, val, dir); ++ ], , [ ++ AC_DEFINE(DRIVER_ALSA_09_AFTER_RC4) ++ ]) ++ + fi + else + AC_DEFINE(DRIVER_NONE) diff --git a/media-sound/esound/files/esound.init.d b/media-sound/esound/files/esound.init.d index 5436b88989ef..d09c0961b397 100644 --- a/media-sound/esound/files/esound.init.d +++ b/media-sound/esound/files/esound.init.d @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/media-sound/esound/files/esound.init.d,v 1.2 2003/05/30 22:55:56 utx Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/esound/files/esound.init.d,v 1.3 2004/02/01 20:32:42 vapier Exp $ # Note: You need to start esound on boot, only if you want to use it over network. @@ -10,8 +10,6 @@ # "Enable sound server startup" in gnome-sound-properties for all users # and optionally handle authentization. -. /etc/conf.d/esound - depend() { use net@extradepend@ } |