Fix in-app audio

- sound is set by passing in reference
- don't access properties in constructor
- distinguish multiple variables with same name

// FREEBIE
pull/1/head
Michael Kirk 9 years ago
parent df63c8624d
commit f899cff128

@ -25,15 +25,17 @@
@implementation NotificationsManager @implementation NotificationsManager
- (instancetype)init { - (instancetype)init
{
self = [super init]; self = [super init];
if (self) { if (!self) {
NSURL *newMessageSound = return self;
[NSURL URLWithString:[[NSBundle mainBundle] pathForResource:@"NewMessage" ofType:@"aifc"]];
self.newMessageSound = AudioServicesCreateSystemSoundID((__bridge CFURLRef)newMessageSound, &_newMessageSound);
} }
NSURL *newMessageURL = [[NSBundle mainBundle] URLForResource:@"NewMessage" withExtension:@"aifc"];
AudioServicesCreateSystemSoundID((__bridge CFURLRef)newMessageURL, &_newMessageSound);
return self; return self;
} }

Loading…
Cancel
Save