mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-04 05:59:00 +02:00
Add macOS native Audio Backend
Adds Ryujinx.Audio.Backends.Apple, which is a AudioToolbox based audio backend for macOS (and by extension iOS). Also added in MeloNX. * Expose AudioToolkit in UI Co-authored-by: GreemDev <greemdev@ryujinx.app>
This commit is contained in:
committed by
KeatonTheBot
co-authored by
GreemDev
parent
061bfb4074
commit
3cdae775b1
@@ -3,6 +3,7 @@ using Avalonia.Controls;
|
||||
using Avalonia.Threading;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using LibHac.Tools.FsSystem;
|
||||
using Ryujinx.Audio.Backends.Apple;
|
||||
using Ryujinx.Audio.Backends.OpenAL;
|
||||
using Ryujinx.Audio.Backends.SDL2;
|
||||
using Ryujinx.Audio.Backends.SoundIo;
|
||||
@@ -255,6 +256,7 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
public bool IsOpenAlEnabled { get; set; }
|
||||
public bool IsSoundIoEnabled { get; set; }
|
||||
public bool IsSDL2Enabled { get; set; }
|
||||
public bool IsAudioToolboxEnabled { get; set; }
|
||||
public bool IsCustomResolutionScaleActive => _resolutionScale == 4;
|
||||
public bool IsScalingFilterActive => _scalingFilter == (int)Ryujinx.Common.Configuration.ScalingFilter.Fsr;
|
||||
|
||||
@@ -459,12 +461,14 @@ namespace Ryujinx.Ava.UI.ViewModels
|
||||
IsOpenAlEnabled = OpenALHardwareDeviceDriver.IsSupported;
|
||||
IsSoundIoEnabled = SoundIoHardwareDeviceDriver.IsSupported;
|
||||
IsSDL2Enabled = SDL2HardwareDeviceDriver.IsSupported;
|
||||
IsAudioToolboxEnabled = OperatingSystem.IsMacOS() && AppleHardwareDeviceDriver.IsSupported;
|
||||
|
||||
await Dispatcher.UIThread.InvokeAsync(() =>
|
||||
{
|
||||
OnPropertyChanged(nameof(IsOpenAlEnabled));
|
||||
OnPropertyChanged(nameof(IsSoundIoEnabled));
|
||||
OnPropertyChanged(nameof(IsSDL2Enabled));
|
||||
OnPropertyChanged(nameof(IsAudioToolboxEnabled));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
<ComboBoxItem
|
||||
IsEnabled="{Binding IsSDL2Enabled}"
|
||||
Content="{locale:Locale SettingsTabSystemAudioBackendSDL2}" />
|
||||
<ComboBoxItem
|
||||
IsEnabled="{Binding IsAudioToolboxEnabled}"
|
||||
Content="{locale:Locale SettingsTabSystemAudioBackendAudioToolbox}" />
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="10,0,0,0" Orientation="Horizontal">
|
||||
|
||||
Reference in New Issue
Block a user