0
我想在我正在使用的cocos2d游戏中使用SimpleAudioEngine作为音乐。当我在我的游戏层中导入SimpleAudioEngine.h时,出现CVPixelBuffer.h和CMFormatDescription.h中的语法错误。导入SimpleAudioEngine时出错
我创建了一个新的清洁cocos2d的应用和进口SimpleAudioEngine和它的工作就好了,这样的错误是在我的应用程序的代码。
你认为是什么原因导致与SimpleAudioEngine的错误?我怎样才能解决这个问题?
编辑:
貌似问题是size_t width
创建CVPixelBuffer时。
在此代码:
CV_EXPORT CVReturn CVPixelBufferCreate(CFAllocatorRef allocator,
size_t width,
size_t height,
OSType pixelFormatType,
CFDictionaryRef pixelBufferAttributes,
CVPixelBufferRef *pixelBufferOut) __OSX_AVAILABLE_STARTING(__MAC_10_4,__IPHONE_4_0);
它提出了错误size_t width
并说:
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/CoreVideo.framework/Headers/CVPixelBuffer.h:183: error: expected ';', ',' or ')' before numeric constant
你正在得到什么错误? –