Mercurial > sdl-ios-xcode
annotate src/audio/iphoneos/SDL_coreaudio_iphone.h @ 2364:e321b52dee8f gsoc2008_iphone
These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem to only exist on iPhone and will apparently exist in Mac OS X 10.6(!)
There is currently no audio recording support -- my iPod Touch doesn't have a microphone to test this with.
author | Holmes Futrell <hfutrell@umail.ucsb.edu> |
---|---|
date | Fri, 18 Jul 2008 17:53:54 +0000 |
parents | |
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 #ifndef _SDL_coreaudio_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 #define _SDL_coreaudio_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
|
26 |
e321b52dee8f
These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem 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_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
|
28 |
e321b52dee8f
These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem 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 /* Hidden "this" pointer for the audio functions */ |
e321b52dee8f
These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem 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 #define _THIS SDL_AudioDevice *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
|
31 |
e321b52dee8f
These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem 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 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
|
33 { |
e321b52dee8f
These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem 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 AudioUnit 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
|
35 int 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
|
36 void *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
|
37 UInt32 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
|
38 UInt32 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
|
39 // AudioDeviceID 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
|
40 }; |
e321b52dee8f
These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem 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 |
e321b52dee8f
These files contain the audio support for iPhone. They are based on the CoreAudio audio driver for Mac OS X. The principle difference is that the iPhone doesn't seem to have a concept of audio devices ... it just has special units for audio in and audio out. Also had to change some functions to versions which seem 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 #endif /* _SDL_coreaudio_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
|
43 /* vi: set ts=4 sw=4 expandtab: */ |