comparison src/audio/macosx/SDL_coreaudio.c @ 936:84f930aebaeb

CoreAudio driver works on Mac OSX 10.1
author Sam Lantinga <slouken@libsdl.org>
date Sat, 21 Aug 2004 03:21:44 +0000
parents f8d5ddc7aef1
children c9b51268668f
comparison
equal deleted inserted replaced
935:f8d5ddc7aef1 936:84f930aebaeb
163 } 163 }
164 164
165 void Core_CloseAudio(_THIS) 165 void Core_CloseAudio(_THIS)
166 { 166 {
167 OSStatus result; 167 OSStatus result;
168 AudioUnitInputCallback callback; 168 struct AudioUnitInputCallback callback;
169 169
170 /* stop processing the audio unit */ 170 /* stop processing the audio unit */
171 result = AudioOutputUnitStop (outputAudioUnit); 171 result = AudioOutputUnitStop (outputAudioUnit);
172 if (result != noErr) { 172 if (result != noErr) {
173 SDL_SetError("Core_CloseAudio: AudioOutputUnitStop"); 173 SDL_SetError("Core_CloseAudio: AudioOutputUnitStop");
207 int Core_OpenAudio(_THIS, SDL_AudioSpec *spec) 207 int Core_OpenAudio(_THIS, SDL_AudioSpec *spec)
208 { 208 {
209 OSStatus result = noErr; 209 OSStatus result = noErr;
210 Component comp; 210 Component comp;
211 ComponentDescription desc; 211 ComponentDescription desc;
212 AudioUnitInputCallback callback; 212 struct AudioUnitInputCallback callback;
213 AudioStreamBasicDescription requestedDesc; 213 AudioStreamBasicDescription requestedDesc;
214 214
215 /* Setup a AudioStreamBasicDescription with the requested format */ 215 /* Setup a AudioStreamBasicDescription with the requested format */
216 requestedDesc.mFormatID = kAudioFormatLinearPCM; 216 requestedDesc.mFormatID = kAudioFormatLinearPCM;
217 requestedDesc.mFormatFlags = kLinearPCMFormatFlagIsPacked; 217 requestedDesc.mFormatFlags = kLinearPCMFormatFlagIsPacked;