(iphone system sound not work when i start recording the audio.) |
(No difference)
|
Revision as of 11:59, 19 August 2013
I have created a method that we have used to play the custom system sound on button click in iphone. but when i click on the record button and call the below method then not work this method. When relaunch the app then it will work. If i click again on the record button then not work. Can any one help me . How can i resolve it. or provide some sample code. I have download the apple sample code but not work in my scenario
- (void)playSystemSound{ SystemSoundID mySSID[10]; NSString *path = [[NSBundle mainBundle] pathForResource:@"COWBELL1" ofType:@"caf"]; NSURL *url = [[NSURL alloc] initFileURLWithPath:path]; CFURLRef *urlRef = (CFURLRef) [url retain]; AudioServicesCreateSystemSoundID(urlRef, &mySSID[0]); AudioServicesPlaySystemSound(mySSID[0]); }