Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[AE] Added new enumeration method to AE

  • Loading branch information...
commit 6d47c8391e294d838c97e38f1beaeca412c14e57 1 parent b966767
@Karlson2k authored
View
8 xbmc/cores/AudioEngine/AEFactory.cpp
@@ -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)
View
1  xbmc/cores/AudioEngine/AEFactory.h
@@ -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);
View
16 xbmc/cores/AudioEngine/Interfaces/AE.h
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.