add AudioDevice.MasteringVolume property

moar-validation
cosmonaut 2022-10-20 15:00:25 -07:00
parent 66c6ceec04
commit ea86212199
1 changed files with 11 additions and 5 deletions

View File

@ -16,6 +16,17 @@ namespace MoonWorks.Audio
public float DopplerScale = 1f;
public float SpeedOfSound = 343.5f;
private float masteringVolume = 1f;
public float MasteringVolume
{
get => masteringVolume;
set
{
masteringVolume = value;
FAudio.FAudioVoice_SetVolume(MasteringVoice, masteringVolume, 0);
}
}
internal FAudio.FAudioVoiceSends ReverbSends;
private readonly List<WeakReference<AudioResource>> resources = new List<WeakReference<AudioResource>>();
@ -197,11 +208,6 @@ namespace MoonWorks.Audio
sendDesc[1].pOutputVoice = ReverbVoice;
}
public void SetMasteringVolume(float volume)
{
FAudio.FAudioVoice_SetVolume(MasteringVoice, volume, 0);
}
internal void Update()
{
for (var i = streamingSounds.Count - 1; i >= 0; i--)