1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-11-13 06:39:16 +00:00
re3/src/audio/oal/aldlist.h

70 lines
1.6 KiB
C
Raw Normal View History

2020-05-04 17:33:48 +00:00
#ifndef ALDEVICELIST_H
#define ALDEVICELIST_H
#include "oal_utils.h"
#ifdef AUDIO_OAL
#pragma warning(disable: 4786) //disable warning "identifier was truncated to '255' characters in the browser information"
2020-05-23 22:44:10 +00:00
enum
{
ADEXT_EXT_CAPTURE = (1 << 0),
ADEXT_EXT_EFX = (1 << 1),
ADEXT_EXT_OFFSET = (1 << 2),
ADEXT_EXT_LINEAR_DISTANCE = (1 << 3),
ADEXT_EXT_EXPONENT_DISTANCE = (1 << 4),
ADEXT_EAX2 = (1 << 5),
ADEXT_EAX3 = (1 << 6),
ADEXT_EAX4 = (1 << 7),
ADEXT_EAX5 = (1 << 8),
ADEXT_EAX_RAM = (1 << 9),
};
2020-05-04 17:33:48 +00:00
2020-05-23 22:06:19 +00:00
struct ALDEVICEINFO {
2020-05-23 22:44:10 +00:00
const char *strDeviceName;
2020-05-04 17:33:48 +00:00
int iMajorVersion;
int iMinorVersion;
unsigned int uiSourceCount;
2020-05-23 22:44:10 +00:00
unsigned short Extensions;
2020-05-04 17:33:48 +00:00
bool bSelected;
2020-05-23 22:06:19 +00:00
2020-05-23 22:44:10 +00:00
ALDEVICEINFO() : iMajorVersion(0), iMinorVersion(0), uiSourceCount(0), bSelected(false)
2020-05-23 22:06:19 +00:00
{
2020-05-23 22:44:10 +00:00
strDeviceName = NULL;
Extensions = 0;
2020-05-23 22:06:19 +00:00
}
};
typedef ALDEVICEINFO *LPALDEVICEINFO;
2020-05-04 17:33:48 +00:00
class ALDeviceList
{
private:
2020-05-23 22:44:10 +00:00
ALDEVICEINFO aDeviceInfo[64];
unsigned int nNumOfDevices;
2020-05-04 17:33:48 +00:00
int defaultDeviceIndex;
int filterIndex;
public:
ALDeviceList ();
~ALDeviceList ();
2020-05-23 22:44:10 +00:00
unsigned int GetNumDevices();
const char *GetDeviceName(unsigned int index);
void GetDeviceVersion(unsigned int index, int *major, int *minor);
unsigned int GetMaxNumSources(unsigned int index);
bool IsExtensionSupported(int index, unsigned short ext);
2020-05-04 17:33:48 +00:00
int GetDefaultDevice();
void FilterDevicesMinVer(int major, int minor);
void FilterDevicesMaxVer(int major, int minor);
2020-05-23 22:44:10 +00:00
void FilterDevicesExtension(unsigned short ext);
2020-05-04 17:33:48 +00:00
void ResetFilters();
int GetFirstFilteredDevice();
int GetNextFilteredDevice();
private:
unsigned int GetMaxNumSources();
};
#endif
2020-05-11 23:24:57 +00:00
#endif // ALDEVICELIST_H