Technical Q&A QA1720

Audio Unit - Handling audio unit authorization (copy protection)

Q:  How should an audio unit handle authorization requirements?

A: How should an audio unit handle authorization requirements?

If an audio unit provides a level of copy protection and is not authorized to run, the error code kAudioUnitErr_Unauthorized should be returned when an attempt is made to open or initialize the component.

Audio Unit Host applications such as AULab specifically check for kAudioUnitErr_Unauthorized and will present the user with a dialog asking if they would like to authorize the audio unit. This mechanism allows displaying an audio unit's custom user interface which should contain interface elements for handling the authorization process as required.

Figure 1  AULab's Authorization Check.

Once an audio unit has successfully been added to a graph and initialized no formal mechanism exists in the AU specification to handle dynamic de-authorization. For example, an audio unit may become unauthorized due to the removal of a hardware dongle. In these dynamic cases, the audio unit should either output silence, degrade audio quality or present some user feedback in the audio unit's user interface asking the user to reauthorize the audio unit.



Document Revision History


DateNotes
2010-09-13

New document that describes how to handle audio unit authorization requirements and the use of kAudioUnitErr_Unauthorized.