/
AppDelegate.m
42 lines (33 loc) · 1.25 KB
/
AppDelegate.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// AppDelegate.m
// Audio Controller Test Suite
//
// Created by Michael Tyson on 13/02/2012.
// Copyright (c) 2012 A Tasty Pixel. All rights reserved.
//
#import "AppDelegate.h"
#import "ViewController.h"
#import "TheAmazingAudioEngine.h"
@implementation AppDelegate
@synthesize window = _window;
@synthesize viewController = _viewController;
@synthesize audioController = _audioController;
- (void)dealloc
{
[_window release];
[_viewController release];
[super dealloc];
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
// Create an instance of the audio controller, set it up and start it running
self.audioController = [[[AEAudioController alloc] initWithAudioDescription:[AEAudioController interleaved16BitStereoAudioDescription] inputEnabled:YES] autorelease];
[_audioController start:NULL];
// Create and display view controller
self.viewController = [[[ViewController alloc] initWithAudioController:_audioController] autorelease];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
@end