N64® Functions Menu

al - Audio Library Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive

Nintendo® Confidential





alCSPNew

Syntax
#include <libaudio.h>
void alCSPNew(ALCSPlayer *seqp, ALSeqpConfig *config);

Arguments

  • seqp is the pointer to the compressed MIDI sequence player structure to initialize
  • config is the pointer to the sequence player configuration structure
Explanation
It initializes a compressed MIDI sequence player (seqp) for the configuration specified in config, and it signs into the synthesis driver as a client. It allocates memory from the (initialized) ALHeap referenced by the configuration structure. Both the alSeqpNew and alCSPNew functions use the same ALSeqpConfig configuration structure.

The arguments in the ALSeqpConfig structure (config) determine how many resources are allocated from the heap. This structure is defined in the libaudio.h file. The values are as follows:
  • maxVoices is the maximum number of voices to support
  • maxEvents is the maximum number of internal events to support
  • maxChannels is the maximum number of MIDI channels to support, usually 16, but it can be fewer
  • debugFlags specifies the flags used to turn on and off the reporting of common audio errors. It is set to zero to turn off error reporting. To turn on error reporting, "OR" together the following values:

    • NO_SOUND_ERR_MASK controls error messages that occur when there is no sound that covers the requested sound at the specified pitch.
    • NOTE_OFF_ERR_MASK controls error messages that occur when a "note off" occurs when there is no voice currently playing that note on the specified channel.
    • NO_VOICE_ERR_MASK controls error messages that occur when there are no more voices available to satisfy the request to allocate a voice.
    • *initOsc must point to the procedure that handles the initialization of oscillators used to perform vibrato and tremelo. If vibrato and tremelo are not used, this value must be set to zero.
    • *updateOsc must point to the procedure that handles the updating of oscillators used to perform vibrato and tremelo. If vibrato and tremelo are not used, this value must be set to zero.
    • *stopOsc must point to the procedure that handles the shutting down of oscillators used to perform vibrato and tremelo. If vibrato and tremelo are not used, this value must be set to zero.
    • heap points to an initialized audio heap.
Example
An example showing how to set up and use oscillators is presented in the Playseq demo application.

See Also
alHeapAlloc
alCSPDelete



Nintendo® Confidential

Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.


Copyright © 1998
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last Updated April, 1999