#include <revolution/ax.h> typedef void (*AXExceedCallback)(u32 cycles); void AXRegisterExceedCallback(AXExceedCallback callback);
| callback | Callback to be registered. |
|---|
None.
The AXRegisterExceedCallback function registers the callback when the DSP audio process does not complete within the 3 ms audio frame.
The AX library controls the DSP load dynamically so that the DSP audio process finishes within a single audio frame. However, in an application, complex memory access requests from multiple devices may cause latency in memory access, resulting in a longer DSP processing time, compared to the DSP load estimate of AX.
The DSP load prediction of AX also presupposes that the audio data accessed by the DSP (such as parameter blocks) is placed in MEM1. Generally, MEM2 has a slower access speed, compared to MEM1, so the placement of audio data in MEM2 may result in a longer DSP processing time, compared to the AX estimate.
When there is large number of simultaneously played voices and the DSP processing time is longer than the AX forecast, the processing may not complete within a single audio frame. This, in turn, may result in noise in the playback sound.
The callback registered through this function will be called when there is a chance of such noise.
Check the DSP processing time using this function when a noise is observed in the playback.
The number of extra DSP cycles used over single audio frame is also passed to the callback cycles argument.
None.
2006/10/23 Initial version.
CONFIDENTIAL