alCSPNew.3p 2.58 KB
.TH alCSPNew 3P local "Silicon Graphics, Inc."

.SH NAME 
.upperok 
alCSPNew \- initialize a compressed MIDI sequence player.

.SH SYNOPSIS
.nf
\f3
.Op c
#include <libaudio.h>
.sp .8v
void	alCSPNew(ALCSPlayer *seqp, ALSeqpConfig *config);
.Op
\f1
.fi
.SH PARAMETERS
.TP 10
.B seqp
pointer to the compressed MIDI sequence player structure to initialize. 
.TP
.B config
pointer to the sequence player configuration structure.
(Note, both alSeqpNew and alCSPNew use the same configuration structure.)

.SH DESCRIPTION
alCSPNew initializes a compressed MIDI sequence player,
.I seqp,
for the configuration specified in 
.I config 
and signs into the synthesis driver as a client.  Note that it
allocates memory from the (initialized)
.I ALHeap
referenced by the 
.I config 
structure. 
.PP
The parameters in the ALSeqpConfig structure,
.I config,
determine how many resources are allocated from the heap. This structure
is defined in <libaudio.h>. The values are as follows:
.TP 15
.I maxVoices
the maximum number of voices to support.
.TP
.I maxEvents
the maximum number of internal events to support.
.TP
.I maxChannels
the maximum number of MIDI channels to support, usually 16, but can be less.
.TP
.I debugFlags
flags used to turn on and off the reporting of common audio errors. Set to
zero to turn off reporting of errors. Turn on error reporting by or'ing 
together the following values:
.B NO_SOUND_ERR_MASK 
controls error messages that occur when there is no sound that covers
the requested sound at the specified pitch.
.B NOTE_OFF_ERR_MASK
controls error messages that occur when a note off occurs, but there is no
voice currently playing that note on the specified channel.
.B NO_VOICE_ERR_MASK
controls error messages that occur when there are no more voices available
to satisfy the request to allocate a voice.
.TP
.I *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. 
.TP
.I *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.
.TP
.I *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.
.TP
.I heap
a pointer to an initialized audio heap.

.PP
An example of setting up and using oscillators is given in the demo application
.B Playseq
.SH SEE ALSO 
alHeapNew(3P), 
alHeapAlloc(3P),
alCSPDelete(3P),
alCSeqPlayer(3P)