SB AWE32 Developer's Information Pack
PART III Windows Driver API
••
78
Copyright
Creative Technology Ltd., 1994-1996
Version 3.00
// Get REVERB Type Variations List
// Same buffer settings as before.
param.m_SubIndex = REVERB;
param.m_TypeIndex = REVERB_CHORUS;
AWEManager(hID,AWE_QUERY_EFXV_SUPPORT,(LPARAM)(LPPARAMOBJECT)¶m,
(LPARAM)(LPBUFFEROBJECT)&buffer);
// Add into the Reverb Buffer
for ( i=0; i<buffer.m_Flag; i++ )
strcpy(&cReverbList[i][0], (const char*)
GetElement(&scratch[0], i, (int) buffer.m_SizeUsed));
//
// CHORUS TYPE VARIATIONS
// Get CHORUS Type Variations List
// Same buffer settings as before.
param.m_SubIndex = CHORUS;
AWEManager(hID,AWE_QUERY_EFXV_SUPPORT,(LPARAM)(LPPARAMOBJECT)¶m,
(LPARAM)(LPBUFFEROBJECT)&buffer);
// Add into the Chorus Buffer
for ( i=0; i<buffer.m_Flag; i++ )
strcpy(&cChorusList[i][0],(const char*) GetElement(&scratch[0],i,
(int)buffer.m_SizeUsed));
//
// TREBLE TYPE VARIATIONS
// Get Treble Type Variations List
// Same buffer settings as before.
param.m_SubIndex = TREBLE;
AWEManager(hID,AWE_QUERY_EFXV_SUPPORT,(LPARAM)(LPPARAMOBJECT)¶m,
(LPARAM)(LPBUFFEROBJECT)&buffer);
// Add into the Treble Buffer
for ( i=0; i<buffer.m_Flag; i++ )
strcpy(&cTrebleList[i][0],(const char*) GetElement(&scratch[0],i,
(int)buffer.m_SizeUsed));
//
// BASS TYPE VARIATIONS
// Get Bass Type Variations List
// Same buffer settings as before.
param.m_SubIndex = BASS;
AWEManager(hID,AWE_QUERY_EFXV_SUPPORT,(LPARAM)(LPPARAMOBJECT)¶m,
(LPARAM)(LPBUFFEROBJECT)&buffer);
// Add into the Bass Buffer
for ( i=0; i<buffer.m_Flag; i++ )
strcpy(&cBassList[i][0],(const char*) GetElement(&scratch[0],i,
(int)buffer.m_SizeUsed));
// QUERY MEMORY STATUS
// Get Memory status for both available and maximum.
AWEManager(hID,AWE_QUERY_DRAM_SIZE,(LPARAM)(DWORD FAR*)&dwMemMax,
(LPARAM)(DWORD FAR*)&dwMemAvail);
}
Note that there is no error handling implemented in the above functions. It is assume that the buffer size
used to retrieve the strings is sufficient. If you do not wish to allocate the scratch buffer from the stack,
you will have to query for the required buffer size. Using the size obtained you can then use it for
dynamic allocation. To query for buffer size required, specify a buffer of 1 character. This will cause the
AWE Manager to return the error AWE_ERR_RESOURCE_INSUFFICIENT. From the CBufferObject,
the member m_SizeUsed will contain the number of bytes required to contain the entire list of strings.