comparison src/audio/dmedia/SDL_irixaudio.c @ 605:6399f4e90211

IRIX patches from Andrea Suatoni
author Sam Lantinga <slouken@libsdl.org>
date Thu, 06 Mar 2003 06:12:41 +0000
parents e8157fcb3114
children 6e6248801043
comparison
equal deleted inserted replaced
604:31d3af76488b 605:6399f4e90211
127 if ( mixbuf != NULL ) { 127 if ( mixbuf != NULL ) {
128 SDL_FreeAudioMem(mixbuf); 128 SDL_FreeAudioMem(mixbuf);
129 mixbuf = NULL; 129 mixbuf = NULL;
130 } 130 }
131 if ( audio_port != NULL ) { 131 if ( audio_port != NULL ) {
132 ALcloseport(audio_port); 132 alClosePort(audio_port);
133 audio_port = NULL; 133 audio_port = NULL;
134 } 134 }
135 } 135 }
136 136
137 static int AL_OpenAudio(_THIS, SDL_AudioSpec *spec) 137 static int AL_OpenAudio(_THIS, SDL_AudioSpec *spec)
178 if ( audio_config && 178 if ( audio_config &&
179 (alSetSampFmt(audio_config, AL_SAMPFMT_TWOSCOMP) >= 0) && 179 (alSetSampFmt(audio_config, AL_SAMPFMT_TWOSCOMP) >= 0) &&
180 (alSetWidth(audio_config, width) >= 0) && 180 (alSetWidth(audio_config, width) >= 0) &&
181 (alSetQueueSize(audio_config, spec->samples*2) >= 0) && 181 (alSetQueueSize(audio_config, spec->samples*2) >= 0) &&
182 (alSetChannels(audio_config, spec->channels) >= 0) ) { 182 (alSetChannels(audio_config, spec->channels) >= 0) ) {
183 audio_port = ALopenport("SDL audio", "w", audio_config); 183 audio_port = alOpenPort("SDL audio", "w", audio_config);
184 } 184 }
185 alFreeConfig(audio_config); 185 alFreeConfig(audio_config);
186 if( audio_port == NULL ) { 186 if( audio_port == NULL ) {
187 SDL_SetError("Unable to open audio port"); 187 SDL_SetError("Unable to open audio port");
188 return(-1); 188 return(-1);