Obtaining Data For the Controller Speaker

Overview

Use the AXRmt* functions to obtain the audio data for the controller speaker.

Example

The following sample code is used to obtain audio data for the controller speaker.

#include <revolution.h>

// Are there 40 or more samples of the audio data synthesized for the controller speaker?
if (40 <= AXRmtGetSamplesLeft())
{
    
    // Because there is enough data, the process continues.
    
    // Process for each of the four controllers.
    for (chan = 0; chan < 4; chan++)
    {

        // 40 samples of audio data for controller number chan are copied to the AudioBuffer[].        
        AXRmtGetSamples(chan, AudioBuffer[chan], 40);

        ... // Process the AudioBuffer[] data.
    }

    // Advance the pointer, because the controller speaker's audio data was obtained from the AX internal buffer.
    AXRmtAdvancePtr(40);
}

Revision History

2007/10/02 Revised the entire document following changes to the structure of the function reference.
2007/05/10 Revised the sample codes.
2006/07/31 Initial version.


CONFIDENTIAL