re3-wiiu/src/audio/oal/aldlist.h

70 lines
1.6 KiB
C
Raw Normal View History

2020-05-04 19:33:48 +02: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-24 00:44:10 +02: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 19:33:48 +02:00
2020-05-24 00:06:19 +02:00
struct ALDEVICEINFO {
2020-05-24 00:44:10 +02:00
const char *strDeviceName;
2020-05-04 19:33:48 +02:00
int iMajorVersion;
int iMinorVersion;
unsigned int uiSourceCount;
2020-05-24 00:44:10 +02:00
unsigned short Extensions;
2020-05-04 19:33:48 +02:00
bool bSelected;
2020-05-24 00:06:19 +02:00
2020-05-24 00:44:10 +02:00
ALDEVICEINFO() : iMajorVersion(0), iMinorVersion(0), uiSourceCount(0), bSelected(false)
2020-05-24 00:06:19 +02:00
{
2020-05-24 00:44:10 +02:00
strDeviceName = NULL;
Extensions = 0;
2020-05-24 00:06:19 +02:00
}
};
typedef ALDEVICEINFO *LPALDEVICEINFO;
2020-05-04 19:33:48 +02:00
class ALDeviceList
{
private:
2020-05-24 00:44:10 +02:00
ALDEVICEINFO aDeviceInfo[64];
unsigned int nNumOfDevices;
2020-05-04 19:33:48 +02:00
int defaultDeviceIndex;
int filterIndex;
public:
ALDeviceList ();
~ALDeviceList ();
2020-05-24 00:44:10 +02: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 19:33:48 +02:00
int GetDefaultDevice();
void FilterDevicesMinVer(int major, int minor);
void FilterDevicesMaxVer(int major, int minor);
2020-05-24 00:44:10 +02:00
void FilterDevicesExtension(unsigned short ext);
2020-05-04 19:33:48 +02:00
void ResetFilters();
int GetFirstFilteredDevice();
int GetNextFilteredDevice();
private:
unsigned int GetMaxNumSources();
};
#endif
2020-05-12 01:24:57 +02:00
#endif // ALDEVICELIST_H