Generating Audio Output

The basic process for generating, and playing audio can be summed up by the following steps.

  1. Create and initialize the necessary resources. (Typically, an audio heap, a synthesizer, and a player)

  2. Repeatedly make calls to alAudioFrame to generate the audio task lists.

  3. Execute these audio tasks lists on the RSP.

  4. Set the output DAC’s to point to the audio output, with a call to osAiSetNextBuffer().

The creation and initialization of the necessary resources is somewhat dependent on your applications needs, but typically you will need to take the following steps.

  1. Create an audio heap with a call to alHeapInit.

  2. Set the hardware output frequency with a call to osAiSetFrequency.

  3. Create a synthesizer with a call to alInit(). (alInit will require that you have a callback routine to initialize the audio dma structures)

  4. Create message queues for receiving signals that allow you to time your audio processing.

  5. Create a player, (such as a sound player or sequence player) to sign into the synthesizer.

  6. Initialize the resources specific to the player(s) that you have created.

    Copyright © 1999
    Nintendo of America Inc. All Rights Reserved
    Nintendo and N64 are registered trademarks of Nintendo
    Last Updated January, 1999