Generating Audio Output
The basic process for generating, and playing audio can be summed up by the following steps.
- Create and initialize the necessary resources. (Typically, an audio heap, a synthesizer, and a player)
- Repeatedly make calls to alAudioFrame to generate the audio task lists.
- Execute these audio tasks lists on the RSP.
- 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.
- Create an audio heap with a call to alHeapInit.
- Set the hardware output frequency with a call to osAiSetFrequency.
- Create a synthesizer with a call to alInit(). (alInit will require that you have a callback routine to initialize the audio dma structures)
- Create message queues for receiving signals that allow you to time your audio processing.
- Create a player, (such as a sound player or sequence player) to sign into the synthesizer.
- 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
|