How to play Sound File In Silent Mode iPhone sdk ?
I m trying to play sound file in silent mode but result is zero
i have tried this code
SystemSoundID soundID;
AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:fullpath],&soundID);
AudioServicesPlaySystemSound (soundID);
when i import in header file
#import <AudioToolbox/AudioToolbox.h>
create Error like
error: expected identifier before '\x786f7073'
Asnwer As Soon As Possible.....
Thanks In advance
Regard
StupidiPhoneDeveloper
Thanks Buddy for such a quick reply i have found the solution
By the following code you can check your iPhone Profile ( Regular/Silent) and here is the code
And About this error
Just write below line in every class header file
you have to define an audio session category that is not silenced by the mute switch.
Check out the audio session page on apple dev site : http://developer.apple.com/library/ios/#documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategories/AudioSessionCategories.html%23//apple_ref/doc/uid/TP40007875-CH4-SW1
Maybe the AVAudioSessionCategoryPlayAndRecord is the one you need.