【发布时间】:2011-12-24 18:27:42
【问题描述】:
-(IBAction)test1
{
CFBundleRef mainBundle = CFBundleGetMainBundle();
CFURLRef soundFileURLRef;
soundFileURLRef =CFBundleCopyResourceURL(mainBundle,
(CFStringRef) @"Bear3", CFSTR ("wav"), NULL);
UInt32 soundID;
AudioServicesCreateSystemSoundID(soundFileURLRef , &soundID);
AudioServicesPlaySystemSound(soundID);
AudioServicesDisposeSystemSoundID(soundID);
CFRelease(soundFileURLRef);
}
它没有播放声音文件
【问题讨论】:
-
您遇到错误了吗? 正在发生什么?