Sound-Library-291
Revision 2.1
Part of the ECE291 Assembly
Collection
Author: Michael Urman
Based on ECE291 Sound Library 1.0
by Mike Carter and John Lockwood
Copyright 1997-1999, All rights reserved
General distribution of this code is granted.
SB_Init
- Description:
Attempts to Initialize the sound card
- Inputs:
None.
- Outputs:
CF=1 on installation failure.
SB_BaseAddr, SB_IRQ, SB_DMA_Low set appropriately.
ISR installed.
SB_Clean
- Description:
Resets ISR, PIC, etc. to original values.
Must be called before exit if SB_Init called successfully
- Inputs:
None.
- Outputs:
None.
SB_Play
- Description:
Programs DMA and DSP to play from specified buffer.
- Inputs:
ax = offset of buffer (relative to page)
bh = 1 for autoinit (sound bigger than buffer) OR
bh = 0 for single cycle (sound fits in buffer).
bl = page of buffer
cx = length of buffer
dx = number of bytes until callback called
- Outputs:
Sound via DSP.
SB_SingleCycle
- Description:
Switches from AutoInit to Single Cycle. Used for playing the last
smaller than buffer amount of sound.
- Inputs:
cx = bytes remaining for last cycle.
- Outputs:
None.
SB_SetCallback
- Description:
Sets a callback for the ISR to call.
- Inputs:
es = segment of callback procedure.
bx = offset of callback procedure.
Note: Specify 0000:0000 for no callback.
- Outputs:
None.
SB_Stop
- Description:
Stops any currently playing sound.
- Inputs:
None.
- Outputs:
None.