summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2004-07-19 10:48:46 +0000
committerwiz <wiz@pkgsrc.org>2004-07-19 10:48:46 +0000
commit207ea645b6b07c13e1c86c7387c17f0aedee7e5e (patch)
tree247dc63a808674fd33909600e0b5fccee3e3e1dd
parent48ee82be71f30d054ed966604a9eab8ad641f4a6 (diff)
downloadpkgsrc-207ea645b6b07c13e1c86c7387c17f0aedee7e5e.tar.gz
Patch to make audio work on IRIX 5, from Georg Schwarz.
-rw-r--r--devel/SDL/distinfo3
-rw-r--r--devel/SDL/patches/patch-aw64
2 files changed, 66 insertions, 1 deletions
diff --git a/devel/SDL/distinfo b/devel/SDL/distinfo
index bbeceffc754..169bf7a367a 100644
--- a/devel/SDL/distinfo
+++ b/devel/SDL/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.31 2004/07/13 20:51:58 kristerw Exp $
+$NetBSD: distinfo,v 1.32 2004/07/19 10:48:46 wiz Exp $
SHA1 (SDL-1.2.7.tar.gz) = 1a840c50668f230df9e9163ef1a282d9f3355383
Size (SDL-1.2.7.tar.gz) = 2470936 bytes
@@ -13,6 +13,7 @@ SHA1 (patch-as) = 98813c71b10e209df90b5024cf8e6287113563ce
SHA1 (patch-at) = 5e470473bd9ed1d278b23a06db8af2b346301794
SHA1 (patch-au) = 7571582ea7654f99f721ef6d1c81a7bee3fb712a
SHA1 (patch-av) = a19c162dcb85cf0d0d1c1d6ab50651782b60a96f
+SHA1 (patch-aw) = 6f6b2ca8cc499b23f95591f874c436318d2fcf1a
SHA1 (patch-ba) = 0621af3f2c0abba700c30d7f4809f405a7ffe729
SHA1 (patch-bb) = 48407d4a2d881cb3427b29682fc7e417023d1b99
SHA1 (patch-bc) = 40012e55c20e8c10b575a6de0ac4f3f2a35baf15
diff --git a/devel/SDL/patches/patch-aw b/devel/SDL/patches/patch-aw
new file mode 100644
index 00000000000..eaa251723d6
--- /dev/null
+++ b/devel/SDL/patches/patch-aw
@@ -0,0 +1,64 @@
+$NetBSD: patch-aw,v 1.1 2004/07/19 10:48:46 wiz Exp $
+
+--- src/audio/dmedia/SDL_irixaudio.c.orig 2003-08-30 21:13:02.000000000 +0200
++++ src/audio/dmedia/SDL_irixaudio.c
+@@ -28,6 +28,7 @@ static char rcsid =
+ #endif
+
+ /* Allow access to a raw mixing buffer (For IRIX 6.5 and higher) */
++/* patch for IRIX 5 by Georg Schwarz 18/07/2004 */
+
+ #include <stdlib.h>
+
+@@ -39,6 +40,21 @@ static char rcsid =
+ #include "SDL_irixaudio.h"
+
+
++#ifdef AL_RESOURCE /* as a test whether we use the "new" IRIX
++ audio libraries */
++#define NEW_IRIX_AUDIO
++#else
++#define alClosePort(x) ALcloseport(x)
++#define alFreeConfig(x) ALfreeconfig(x)
++#define alGetFillable(x) ALgetfillable(x)
++#define alNewConfig() ALnewconfig()
++#define alOpenPort(x,y,z) ALopenport(x,y,z)
++#define alSetChannels(x,y) ALsetchannels(x,y)
++#define alSetQueueSize(x,y) ALsetqueuesize(x,y)
++#define alSetSampFmt(x,y) ALsetsampfmt(x,y)
++#define alSetWidth(x,y) ALsetwidth(x,y)
++#endif
++
+ /* Audio driver functions */
+ static int AL_OpenAudio(_THIS, SDL_AudioSpec *spec);
+ static void AL_WaitAudio(_THIS);
+@@ -137,7 +153,11 @@ static void AL_CloseAudio(_THIS)
+ static int AL_OpenAudio(_THIS, SDL_AudioSpec *spec)
+ {
+ ALconfig audio_config;
++#ifdef NEW_IRIX_AUDIO
+ ALpv audio_param;
++#else
++ long audio_param[2];
++#endif
+ int width;
+
+ /* Determine the audio parameters from the AudioSpec */
+@@ -165,9 +185,16 @@ static int AL_OpenAudio(_THIS, SDL_Audio
+ SDL_CalculateAudioSpec(spec);
+
+ /* Set output frequency */
++#ifdef NEW_IRIX_AUDIO
+ audio_param.param = AL_RATE;
+ audio_param.value.i = spec->freq;
+- if( alSetParams(AL_DEFAULT_OUTPUT, &audio_param, 1) < 0 ) {
++ if( alSetParams(AL_DEFAULT_OUTPUT, &audio_param, 1) < 0 )
++#else
++ audio_param[0] = AL_OUTPUT_RATE;
++ audio_param[1] = spec->freq;
++ if( ALsetparams(AL_DEFAULT_DEVICE, audio_param, 2) < 0 )
++#endif
++ {
+ SDL_SetError("alSetParams failed");
+ return(-1);
+ }