Error from registration server when publishing audio unit

徘徊边缘 提交于 2019-12-10 09:31:58

问题


I'm trying to publish an AudioUnit generator on iOS. When I call

- (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");
    }
}

I get the console message:

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

with -66748 as the status. Google isn't helping me and neither are the docs.

I'm getting no other errors setting up my audio session, and using all the latest (iOS 7) AVAudioSession APIs.

Is there some secret I'm missing?


回答1:


What I needed to do was add an entry into the Info.plist:

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

Or, in raw form:

<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>



回答2:


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.



来源:https://stackoverflow.com/questions/20145360/error-from-registration-server-when-publishing-audio-unit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!