diff options
author | Fire_Head <Fire-Head@users.noreply.github.com> | 2020-06-29 08:37:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-29 08:37:53 +0200 |
commit | 860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb (patch) | |
tree | 6a8f83b0d46e97b198f095b7624deecca75051e7 /src/audio/oal/aldlist.h | |
parent | restore Text.cpp (diff) | |
parent | Merge remote-tracking branch 'upstream/master' (diff) | |
download | re3-860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb.tar re3-860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb.tar.gz re3-860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb.tar.bz2 re3-860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb.tar.lz re3-860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb.tar.xz re3-860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb.tar.zst re3-860f75d66ce51f2f5f3ea2b4b2b582f6d161a2bb.zip |
Diffstat (limited to 'src/audio/oal/aldlist.h')
-rw-r--r-- | src/audio/oal/aldlist.h | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/src/audio/oal/aldlist.h b/src/audio/oal/aldlist.h index 694c9d01..417bd314 100644 --- a/src/audio/oal/aldlist.h +++ b/src/audio/oal/aldlist.h @@ -5,38 +5,58 @@ #ifdef AUDIO_OAL #pragma warning(disable: 4786) //disable warning "identifier was truncated to '255' characters in the browser information" -#include <vector> -#include <string> -typedef struct +enum { - std::string strDeviceName; + 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), +}; + +struct ALDEVICEINFO { + const char *strDeviceName; int iMajorVersion; int iMinorVersion; unsigned int uiSourceCount; - std::vector<std::string> *pvstrExtensions; + unsigned short Extensions; bool bSelected; -} ALDEVICEINFO, *LPALDEVICEINFO; + + ALDEVICEINFO() : iMajorVersion(0), iMinorVersion(0), uiSourceCount(0), bSelected(false) + { + strDeviceName = NULL; + Extensions = 0; + } +}; + +typedef ALDEVICEINFO *LPALDEVICEINFO; class ALDeviceList { private: - std::vector<ALDEVICEINFO> vDeviceInfo; + ALDEVICEINFO aDeviceInfo[64]; + unsigned int nNumOfDevices; int defaultDeviceIndex; int filterIndex; public: ALDeviceList (); ~ALDeviceList (); - int GetNumDevices(); - char *GetDeviceName(int index); - void GetDeviceVersion(int index, int *major, int *minor); - unsigned int GetMaxNumSources(int index); - bool IsExtensionSupported(int index, const char *szExtName); + 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); int GetDefaultDevice(); void FilterDevicesMinVer(int major, int minor); void FilterDevicesMaxVer(int major, int minor); - void FilterDevicesExtension(char *szExtName); + void FilterDevicesExtension(unsigned short ext); void ResetFilters(); int GetFirstFilteredDevice(); int GetNextFilteredDevice(); |