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

55 lines
1.3 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"
#include <vector>
#include <string>
2020-05-24 00:06:19 +02:00
struct ALDEVICEINFO {
2020-05-04 19:33:48 +02:00
std::string strDeviceName;
int iMajorVersion;
int iMinorVersion;
unsigned int uiSourceCount;
std::vector<std::string> *pvstrExtensions;
bool bSelected;
2020-05-24 00:06:19 +02:00
ALDEVICEINFO() : iMajorVersion(0), iMinorVersion(0), uiSourceCount(0), pvstrExtensions(NULL), bSelected(false)
{
}
};
typedef ALDEVICEINFO *LPALDEVICEINFO;
2020-05-04 19:33:48 +02:00
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);
2020-05-12 01:24:57 +02:00
bool IsExtensionSupported(int index, const char *szExtName);
2020-05-04 19:33:48 +02:00
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
2020-05-12 01:24:57 +02:00
#endif // ALDEVICELIST_H