4

我正在尝试在 iOS 上发布 AudioUnit 生成器。当我打电话

- (void)publishOutputAudioUnit {

    AudioComponentDescription desc = { kAudioUnitType_RemoteGenerator, 'anap', 'cwcw', 0, 0 };
    OSStatus status = AudioOutputUnitPublish(&desc, CFSTR("My app"), 1, m_au);

    if (status) {
        DLog(@"Couldn't publish audio unit");
    }
}

我收到控制台消息:

ERROR:     [0x39d1518c] 225: error -66748 from registration server

-66748作为状态。谷歌没有帮助我文档也没有

在设置我的音频会话并使用所有最新的(iOS 7)AVAudioSession API 时,我没有收到任何其他错误。

有什么我想念的秘密吗?

4

2 回答 2

1

我需要做的是在 Info.plist 中添加一个条目:

AudioComponents (Array)
     (item 0) (Dictionary)
          version
          manufacturer
          name
          type
          subtype

或者,以原始形式:

<array>
    <dict>
        <key>version</key>
        <integer>1</integer>
        <key>manufacturer</key>
        <string>cwcw</string>
        <key>name</key>
        <string>My amazing app</string>
        <key>type</key>
        <string>aurg</string>
        <key>subtype</key>
        <string>shkr</string>
    </dict>
</array>
</plist>
于 2013-11-22T16:53:45.940 回答
1

I've also hit the same problem. Even when I had AudioComponents in the Info.plist, calling AudioComponentDescription(..) failed with the same error -66748 (kAudioComponentErr_NotPermitted)

Finally, I determined that it's also necessary to have CFBundleDisplayName item in the Info.plist file.

于 2019-02-04T08:36:17.570 回答