mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-03 18:56:26 +02:00
audio: sdl2: Do not report 5.1 if the device doesn't support it (#4908)
* amadeus: adjust VirtualDevice channel configuration reporting with HardwareDevice * audio: sdl2: Do not report 5.1 if device doesn't support it SDL2 5.1 to Stereo conversion is terrible and make everything sound quiet. Let's not expose 5.1 if not truly supported by the device.
This commit is contained in:
parent
f679f25e08
commit
880fd3cfcb
4 changed files with 47 additions and 3 deletions
|
@ -1,3 +1,4 @@
|
|||
using Ryujinx.Audio.Integration;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ryujinx.Audio.Renderer.Device
|
||||
|
@ -22,7 +23,23 @@ namespace Ryujinx.Audio.Renderer.Device
|
|||
/// The current active <see cref="VirtualDevice"/>.
|
||||
/// </summary>
|
||||
// TODO: make this configurable
|
||||
public VirtualDevice ActiveDevice = VirtualDevice.Devices[2];
|
||||
public VirtualDevice ActiveDevice { get; }
|
||||
|
||||
public VirtualDeviceSessionRegistry(IHardwareDeviceDriver driver)
|
||||
{
|
||||
uint channelCount;
|
||||
|
||||
if (driver.GetRealDeviceDriver().SupportsChannelCount(6))
|
||||
{
|
||||
channelCount = 6;
|
||||
}
|
||||
else
|
||||
{
|
||||
channelCount = 2;
|
||||
}
|
||||
|
||||
ActiveDevice = new VirtualDevice("AudioTvOutput", channelCount, false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the associated <see cref="T:VirtualDeviceSession[]"/> from an AppletResourceId.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue