alSeqpNew (function)

alSeqpNew, n_alSeqpNew

Initializes a Type 0 MIDI sequence player

Syntax

#include <libaudio.h>     /* libaudio.h */
void alSeqpNew(    ALSeqPlayer *seqp, ALSeqpConfig *config);
#include <n_libaudio.h>     /* n_libaudio.h */
void n_alSeqpNew(N_ALSeqPlayer *seqp, ALSeqpConfig *config);

Arguments

seqp
Pointer to the Type 0 MIDI sequence player structure to initialize

config
Pointer to the sequence player configuration structure

Description

alSeqpNew initializes a Type 0 MIDI sequence player (seqp) for the configuration specified in config, and it signs into the synthesis driver as a client. Note that it allocates memory from the (initialized) ALHeap referenced by the config 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
maximum number of voices to support

maxEvents
maximum number of internal events to support

maxChannels
maximum number of MIDI channels to support, usually 16

debugFlags
used to turn on and turn off the reporting of common audio errors. Set it 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
Pointer to an initialized audio heap

For details on n_audio library, see the "Chapter 28 n_audio library" of the programming manual.

See Also

alHeapNew, alHeapAlloc, alSeqpDelete, alSeqPlayer

Revision History

1999/04/30 Changed Format