/ Published in: Objective C
Expand |
Embed | Plain Text
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); }
You need to login to post a comment.
