Date: Sun, 18 Jul 2004 16:46:44 +0200
From: Georg Schwarz Subject: Compiling SDL on IRIX 5.3 in order to make SDL compile on IRIX 5.3 I had to apply the following patch --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40904
This commit is contained in:
parent
d2ee3368ef
commit
c496d3e3b8
1 changed files with 24 additions and 0 deletions
|
@ -28,6 +28,7 @@ static char rcsid =
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Allow access to a raw mixing buffer (For IRIX 6.5 and higher) */
|
/* 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>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
@ -39,6 +40,19 @@ static char rcsid =
|
||||||
#include "SDL_irixaudio.h"
|
#include "SDL_irixaudio.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef AL_RESOURCE /* as a test whether we use the old IRIX audio libraries */
|
||||||
|
#define OLD_IRIX_AUDIO
|
||||||
|
#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 */
|
/* Audio driver functions */
|
||||||
static int AL_OpenAudio(_THIS, SDL_AudioSpec *spec);
|
static int AL_OpenAudio(_THIS, SDL_AudioSpec *spec);
|
||||||
static void AL_WaitAudio(_THIS);
|
static void AL_WaitAudio(_THIS);
|
||||||
|
@ -137,7 +151,11 @@ static void AL_CloseAudio(_THIS)
|
||||||
static int AL_OpenAudio(_THIS, SDL_AudioSpec *spec)
|
static int AL_OpenAudio(_THIS, SDL_AudioSpec *spec)
|
||||||
{
|
{
|
||||||
ALconfig audio_config;
|
ALconfig audio_config;
|
||||||
|
#ifdef OLD_IRIX_AUDIO
|
||||||
|
long audio_param[2];
|
||||||
|
#else
|
||||||
ALpv audio_param;
|
ALpv audio_param;
|
||||||
|
#endif
|
||||||
int width;
|
int width;
|
||||||
|
|
||||||
/* Determine the audio parameters from the AudioSpec */
|
/* Determine the audio parameters from the AudioSpec */
|
||||||
|
@ -165,9 +183,15 @@ static int AL_OpenAudio(_THIS, SDL_AudioSpec *spec)
|
||||||
SDL_CalculateAudioSpec(spec);
|
SDL_CalculateAudioSpec(spec);
|
||||||
|
|
||||||
/* Set output frequency */
|
/* Set output frequency */
|
||||||
|
#ifdef OLD_IRIX_AUDIO
|
||||||
|
audio_param[0] = AL_OUTPUT_RATE;
|
||||||
|
audio_param[1] = spec->freq;
|
||||||
|
if( ALsetparams(AL_DEFAULT_DEVICE, audio_param, 2) < 0 ) {
|
||||||
|
#else
|
||||||
audio_param.param = AL_RATE;
|
audio_param.param = AL_RATE;
|
||||||
audio_param.value.i = spec->freq;
|
audio_param.value.i = spec->freq;
|
||||||
if( alSetParams(AL_DEFAULT_OUTPUT, &audio_param, 1) < 0 ) {
|
if( alSetParams(AL_DEFAULT_OUTPUT, &audio_param, 1) < 0 ) {
|
||||||
|
#endif
|
||||||
SDL_SetError("alSetParams failed");
|
SDL_SetError("alSetParams failed");
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue