我无法使用AudioToolbox框架播放声音。我的代码行:
SystemSoundID soundID;
CFURLRef soundFileURLRef;
OSStatus error = AudioServicesCreateSystemSoundID((__bridge CFURLRef)(aFileURL), &aSoundID);调试后显示错误((OSStatus) error = -1500)。
发布于 2013-03-05 14:36:06
错误代码-1500表示常量kAudioServicesSystemSoundUnspecifiedError,其描述为“发生了未指定的错误”。
我会仔细检查URL是否可以被您的程序读取,目标是否为受支持的格式,以及它是否是有效的、可读的文件。
当然,谷歌kAudioServicesSystemSoundUnspecifiedError会给你一些额外的提示。
https://stackoverflow.com/questions/15216757
复制相似问题