1

我无法使用 AudioToolbox 框架播放声音。我的代码行:

SystemSoundID soundID;
    CFURLRef  soundFileURLRef;
    OSStatus error = AudioServicesCreateSystemSoundID((__bridge CFURLRef)(aFileURL),         &aSoundID);

调试后显示错误((OSStatus) error = -1500)

4

1 回答 1

1

错误代码 -1500 表示常量kAudioServicesSystemSoundUnspecifiedError,其描述为“发生了未指定的错误。”。

我会仔细检查您的程序是否可以读取 URL,目标是受支持的格式,并且它是有效的可读文件。

当然,谷歌搜索kAudioServicesSystemSoundUnspecifiedError会给你一些额外的提示。

于 2013-03-05T06:36:05.727 回答