annotate Xcode/TemplatesForProjectBuilder/SDL Custom Cocoa Application/MyController.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 4d2d0548f5b2
children
rev   line source
2207
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1 //
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
2 // MyController.h
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
3 // SDL Custom Cocoa App
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
4 //
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
5 // Created by Darrell Walisser on Fri Jul 18 2003.
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
6 // Copyright (c) 2003 __MyCompanyName__. All rights reserved.
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
7 //
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
8
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
9 #import <Cocoa/Cocoa.h>
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
10 #import "SDL.h"
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
11
2220
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
12 extern id gController; // instance of this class from nib
2207
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
13
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
14 // Declare SDL_QuartzWindowDelegate (defined in SDL.framework)
2220
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
15 @interface SDL_QuartzWindowDelegate : NSObject
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
16 @end
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
17
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
18 @interface MyController : NSObject
2215
23a2cb765052 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2213
diff changeset
19 {
2207
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
20 // Interface Builder Outlets
2220
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
21 IBOutlet id _framesPerSecond;
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
22 IBOutlet id _numSprites;
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
23 IBOutlet id _window;
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
24 IBOutlet id _view;
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
25
2207
d63e9f5944ae Unpacked project archives to get individual file history in subversion
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
26 // Private instance variables
2220
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
27 int _nSprites;
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
28 int _max_speed;
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
29 int _doFlip;
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
30 Uint8* _mem;
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
31
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
32 SDL_Surface* _screen;
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
33 SDL_Surface* _sprite;
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
34 SDL_Rect* _sprite_rects;
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
35 SDL_Rect* _positions;
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
36 SDL_Rect* _velocities;
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
37 int _sprites_visible;
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
38 Uint16 _sprite_w, _sprite_h;
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
39
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
40 int _mouse_x, _mouse_y;
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
41 }
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
42 // Interface Builder Actions
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
43 - (IBAction)changeNumberOfSprites:(id)sender;
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
44 - (IBAction)selectUpdateMode:(id)sender;
4d2d0548f5b2 Don't run indent on the Xcode templates
Sam Lantinga <slouken@libsdl.org>
parents: 2215
diff changeset
45 @end
2213
59a667370c57 make indent
Bob Pendleton <bob@pendleton.com>
parents: 2207
diff changeset
46