#include <revolution.h> typedef void (*AXExceedCallback)(u32 cycles); void AXRegisterExceedCallback(AXExceedCallback callback);
callback |
Callback to be registered. |
None.
AXRegisterExceedCallback function registers the callback that is called when the DSP audio process does not complete within the 3 millisecond 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 actual 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.
Also, the DSP load prediction of AX 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 if the actual 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 noise is observed during playback.
On a related note, the number of extra DSP cycles used over single audio frame will be passed to the callback argument cycles.
2006/10/23 Initial version.
CONFIDENTIAL