SB AWE32 Developer's Information Pack
PART II DOS Real/Protected Mode API
••
22
Copyright
Creative Technology Ltd., 1994-1996
Version 3.00
awe32DefineBankSizes
WORD
PASCAL
awe32DefineBankSizes(SOUND_PACKET FAR* SP)
Action
Divide the AWE32’s RAM into banks. All previous bank divisions are forgotten. You
would normally invoke this API at the beginning of your application.
Parameters
SP
Points to the SOUND_PACKET data object in which the size of each bank and the
number of banks is specified. awe32DefineBankSizes assumes SP is not NULL.
Member
Remarks
total_banks
The total number of banks that will be used. This is also the
number of elements in SP->banks[]. The number of banks
may range from 1 to 64.
banksizes[]
The sizes of the banks are in
SP->banksizes[]; the number of
banks is in SP->total_banks. SP->banksizes[0] through SP-
>banksizes[SP->total_banks-1] are used to define the bank
sizes. The sum of all the bank sizes must be less than or equal
to the total amount of patch RAM (which may be obtained by
calling awe32TotalPatchRam).
The AWE32 uses only 16-bit samples internally; all 8-bit sample data are converted
to 16-bit by the library. Also, each bank requires 160 bytes of overhead for internal
storage. So the bank memory required for a single sound is 160 bytes plus two bytes
for every sample in the sound, regardless of whether the sound is composed of 8-bit
samples or 16-bit samples.
That is, the bank memory required is
(2 bytes) * number_of_s 160 bytes
For example, the bank memory required for a WAV file of 10000 bytes of 16-bit
samples is (10000 + 160 = 10160 bytes). The bank memory required by a WAV file of
15000 bytes of 8-bit samples is (2 bytes * 15000 + 160 = 30160 bytes).
The bank memory required for a SoundFont bank file that does not contain samples is
simply 0 byte.
Return
If successful, awe32DefineBankSizes returns zero; otherwise, it returns non-zero.
awe32SFontLoadRequest
WORD
PASCAL
awe32SFontLoadRequest(SOUND_PACKET FAR* SP)
Actions
Parse the SoundFont bank header and prepares the specified SOUND_PACKET to
download a SoundFont bank.
Parameters
SP