严重:错误:类数据没有必填字段:<类型> == componentType

时间:2019-07-07 23:00:57

标签: macos audiounit auv3

尝试在macOS上编写AUv3。我从auval中收到以下错误:

VERIFYING CLASS INFO
ERROR: Class Data does not have required field:<type> == componentType

似乎某种元数据配置错误。

这是什么意思?

2 个答案:

答案 0 :(得分:0)

Class Data实际上是指kAudioUnitProperty_ClassInfo。因此,错误与AUv3 fullState有关,后者已桥接到AUv2 kAudioUnitProperty_ClassInfo。嘘。

潜在的问题是我的fullState方法没有调用超类fullState

答案 1 :(得分:0)

此替代方法对我有用:

- (NSDictionary<NSString *, id> *)getFullState {

    NSDictionary* pluginState = [data.controller getState];
    NSDictionary* superState = [super fullState];

    NSMutableDictionary* stateRes = [NSMutableDictionary dictionaryWithDictionary:pluginState];
    [stateRes addEntriesFromDictionary:superState];

    return stateRes;
}