#include <cafe/ax.h>

AXPB_ERROR_CODE AXRegisterAppFrameCallback(AXUserCallback fcb);


fcb Callback function to be invoked.

Return Values

AXPB_ERROR_NONE if successful;
AXPB_ERROR_FRAMECB_MAX_DEPTH_REACHED if the maximum number of allowed frame callbacks are already registered;
AXPB_ERROR_FRAMECB_TRY_AGAIN if some other processing is currently registering frame callback
AXPB_ERROR_FRAMECB_NULL_FUNC if the application sent a NULL pointer as input


Registers an application callback function that AX will invoke at each audio frame. Since different applications can use AX simultaneously, AX maintains a list of frame callbacks registered with it, and calls each one of them every frame. This allows individual apps to register/deregister AX frame callback.

The total number of callbacks that can be registered is AX_MAX_APP_FRAME_CBS, which as of this writing is 64.

The callback is invoked from the AX application I/O thread, which has a higher priority than application threads. All standard thread synchronization methods apply. For more information, see Basic Thread Scheduling.


Library Version Availability
Sound 2.0 Yes
Sound 1.0 Yes

Do Not Call From


See Also

Cafe Core OS (COS) Overview
AX Data Structures and Definitions

Revision History

2015/06/01 Fixed links to Basic Thread topic.
2013/05/08 Automated cleanup pass.
2012/01/26 Update to Audio API v2.0.
2011/02/21 Initial Version