Hello everyone
i used code below in my application and if i increase or decrease the volume from the iphone's button it still the same but if the phone in silent mode the voice will be muted
the code:
-(void) playNote: (NSString *)Note type: (NSString *)type
{
CFURLRef soundFileURLRef;
SystemSoundID soundFileObject;
CFBundleRef mainBundle;
mainBundle = CFBundleGetMainBundle ();
// Get the URL to the sound file to play
soundFileURLRef = CFBundleCopyResourceURL (mainBundle,
(CFStringRef)Note,
(CFStringRef)type,
NULL);
NSLog(@"%@\n", soundFileURLRef); // Create a system sound object representing the sound file AudioServicesCreateSystemSoundID (soundFileURLRef, &soundFileObject);
AudioServicesPlaySystemSound (soundFileObject);
}
Best Regards