summaryrefslogtreecommitdiffstats
path: root/src/audio/oal/aldlist.h
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-05-24 00:45:10 +0200
committerSergeanur <s.anureev@yandex.ua>2020-05-24 00:45:10 +0200
commit13a9441d5e6364d4e6da36ea8ed9211887b0e112 (patch)
tree23a4beecb377cd7cda53627a0e54d95740bd2664 /src/audio/oal/aldlist.h
parentMerge branch 'master' into opus (diff)
parentOptimize ALDeviceList (diff)
downloadre3-13a9441d5e6364d4e6da36ea8ed9211887b0e112.tar
re3-13a9441d5e6364d4e6da36ea8ed9211887b0e112.tar.gz
re3-13a9441d5e6364d4e6da36ea8ed9211887b0e112.tar.bz2
re3-13a9441d5e6364d4e6da36ea8ed9211887b0e112.tar.lz
re3-13a9441d5e6364d4e6da36ea8ed9211887b0e112.tar.xz
re3-13a9441d5e6364d4e6da36ea8ed9211887b0e112.tar.zst
re3-13a9441d5e6364d4e6da36ea8ed9211887b0e112.zip
Diffstat (limited to 'src/audio/oal/aldlist.h')
-rw-r--r--src/audio/oal/aldlist.h39
1 files changed, 27 insertions, 12 deletions
diff --git a/src/audio/oal/aldlist.h b/src/audio/oal/aldlist.h
index 3afa6bfe..417bd314 100644
--- a/src/audio/oal/aldlist.h
+++ b/src/audio/oal/aldlist.h
@@ -5,19 +5,33 @@
#ifdef AUDIO_OAL
#pragma warning(disable: 4786) //disable warning "identifier was truncated to '255' characters in the browser information"
-#include <vector>
-#include <string>
+
+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),
+};
struct ALDEVICEINFO {
- std::string strDeviceName;
+ const char *strDeviceName;
int iMajorVersion;
int iMinorVersion;
unsigned int uiSourceCount;
- std::vector<std::string> *pvstrExtensions;
+ unsigned short Extensions;
bool bSelected;
- ALDEVICEINFO() : iMajorVersion(0), iMinorVersion(0), uiSourceCount(0), pvstrExtensions(NULL), bSelected(false)
+ ALDEVICEINFO() : iMajorVersion(0), iMinorVersion(0), uiSourceCount(0), bSelected(false)
{
+ strDeviceName = NULL;
+ Extensions = 0;
}
};
@@ -26,22 +40,23 @@ 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();