Skip to content

Commit 3c326f8

Browse files
committed
OpenAL added to CCAppDelegate
Removes noticeable delay on first time usage. Former-commit-id: 973eabc
1 parent 63b5509 commit 3c326f8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cocos2d/Platforms/iOS/CCAppDelegate.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
#import "kazmath/kazmath.h"
3636
#import "kazmath/GL/matrix.h"
3737

38+
#import "OALSimpleAudio.h"
39+
3840
NSString* const CCSetupPixelFormat = @"CCSetupPixelFormat";
3941
NSString* const CCSetupScreenMode = @"CCSetupScreenMode";
4042
NSString* const CCSetupScreenOrientation = @"CCSetupScreenOrientation";
@@ -242,6 +244,9 @@ - (void) setupCocos2dWithOptions:(NSDictionary*)config
242244
// It can be RGBA8888, RGBA4444, RGB5_A1, RGB565
243245
// You can change this setting at any time.
244246
[CCTexture setDefaultAlphaPixelFormat:CCTexturePixelFormat_RGBA8888];
247+
248+
// Initialise OpenAL
249+
[OALSimpleAudio sharedInstance];
245250

246251
// Create a Navigation Controller with the Director
247252
navController_ = [[CCNavigationController alloc] initWithRootViewController:director];

0 commit comments

Comments
 (0)