Revision: 41740
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at February 23, 2011 01:30 by takezou621
Initial Code
-(void)playSystemSound:(NSURL*)fileURL{
SystemSoundID systemSoundID;
OSStatus err;
err = AudioServicesCreateSystemSoundID((CFURLRef) fileURL,
&systemSoundID);
if(err){
NSLog(@"AudioServicesCreateSystemSoundID err = %d",err);
return;
}
// systemSoundCompletionProcFunctionã¯ã‚µã‚¦ãƒ³ãƒˆã‚™å†ç”Ÿå®Œäº†æ™‚ã«å‘¼ã²ã‚™å‡ºã•れるコールãƒã‚™ãƒƒã‚¯é–¢æ•°
AudioServicesAddSystemSoundCompletion(systemSoundID,
NULL,
NULL,
systemSoundCompletionProcFunction,
NULL);
// コールãƒã‚™ãƒƒã‚¯é–¢æ•°ã‚’削除
//AudioServicesRemoveSystemSoundCompletion(systemSoundID);
// å†ç”Ÿé–‹å§‹
AudioServicesPlaySystemSound(systemSoundID);
}
Initial URL
Initial Description
Initial Title
Use System Sound Services
Initial Tags
Initial Language
Objective C