Procedures
MidiStop:
Purpose: This procedure uses one Midpak interrupt to stop the midi
from playing any longer.
Inputs: None
Outputs: None
SoundHandler:
Purpose: This procedure is checking for the sound buffer to be
loaded and prepares the
buffer to be played either in auto or in single cycle.
Inputs: mycounter
Output: Stops the sound blaster from playing sound
PlayWave:
Purpose: To play wave either in auto or single cycle. Initializes
all the variables for the wave.
Inputs: DX holds the offset of the wave to be played.
Output: Plays the wave
Variables
XMIFILE STRUCT
FName
db 20 dup(0)
; string max 20 chars.
FLength
dw ?
; total file length
SequenceNum dw
?
XMIFILE ends
MidiSeg segment
MidiBuf db
64000 dup (?)
MidiSeg ends
SNDSEG SEGMENT
sndbuf db 2048 dup
(10,20,50,80,90,80,50,20) ; 16k of sine wave
SNDSEG ENDS
WavStatus db 0
public WavStatus
XMIList XMIFILE {'grov.xmi',12280,0},
{'prison.xmi',27486,0},
{'sin.xmi',25492,0}
XMINum
dw 0
; Specifies index for desired XMIFILE.
public XMINum
MidiMsg
db 'Error file play ','$'
MidiMsg2
db 'Error file open ','$'