Changed STKAudioPlayerOptions to be a struct rather than enum. Most values that can be tweaked can be provided in constructor. Fixed deadlock if createAudioGraph fails

This commit is contained in:
Thong Nguyen
2014-02-05 14:18:37 +00:00
parent 0a6e1d4534
commit 63bb19747f
3 changed files with 64 additions and 92 deletions
+1 -2
View File
@@ -21,7 +21,6 @@
@implementation AppDelegate
-(BOOL) application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
NSError* error;
@@ -32,7 +31,7 @@
self.window.backgroundColor = [UIColor whiteColor];
audioPlayer = [[STKAudioPlayer alloc] initWithOptions:STKAudioPlayerOptionFlushQueueOnSeek|STKAudioPlayerOptionEnableVolumeMixer];
audioPlayer = [[STKAudioPlayer alloc] initWithOptions:(STKAudioPlayerOptions){ .flushQueueOnSeek = YES, .enableVolumeMixer = YES}];
audioPlayer.meteringEnabled = YES;
audioPlayer.volume = 1.0;