Mercurial > sdl-ios-xcode
comparison src/audio/dmedia/SDL_irixaudio.c @ 2043:adf732f1f016
Formatting update
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 24 Sep 2006 15:56:55 +0000 |
parents | 7590aaf89a60 |
children | 5f6550e5184f c8b3d3d13ed1 |
comparison
equal
deleted
inserted
replaced
2042:3908e1f808e1 | 2043:adf732f1f016 |
---|---|
174 while ((!valid) && (test_format)) { | 174 while ((!valid) && (test_format)) { |
175 valid = 1; | 175 valid = 1; |
176 spec->format = test_format; | 176 spec->format = test_format; |
177 | 177 |
178 switch (test_format) { | 178 switch (test_format) { |
179 case AUDIO_S8: | 179 case AUDIO_S8: |
180 width = AL_SAMPLE_8; | 180 width = AL_SAMPLE_8; |
181 fmt = AL_SAMPFMT_TWOSCOMP; | 181 fmt = AL_SAMPFMT_TWOSCOMP; |
182 break; | 182 break; |
183 | 183 |
184 case AUDIO_S16SYS: | 184 case AUDIO_S16SYS: |
185 width = AL_SAMPLE_16; | 185 width = AL_SAMPLE_16; |
186 fmt = AL_SAMPFMT_TWOSCOMP; | 186 fmt = AL_SAMPFMT_TWOSCOMP; |
187 break; | 187 break; |
188 | 188 |
189 case AUDIO_F32SYS: | 189 case AUDIO_F32SYS: |
190 width = 0; /* not used here... */ | 190 width = 0; /* not used here... */ |
191 fmt = AL_SAMPFMT_FLOAT; | 191 fmt = AL_SAMPFMT_FLOAT; |
192 break; | 192 break; |
193 | 193 |
194 /* Docs say there is int24, but not int32.... */ | 194 /* Docs say there is int24, but not int32.... */ |
195 | 195 |
196 default: | 196 default: |
197 valid = 0; | 197 valid = 0; |
198 test_format = SDL_NextAudioFormat(); | 198 test_format = SDL_NextAudioFormat(); |
199 break; | 199 break; |
200 } | 200 } |
201 | 201 |
202 if (valid) { | 202 if (valid) { |
203 ALconfig audio_config = alNewConfig(); | 203 ALconfig audio_config = alNewConfig(); |
204 valid = 0; | 204 valid = 0; |
205 if (audio_config) { | 205 if (audio_config) { |
206 if (alSetChannels(audio_config, spec->channels) < 0) { | 206 if (alSetChannels(audio_config, spec->channels) < 0) { |
207 if (spec->channels > 2) { /* can't handle > stereo? */ | 207 if (spec->channels > 2) { /* can't handle > stereo? */ |
208 spec->channels = 2; /* try again below. */ | 208 spec->channels = 2; /* try again below. */ |
209 } | 209 } |
210 } | 210 } |
211 | 211 |
212 if ((alSetSampFmt(audio_config, fmt) >= 0) && | 212 if ((alSetSampFmt(audio_config, fmt) >= 0) && |
213 ((!width) || (alSetWidth(audio_config, width) >= 0)) && | 213 ((!width) || (alSetWidth(audio_config, width) >= 0)) && |