SB AWE32 Developer's Information Pack
PART II DOS Real/Protected Mode API
••
28
Copyright
Creative Technology Ltd., 1994-1996
Version 3.00
•
Loading wave data as an instrument
•
Using awe32DefineBankSizes
•
Starting and ending addresses
•
Significance of awe32NumG variable
•
Enable real-time panning using awe32RTimePan variable
Using the libraries
A header file CTAWEAPI.H for C/C++ compilers is included in this package. The libraries are
provided in 2 formats: OBJ and LIB files. Libraries of 5 memory models are provided:
•
Small memory model
•
Compact memory model
•
Medium memory model
•
Large memory model
•
Flat memory model (protected mode)
Please note that all libraries are compiled using structure members alignment of 1. For flat memory
model library, the FAR keyword has been defined away, LPBYTE is the same as PBYTE.
Initialization
The SB AWE32 EMU8000 subsystem must be properly initialized prior to any MIDI playback. Two
steps are required for initialization as shown below. The first example assumes that the base I/O
addresses of the EMU8000 subsystem is at 0x620 and are spaced 0x400 apart.
wEmuBase = 0x620;
if ( awe32Detect(wEmuBase) ) {
// Error, EMU8000 not found
}
else {
if ( awe32InitHardware() ) {
// Error, initialising EMU8000 failed
}
}
The next example assumes that the base I/O addresses of the EMU8000 subsystem is at 0x620 but are not
spaced 0x400 apart. Refer to the CTPNP.CFG Sample at the end of this section for more details on
getting the base I/O addresses.
wEmuBase[0] = 0x620;
wEmuBase[1] = 0x624;
wEmuBase[2] = 0x628;
if ( awe32DetectEx(wEmuBase[0], wEmuBase[1], wEmuBase[2]) ) {
// Error, EMU8000 not found
}
else {
if ( awe32InitHardware() ) {
// Error, initialising EMU8000 failed
}
}