summaryrefslogtreecommitdiffstats
path: root/src/audio/oal/aldlist.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-11 22:21:26 +0200
committeraap <aap@papnet.eu>2020-05-11 22:21:26 +0200
commit0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2 (patch)
tree16bf11e0e8a0353448a643322e9511e8ba659fca /src/audio/oal/aldlist.h
parentCVisibilityPlugins (diff)
parentMerge remote-tracking branch 'origin/master' into miami (diff)
downloadre3-0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2.tar
re3-0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2.tar.gz
re3-0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2.tar.bz2
re3-0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2.tar.lz
re3-0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2.tar.xz
re3-0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2.tar.zst
re3-0eb5f93e96bfc4b31c0bde01e9f1296b3b612bc2.zip
Diffstat (limited to 'src/audio/oal/aldlist.h')
-rw-r--r--src/audio/oal/aldlist.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/audio/oal/aldlist.h b/src/audio/oal/aldlist.h
new file mode 100644
index 00000000..b8f1b31a
--- /dev/null
+++ b/src/audio/oal/aldlist.h
@@ -0,0 +1,49 @@
+#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"
+#include <vector>
+#include <string>
+
+typedef struct
+{
+ std::string strDeviceName;
+ int iMajorVersion;
+ int iMinorVersion;
+ unsigned int uiSourceCount;
+ std::vector<std::string> *pvstrExtensions;
+ bool bSelected;
+} ALDEVICEINFO, *LPALDEVICEINFO;
+
+class ALDeviceList
+{
+private:
+ std::vector<ALDEVICEINFO> vDeviceInfo;
+ 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, char *szExtName);
+ int GetDefaultDevice();
+ void FilterDevicesMinVer(int major, int minor);
+ void FilterDevicesMaxVer(int major, int minor);
+ void FilterDevicesExtension(char *szExtName);
+ void ResetFilters();
+ int GetFirstFilteredDevice();
+ int GetNextFilteredDevice();
+
+private:
+ unsigned int GetMaxNumSources();
+};
+#endif
+
+#endif // ALDEVICELIST_H \ No newline at end of file