Permalink
Browse files

[AE] Added new enumeration method to AE

  • Loading branch information...
1 parent b966767 commit 6d47c8391e294d838c97e38f1beaeca412c14e57 @Karlson2k committed Oct 18, 2012
@@ -197,6 +197,14 @@ void CAEFactory::EnumerateOutputDevices(AEDeviceList &devices, bool passthrough)
AE->EnumerateOutputDevices(devices, passthrough);
}
+bool CAEFactory::EnumerateOutputDevicesEx(std::vector<AEDeviceEx> &devices, bool passthrough)
+{
+ if(AE)
+ return AE->EnumerateOutputDevicesEx(devices, passthrough);
+
+ return false;
+}
+
std::string CAEFactory::GetDefaultDevice(bool passthrough)
{
if(AE)
@@ -46,6 +46,7 @@ class CAEFactory
static void SetSoundMode(const int mode);
static void OnSettingsChange(std::string setting);
static void EnumerateOutputDevices(AEDeviceList &devices, bool passthrough);
+ static bool EnumerateOutputDevicesEx(std::vector<AEDeviceEx> &devices, bool passthrough);
static std::string GetDefaultDevice(bool passthrough);
static bool SupportsRaw();
static void SetMute(const bool enabled);
@@ -26,9 +26,17 @@
#include "threads/CriticalSection.h"
#include "../AEAudioFormat.h"
+#include "../Utils/AEDeviceType.h"
typedef std::pair<std::string, std::string> AEDevice;
typedef std::vector<AEDevice> AEDeviceList;
+struct AEDeviceEx
+{
+ std::string m_DeviceName;
+ std::string m_DisplayName;
+ enum AEDeviceType m_DeviceType;
+ std::vector<AEDataFormat> m_SupportedDataFormats;
+};
/* forward declarations */
class IAEStream;
@@ -171,6 +179,14 @@ class IAE
virtual void EnumerateOutputDevices(AEDeviceList &devices, bool passthrough) = 0;
/**
+ * Enumerate the supported audio output devices with extended information
+ * @param devices The device list to append supported devices to
+ * @param passthrough True if only passthrough devices are wanted
+ * @return false if not supported, true if succeed
+ */
+ virtual bool EnumerateOutputDevicesEx(std::vector<AEDeviceEx> &devices, bool passthrough) { return false; }
+
+ /**
* Returns the default audio device
* @param passthrough True if the default passthrough device is wanted
* @return the default audio device

0 comments on commit 6d47c83

Please sign in to comment.