diff options
Diffstat (limited to 'Ryujinx.Audio/Backends/Common/HardwareDeviceSessionOutputBase.cs')
| -rw-r--r-- | Ryujinx.Audio/Backends/Common/HardwareDeviceSessionOutputBase.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Ryujinx.Audio/Backends/Common/HardwareDeviceSessionOutputBase.cs b/Ryujinx.Audio/Backends/Common/HardwareDeviceSessionOutputBase.cs index 1e000e4c..f1f0039c 100644 --- a/Ryujinx.Audio/Backends/Common/HardwareDeviceSessionOutputBase.cs +++ b/Ryujinx.Audio/Backends/Common/HardwareDeviceSessionOutputBase.cs @@ -18,6 +18,7 @@ using Ryujinx.Audio.Common; using Ryujinx.Audio.Integration; using Ryujinx.Memory; +using System.Runtime.CompilerServices; namespace Ryujinx.Audio.Backends.Common { @@ -52,7 +53,13 @@ namespace Ryujinx.Audio.Backends.Common protected ulong GetSampleCount(AudioBuffer buffer) { - return (ulong)BackendHelper.GetSampleCount(RequestedSampleFormat, (int)RequestedChannelCount, (int)buffer.DataSize); + return GetSampleCount((int)buffer.DataSize); + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + protected ulong GetSampleCount(int dataSize) + { + return (ulong)BackendHelper.GetSampleCount(RequestedSampleFormat, (int)RequestedChannelCount, dataSize); } public abstract void Dispose(); |
