annotate src/audio/iphoneos/SDL_coreaudio_iphone.c @ 2406:05e8f46403c0 gsoc2008_iphone

SDL_uikitkeyboard extends SDL_uikitview to add keyboard support. It adds several methods to the SDL_uikitview class for keyboard initialization, showing, and hiding. SDL_uikitkeyboard.m contains the implementation of these methods as well as the implementation of some iPhone specific additions to SDL so that a programmer can access the functionality of hiding and showing the keyboard.
author Holmes Futrell <hfutrell@umail.ucsb.edu>
date Tue, 29 Jul 2008 17:21:49 +0000
parents e321b52dee8f
children
rev   line source
2364
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
1 /*
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
2 SDL - Simple DirectMedia Layer
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
3 Copyright (C) 1997-2006 Sam Lantinga
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
4
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
6 modify it under the terms of the GNU Lesser General Public
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
7 License as published by the Free Software Foundation; either
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
9
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
13 Lesser General Public License for more details.
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
14
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
15 You should have received a copy of the GNU Lesser General Public
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
16 License along with this library; if not, write to the Free Software
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
18
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
19 Sam Lantinga
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
20 slouken@libsdl.org
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
21 */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
22 #include "SDL_config.h"
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
23
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
24 #include <AudioUnit/AudioUnit.h>
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
25
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
26 #include "SDL_audio.h"
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
27 #include "../SDL_audio_c.h"
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
28 #include "../SDL_sysaudio.h"
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
29 #include "SDL_coreaudio_iphone.h"
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
30
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
31 #define DEBUG_COREAUDIO 0
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
32
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
33 static void
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
34 COREAUDIO_Deinitialize(void)
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
35 {
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
36 }
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
37
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
38 /* The CoreAudio callback */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
39 static OSStatus
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
40 outputCallback(void *inRefCon,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
41 AudioUnitRenderActionFlags * ioActionFlags,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
42 const AudioTimeStamp * inTimeStamp,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
43 UInt32 inBusNumber, UInt32 inNumberFrames,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
44 AudioBufferList * ioDataList)
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
45 {
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
46 SDL_AudioDevice *this = (SDL_AudioDevice *) inRefCon;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
47 AudioBuffer *ioData = &ioDataList->mBuffers[0];
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
48 UInt32 remaining, len;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
49 void *ptr;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
50
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
51 /* Is there ever more than one buffer, and what do you do with it? */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
52 if (ioDataList->mNumberBuffers != 1) {
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
53 return noErr;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
54 }
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
55
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
56 /* Only do anything if audio is enabled and not paused */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
57 if (!this->enabled || this->paused) {
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
58 SDL_memset(ioData->mData, this->spec.silence, ioData->mDataByteSize);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
59 return 0;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
60 }
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
61
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
62 /* No SDL conversion should be needed here, ever, since we accept
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
63 any input format in OpenAudio, and leave the conversion to CoreAudio.
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
64 */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
65 /*
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
66 assert(!this->convert.needed);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
67 assert(this->spec.channels == ioData->mNumberChannels);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
68 */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
69
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
70 remaining = ioData->mDataByteSize;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
71 ptr = ioData->mData;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
72 while (remaining > 0) {
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
73 if (this->hidden->bufferOffset >= this->hidden->bufferSize) {
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
74 /* Generate the data */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
75 SDL_memset(this->hidden->buffer, this->spec.silence,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
76 this->hidden->bufferSize);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
77 SDL_mutexP(this->mixer_lock);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
78 (*this->spec.callback) (this->spec.userdata, this->hidden->buffer,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
79 this->hidden->bufferSize);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
80 SDL_mutexV(this->mixer_lock);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
81 this->hidden->bufferOffset = 0;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
82 }
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
83
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
84 len = this->hidden->bufferSize - this->hidden->bufferOffset;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
85 if (len > remaining)
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
86 len = remaining;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
87 SDL_memcpy(ptr,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
88 (char *) this->hidden->buffer + this->hidden->bufferOffset,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
89 len);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
90 ptr = (char *) ptr + len;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
91 remaining -= len;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
92 this->hidden->bufferOffset += len;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
93 }
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
94
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
95 return 0;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
96 }
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
97
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
98 static OSStatus
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
99 inputCallback(void *inRefCon,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
100 AudioUnitRenderActionFlags * ioActionFlags,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
101 const AudioTimeStamp * inTimeStamp,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
102 UInt32 inBusNumber, UInt32 inNumberFrames,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
103 AudioBufferList * ioData)
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
104 {
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
105 //err = AudioUnitRender(afr->fAudioUnit, ioActionFlags, inTimeStamp, inBusNumber, inNumberFrames, afr->fAudioBuffer);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
106 // !!! FIXME: write me!
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
107 return noErr;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
108 }
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
109
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
110
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
111 static void
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
112 COREAUDIO_CloseDevice(_THIS)
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
113 {
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
114 if (this->hidden != NULL) {
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
115 if (this->hidden->audioUnitOpened) {
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
116 OSStatus result = noErr;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
117 AURenderCallbackStruct callback;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
118 const AudioUnitElement output_bus = 0;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
119 const AudioUnitElement input_bus = 1;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
120 const int iscapture = this->iscapture;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
121 const AudioUnitElement bus =
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
122 ((iscapture) ? input_bus : output_bus);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
123 const AudioUnitScope scope =
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
124 ((iscapture) ? kAudioUnitScope_Output :
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
125 kAudioUnitScope_Input);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
126
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
127 /* stop processing the audio unit */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
128 result = AudioOutputUnitStop(this->hidden->audioUnit);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
129
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
130 /* Remove the input callback */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
131 SDL_memset(&callback, '\0', sizeof(AURenderCallbackStruct));
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
132 result = AudioUnitSetProperty(this->hidden->audioUnit,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
133 kAudioUnitProperty_SetRenderCallback,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
134 scope, bus, &callback,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
135 sizeof(callback));
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
136
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
137 //CloseComponent(this->hidden->audioUnit);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
138 this->hidden->audioUnitOpened = 0;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
139 }
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
140 SDL_free(this->hidden->buffer);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
141 SDL_free(this->hidden);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
142 this->hidden = NULL;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
143 }
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
144 }
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
145
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
146
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
147 #define CHECK_RESULT(msg) \
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
148 if (result != noErr) { \
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
149 COREAUDIO_CloseDevice(this); \
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
150 SDL_SetError("CoreAudio error (%s): %d", msg, result); \
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
151 return 0; \
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
152 }
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
153
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
154 static int
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
155 prepare_audiounit(_THIS, const char *devname, int iscapture,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
156 const AudioStreamBasicDescription * strdesc)
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
157 {
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
158 OSStatus result = noErr;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
159 AURenderCallbackStruct callback;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
160 AudioComponentDescription desc;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
161 AudioComponent comp = NULL;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
162
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
163 UInt32 enableIO = 0;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
164 const AudioUnitElement output_bus = 0;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
165 const AudioUnitElement input_bus = 1;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
166 const AudioUnitElement bus = ((iscapture) ? input_bus : output_bus);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
167 const AudioUnitScope scope = ((iscapture) ? kAudioUnitScope_Output :
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
168 kAudioUnitScope_Input);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
169
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
170 SDL_memset(&desc, '\0', sizeof(AudioComponentDescription));
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
171 desc.componentType = kAudioUnitType_Output;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
172 desc.componentSubType = kAudioUnitSubType_RemoteIO;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
173 desc.componentManufacturer = kAudioUnitManufacturer_Apple;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
174
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
175 comp = AudioComponentFindNext(NULL, &desc);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
176 if (comp == NULL) {
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
177 SDL_SetError("Couldn't find requested CoreAudio component");
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
178 return 0;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
179 }
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
180
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
181 /* Open & initialize the audio unit */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
182 /*
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
183 AudioComponentInstanceNew only available on iPhone OS 2.0 and Mac OS X 10.6
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
184 We can't use OpenAComponent on iPhone because it is not present
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
185 */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
186 result = AudioComponentInstanceNew(comp, &this->hidden->audioUnit);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
187 CHECK_RESULT("AudioComponentInstanceNew");
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
188
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
189 this->hidden->audioUnitOpened = 1;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
190
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
191 // !!! FIXME: this is wrong?
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
192 enableIO = ((iscapture) ? 1 : 0);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
193 result = AudioUnitSetProperty(this->hidden->audioUnit,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
194 kAudioOutputUnitProperty_EnableIO,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
195 kAudioUnitScope_Input, input_bus,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
196 &enableIO, sizeof(enableIO));
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
197 CHECK_RESULT("AudioUnitSetProperty (kAudioUnitProperty_EnableIO input)");
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
198
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
199 // !!! FIXME: this is wrong?
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
200 enableIO = ((iscapture) ? 0 : 1);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
201 result = AudioUnitSetProperty(this->hidden->audioUnit,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
202 kAudioOutputUnitProperty_EnableIO,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
203 kAudioUnitScope_Output, output_bus,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
204 &enableIO, sizeof(enableIO));
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
205 CHECK_RESULT("AudioUnitSetProperty (kAudioUnitProperty_EnableIO output)");
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
206
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
207 /*result = AudioUnitSetProperty(this->hidden->audioUnit,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
208 kAudioOutputUnitProperty_CurrentDevice,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
209 kAudioUnitScope_Global, 0,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
210 &this->hidden->deviceID,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
211 sizeof(AudioDeviceID));
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
212
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
213 CHECK_RESULT("AudioUnitSetProperty (kAudioOutputUnitProperty_CurrentDevice)");*/
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
214
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
215 /* Set the data format of the audio unit. */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
216 result = AudioUnitSetProperty(this->hidden->audioUnit,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
217 kAudioUnitProperty_StreamFormat,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
218 scope, bus, strdesc, sizeof(*strdesc));
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
219 CHECK_RESULT("AudioUnitSetProperty (kAudioUnitProperty_StreamFormat)");
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
220
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
221 /* Set the audio callback */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
222 SDL_memset(&callback, '\0', sizeof(AURenderCallbackStruct));
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
223 callback.inputProc = ((iscapture) ? inputCallback : outputCallback);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
224 callback.inputProcRefCon = this;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
225 result = AudioUnitSetProperty(this->hidden->audioUnit,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
226 kAudioUnitProperty_SetRenderCallback,
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
227 scope, bus, &callback, sizeof(callback));
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
228 CHECK_RESULT
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
229 ("AudioUnitSetProperty (kAudioUnitProperty_SetInputCallback)");
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
230
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
231 /* Calculate the final parameters for this audio specification */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
232 SDL_CalculateAudioSpec(&this->spec);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
233
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
234 /* Allocate a sample buffer */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
235 this->hidden->bufferOffset = this->hidden->bufferSize = this->spec.size;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
236 this->hidden->buffer = SDL_malloc(this->hidden->bufferSize);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
237
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
238 result = AudioUnitInitialize(this->hidden->audioUnit);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
239 CHECK_RESULT("AudioUnitInitialize");
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
240
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
241 /* Finally, start processing of the audio unit */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
242 result = AudioOutputUnitStart(this->hidden->audioUnit);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
243 CHECK_RESULT("AudioOutputUnitStart");
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
244 /* We're running! */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
245 return 1;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
246 }
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
247
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
248 static int
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
249 COREAUDIO_OpenDevice(_THIS, const char *devname, int iscapture)
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
250 {
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
251 AudioStreamBasicDescription strdesc;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
252 SDL_AudioFormat test_format = SDL_FirstAudioFormat(this->spec.format);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
253 int valid_datatype = 0;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
254
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
255 /* Initialize all variables that we clean on shutdown */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
256 this->hidden = (struct SDL_PrivateAudioData *)
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
257 SDL_malloc((sizeof *this->hidden));
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
258 if (this->hidden == NULL) {
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
259 SDL_OutOfMemory();
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
260 return (0);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
261 }
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
262 SDL_memset(this->hidden, 0, (sizeof *this->hidden));
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
263
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
264 /* Setup a AudioStreamBasicDescription with the requested format */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
265 SDL_memset(&strdesc, '\0', sizeof(AudioStreamBasicDescription));
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
266 strdesc.mFormatID = kAudioFormatLinearPCM;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
267 strdesc.mFormatFlags = kLinearPCMFormatFlagIsPacked;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
268 strdesc.mChannelsPerFrame = this->spec.channels;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
269 strdesc.mSampleRate = this->spec.freq;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
270 strdesc.mFramesPerPacket = 1;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
271
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
272 while ((!valid_datatype) && (test_format)) {
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
273 this->spec.format = test_format;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
274 /* Just a list of valid SDL formats, so people don't pass junk here. */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
275 switch (test_format) {
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
276 case AUDIO_U8:
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
277 case AUDIO_S8:
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
278 case AUDIO_U16LSB:
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
279 case AUDIO_S16LSB:
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
280 case AUDIO_U16MSB:
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
281 case AUDIO_S16MSB:
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
282 case AUDIO_S32LSB:
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
283 case AUDIO_S32MSB:
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
284 case AUDIO_F32LSB:
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
285 case AUDIO_F32MSB:
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
286 valid_datatype = 1;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
287 strdesc.mBitsPerChannel = SDL_AUDIO_BITSIZE(this->spec.format);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
288 if (SDL_AUDIO_ISBIGENDIAN(this->spec.format))
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
289 strdesc.mFormatFlags |= kLinearPCMFormatFlagIsBigEndian;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
290
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
291 if (SDL_AUDIO_ISFLOAT(this->spec.format))
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
292 strdesc.mFormatFlags |= kLinearPCMFormatFlagIsFloat;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
293 else if (SDL_AUDIO_ISSIGNED(this->spec.format))
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
294 strdesc.mFormatFlags |= kLinearPCMFormatFlagIsSignedInteger;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
295 break;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
296 }
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
297 }
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
298
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
299 if (!valid_datatype) { /* shouldn't happen, but just in case... */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
300 COREAUDIO_CloseDevice(this);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
301 SDL_SetError("Unsupported audio format");
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
302 return 0;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
303 }
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
304
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
305 strdesc.mBytesPerFrame =
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
306 strdesc.mBitsPerChannel * strdesc.mChannelsPerFrame / 8;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
307 strdesc.mBytesPerPacket =
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
308 strdesc.mBytesPerFrame * strdesc.mFramesPerPacket;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
309
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
310 if (!prepare_audiounit(this, devname, iscapture, &strdesc)) {
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
311 COREAUDIO_CloseDevice(this);
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
312 return 0; /* prepare_audiounit() will call SDL_SetError()... */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
313 }
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
314
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
315 return 1; /* good to go. */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
316 }
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
317
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
318 static int
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
319 COREAUDIO_Init(SDL_AudioDriverImpl * impl)
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
320 {
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
321 /* Set the function pointers */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
322 impl->OpenDevice = COREAUDIO_OpenDevice;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
323 impl->CloseDevice = COREAUDIO_CloseDevice;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
324 impl->Deinitialize = COREAUDIO_Deinitialize;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
325 impl->ProvidesOwnCallbackThread = 1;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
326
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
327 /* added for iPhone */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
328 impl->OnlyHasDefaultInputDevice = 1;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
329 impl->OnlyHasDefaultOutputDevice = 1;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
330 impl->HasCaptureSupport = 0; /* still needs to be written */
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
331
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
332 return 1;
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
333 }
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
334
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
335 AudioBootStrap COREAUDIOIPHONE_bootstrap = {
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
336 "coreaudio-iphoneos", "SDL CoreAudio (iPhone OS) audio driver", COREAUDIO_Init, 0
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
337 };
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
338
e321b52dee8f These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
339 /* vi: set ts=4 sw=4 expandtab: */