From e17eb7bfafdd95084baea8e9f3dc77ee3f755347 Mon Sep 17 00:00:00 2001 From: Mary Date: Sun, 19 Sep 2021 12:29:19 +0200 Subject: amadeus: Update to REV10 (#2654) * amadeus: Update to REV10 This implements all the changes made with REV10 on 13.0.0. * Address Ack's comment * Address gdkchan's comment --- Ryujinx.Audio/Renderer/Device/VirtualDevice.cs | 34 +++++++++++++++++++++----- 1 file changed, 28 insertions(+), 6 deletions(-) (limited to 'Ryujinx.Audio/Renderer/Device/VirtualDevice.cs') diff --git a/Ryujinx.Audio/Renderer/Device/VirtualDevice.cs b/Ryujinx.Audio/Renderer/Device/VirtualDevice.cs index 29395e5c..3ec37069 100644 --- a/Ryujinx.Audio/Renderer/Device/VirtualDevice.cs +++ b/Ryujinx.Audio/Renderer/Device/VirtualDevice.cs @@ -27,12 +27,13 @@ namespace Ryujinx.Audio.Renderer.Device /// /// All the defined virtual devices. /// - public static readonly VirtualDevice[] Devices = new VirtualDevice[4] + public static readonly VirtualDevice[] Devices = new VirtualDevice[5] { - new VirtualDevice("AudioStereoJackOutput", 2), - new VirtualDevice("AudioBuiltInSpeakerOutput", 2), - new VirtualDevice("AudioTvOutput", 6), - new VirtualDevice("AudioUsbDeviceOutput", 2), + new VirtualDevice("AudioStereoJackOutput", 2, true), + new VirtualDevice("AudioBuiltInSpeakerOutput", 2, false), + new VirtualDevice("AudioTvOutput", 6, false), + new VirtualDevice("AudioUsbDeviceOutput", 2, true), + new VirtualDevice("AudioExternalOutput", 6, true), }; /// @@ -50,15 +51,22 @@ namespace Ryujinx.Audio.Renderer.Device /// public float MasterVolume { get; private set; } + /// + /// Define if the is provided by an external interface. + /// + public bool IsExternalOutput { get; } + /// /// Create a new instance. /// /// The name of the . /// The count of channels supported by the . - private VirtualDevice(string name, uint channelCount) + /// Indicate if the is provided by an external interface. + private VirtualDevice(string name, uint channelCount, bool isExternalOutput) { Name = name; ChannelCount = channelCount; + IsExternalOutput = isExternalOutput; } /// @@ -80,5 +88,19 @@ namespace Ryujinx.Audio.Renderer.Device { return Name.Equals("AudioUsbDeviceOutput"); } + + /// + /// Get the output device name of the . + /// + /// The output device name of the . + public string GetOutputDeviceName() + { + if (IsExternalOutput) + { + return "AudioExternalOutput"; + } + + return Name; + } } } -- cgit v1.2.3