- (void)playAlarmSound:(NSTimer *)theTimer {
static SystemSoundID soundID/* = 0 */; // ?
if (!soundID) {
soundID = [Utilities createSystemSoundIDFromFile:@"beep" ofType:@"caf"];
}
...
}
Is SystemSoundID (which is a UInt32) automatically assigned 0? or should I explicitly assign it? I have to do it this way and test to see if it hasn't been initialized by the Utilities method because it doesn't compile if I just do static SystemSoundID soundID = [Utilities createSystemSoundIDFromFile:@"beep" ofType:@"caf"];
. At first I tried assigning it to NULL, but then I realized its not a pointer, so anyway, should I have the = 0
in there or is it redundant?