// set the current device. device is from 0 to HAE_MaxDevices() // NOTE: This function needs to function before any other calls may have happened. // Also you will need to call HAE_ReleaseAudioCard then HAE_AquireAudioCard // in order for the change to take place. deviceParameter is a device specific // pointer. Pass NULL if you don't know what to use. void HAE_SetDeviceID(INT32 deviceID, void *deviceParameter) { if (deviceID < HAE_MaxDevices()) { g_currentDeviceID = deviceID; } }
// NOTE: This function needs to function before any other calls may have happened. // Format of string is a zero terminated comma delinated C string. // "platform,method,misc" // example "MacOS,Sound Manager 3.0,SndPlayDoubleBuffer" // "WinOS,DirectSound,multi threaded" // "WinOS,waveOut,multi threaded" // "WinOS,VxD,low level hardware" // "WinOS,plugin,Director" void HAE_GetDeviceName(INT32 deviceID, char *cName, UINT32 cNameLength) { char *data; static char *names[] = { "Linux,/dev/dsp", }; if (cName && cNameLength) { if (deviceID < HAE_MaxDevices()) { // can't do string functions here, it might be bad to do. data = names[deviceID]; while (*data && (cNameLength > 0)) { *cName = *data; cName++; data++; cNameLength--; } *cName = 0; } } }
// NOTE: This function needs to function before any other calls may have happened. // Format of string is a zero terminated comma delinated C string. // "platform,method,misc" // example "MacOS,Sound Manager 3.0,SndPlayDoubleBuffer" // "WinOS,DirectSound,multi threaded" // "WinOS,waveOut,multi threaded" // "WinOS,VxD,low level hardware" // "WinOS,plugin,Director" void HAE_GetDeviceName(INT32 deviceID, char *cName, UINT32 cNameLength) { char *data; //$$fb this name is not nice. Shouldn't be static but reflect the actually used device static char *names[] = { #ifdef __linux__ "LinuxOS,dev/audio,multi threaded", #else "SolarisOS,dev/audio,multi threaded", #endif }; if (cName && cNameLength) { if (deviceID < HAE_MaxDevices()) { // can't do string functions here, it might be bad to do. data = names[deviceID]; while (*data && (cNameLength > 0)) { *cName = *data; cName++; data++; cNameLength--; } *cName = 0; } } }