Mercurial > SDL_sound_CoreAudio
comparison playsound/test_sdlsound.c @ 51:3d34b03167f2
Patched to work on bigendian machines.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sat, 22 Sep 2001 16:30:06 +0000 |
parents | 4acb5260d684 |
children |
comparison
equal
deleted
inserted
replaced
50:d7e118d8fede | 51:3d34b03167f2 |
---|---|
166 return(42); | 166 return(42); |
167 } /* if */ | 167 } /* if */ |
168 | 168 |
169 sound_desired.rate = 44100; | 169 sound_desired.rate = 44100; |
170 sound_desired.channels = 2; | 170 sound_desired.channels = 2; |
171 sound_desired.format = AUDIO_S16; | 171 sound_desired.format = AUDIO_S16SYS; |
172 | 172 |
173 sample = Sound_NewSampleFromFile(argv[1], &sound_desired, 4096 * 4); | 173 sample = Sound_NewSampleFromFile(argv[1], &sound_desired, 4096 * 4); |
174 if (!sample) | 174 if (!sample) |
175 { | 175 { |
176 printf("Sound_NewSampleFromFile(\"%s\") failed!\n" | 176 printf("Sound_NewSampleFromFile(\"%s\") failed!\n" |
179 SDL_Quit(); | 179 SDL_Quit(); |
180 return(42); | 180 return(42); |
181 } /* if */ | 181 } /* if */ |
182 | 182 |
183 sdl_desired.freq = 44100; | 183 sdl_desired.freq = 44100; |
184 sdl_desired.format = AUDIO_S16; | 184 sdl_desired.format = AUDIO_S16SYS; |
185 sdl_desired.channels = 2; | 185 sdl_desired.channels = 2; |
186 sdl_desired.samples = 4096; | 186 sdl_desired.samples = 4096; |
187 sdl_desired.callback = test_callback; | 187 sdl_desired.callback = test_callback; |
188 sdl_desired.userdata = sample; | 188 sdl_desired.userdata = sample; |
189 | 189 |