diff --git a/Source/Engine/Audio/Audio.cpp b/Source/Engine/Audio/Audio.cpp
index 75645d4e8..ee71ec27d 100644
--- a/Source/Engine/Audio/Audio.cpp
+++ b/Source/Engine/Audio/Audio.cpp
@@ -120,6 +120,20 @@ int32 Audio::GetActiveDeviceIndex()
return ActiveDeviceIndex;
}
+int32 Audio::GetActiveDeviceResolvedIndex()
+{
+ AudioDevice* active = GetActiveDevice();
+ if (active != nullptr)
+ {
+ for (int32 i = 0; i < Devices.Count(); i++)
+ {
+ if (&Devices[i] == active)
+ return i;
+ }
+ }
+ return -1;
+}
+
void Audio::SetActiveDeviceIndex(int32 index)
{
index = Math::Clamp(index, -1, Devices.Count() - 1);
diff --git a/Source/Engine/Audio/Audio.h b/Source/Engine/Audio/Audio.h
index 45a09df74..f9f03624b 100644
--- a/Source/Engine/Audio/Audio.h
+++ b/Source/Engine/Audio/Audio.h
@@ -61,11 +61,17 @@ public:
API_PROPERTY() static AudioDevice* GetActiveDevice();
///
- /// Gets the index of the active device.
+ /// Gets the index of the active device. Returns -1 if set to system default mode.
///
/// The active device index.
API_PROPERTY() static int32 GetActiveDeviceIndex();
+ ///
+ /// Gets the resolved index in Devices array of the device currently playing (resolves system default mode to the actual device index).
+ ///
+ /// The resolved active device index.
+ API_PROPERTY() static int32 GetActiveDeviceResolvedIndex();
+
///
/// Sets the index of the active device.
///