○ System Sound
- 무음모드일 경우 소리 안남
-(void) doSystemSound { SystemSoundID soundID; NSString *soundfile = [[NSBundle mainBundle] pathForResource:@"soundeffect" ofType:@"wav"]; AudioServicesCreateSystemSoundID((CFURLRef) [NSURL fileURLWithPath:soundfile], &soundID); AudioServicesPlaySystemSound(soundID); }
○ Alert Sound
- 무음모드일 경우 진동
-(void) doAlertSound { SystemSoundID soundID; NSString *soundfile = [[NSBundle mainBundle] pathForResource:@"soundeffect" ofType:@"wav"]; AudioServicesCreateSystemSoundID((CFURLRef) [NSURL fileURLWithPath:soundfile], &soundID); AudioServicesPlayAlertSound(soundID); }
○ Vibrate
- 진동
-(void) doVibrate { AudioServicesPlaySystemSound(kSystemSoundID_vibrate); }