aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Audio/Renderers/OpenAL/OpenALAudioTrack.cs
diff options
context:
space:
mode:
authorAc_K <Acoustik666@gmail.com>2020-11-27 20:55:00 +0100
committerGitHub <noreply@github.com>2020-11-27 20:55:00 +0100
commit7b66cb0d9051cab581df6853f11e87ed115da6c3 (patch)
tree7f5903f298f54cd65d16461089722d8f20264e11 /Ryujinx.Audio/Renderers/OpenAL/OpenALAudioTrack.cs
parent0108004691a582f7df8e629c1e68a6bb0e0b90e7 (diff)
audio: Cleanup Ryujinx.Audio and fix OpenAL issue (#1746)
* audio: Cleanup SoundIO and fix OpenAL issue * fix tabs by spaces * Fix extra spaces * Fix SoundIO.cs * Fix ContainsAudioOutBuffer
Diffstat (limited to 'Ryujinx.Audio/Renderers/OpenAL/OpenALAudioTrack.cs')
-rw-r--r--Ryujinx.Audio/Renderers/OpenAL/OpenALAudioTrack.cs10
1 files changed, 7 insertions, 3 deletions
diff --git a/Ryujinx.Audio/Renderers/OpenAL/OpenALAudioTrack.cs b/Ryujinx.Audio/Renderers/OpenAL/OpenALAudioTrack.cs
index 6e016713..690129eb 100644
--- a/Ryujinx.Audio/Renderers/OpenAL/OpenALAudioTrack.cs
+++ b/Ryujinx.Audio/Renderers/OpenAL/OpenALAudioTrack.cs
@@ -11,7 +11,6 @@ namespace Ryujinx.Audio
public int SampleRate { get; private set; }
public ALFormat Format { get; private set; }
public PlaybackState State { get; set; }
- public float Volume { get; private set; }
public int HardwareChannels { get; }
public int VirtualChannels { get; }
@@ -151,9 +150,14 @@ namespace Ryujinx.Audio
public void SetVolume(float volume)
{
- Volume = volume;
+ AL.Source(SourceId, ALSourcef.Gain, volume);
+ }
+
+ public float GetVolume()
+ {
+ AL.GetSource(SourceId, ALSourcef.Gain, out float volume);
- AL.Source(SourceId, ALSourcef.Gain, Volume);
+ return volume;
}
public void Dispose()