0

我在使用 OpenAL 的 Everyplay v1.4.2 时遇到问题。该行为工作正常,但每次播放声音时,我都会收到一条日志:“Everyplay OpenAL 缺少实现:alGetSourcef 2401, AL_SEC_OFFSET, *value”。

我还尝试通过在 Everyplay.h 中找到的这段代码停用 OpenAL:

@interface EveryplayFeatures : NSObject
/*
 * To disable Everyplay OpenAL implementation, override this class
 * method to return NO.
 */
+ (BOOL) supportsOpenAL;

/*
 * CocosDenshion background music support currently lacks hardware
 * decoder support. To disable recording support for background music,
 * override this class method to return NO.
 */
+ (BOOL) supportsCocosDenshion;
@end

我不知道该怎么做。我尝试在名为 "EveryplayFeatures.mm" 的文件中创建此接口的实现:

@implementation EveryplayFeatures

+ (BOOL) supportsOpenAL
{
    return NO;
}

+ (BOOL) supportsCocosDenshion
{
    return YES;
}

@end

这不会改变任何事情。

有谁知道第一条错误消息的含义以及如何解决它?否则我怎样才能有效地禁用 Everyplay 的 OpenAL 支持?

4

1 回答 1

1

似乎 Everyplay 还不支持您的音频代码正在使用的 AL_SEC_OFFSET。为了让 EveryplayFeatures 工作,像这样改变它:

EveryplayFeatures.h

#import <Foundation/Foundation.h>

@interface EveryplayFeatures : NSObject

@end

EveryplayFeatures.m

@implementation EveryplayFeatures (Private)

+ (BOOL) supportsOpenAL {
    return NO;
}

+ (BOOL) supportsCocosDenshion {
    return YES;
}

@end
于 2013-06-24T06:26:16.133 回答