diff --git a/src/Audio/AudioDevice.cs b/src/Audio/AudioDevice.cs index bfc07029..c7eb03e2 100644 --- a/src/Audio/AudioDevice.cs +++ b/src/Audio/AudioDevice.cs @@ -16,7 +16,7 @@ namespace MoonWorks.Audio public float DopplerScale = 1f; public float SpeedOfSound = 343.5f; - private FAudio.FAudioVoiceSends reverbSends; + internal FAudio.FAudioVoiceSends ReverbSends; private readonly List> dynamicSoundInstances = new List>(); @@ -180,14 +180,14 @@ namespace MoonWorks.Audio /* Init reverb sends */ - reverbSends = new FAudio.FAudioVoiceSends + ReverbSends = new FAudio.FAudioVoiceSends { SendCount = 2, pSends = Marshal.AllocHGlobal( 2 * Marshal.SizeOf() ) }; - FAudio.FAudioSendDescriptor* sendDesc = (FAudio.FAudioSendDescriptor*) reverbSends.pSends; + FAudio.FAudioSendDescriptor* sendDesc = (FAudio.FAudioSendDescriptor*) ReverbSends.pSends; sendDesc[0].Flags = 0; sendDesc[0].pOutputVoice = MasteringVoice; sendDesc[1].Flags = 0; diff --git a/src/Audio/SoundInstance.cs b/src/Audio/SoundInstance.cs index c4cc9170..1a232e17 100644 --- a/src/Audio/SoundInstance.cs +++ b/src/Audio/SoundInstance.cs @@ -198,6 +198,11 @@ namespace MoonWorks.Audio Handle = handle; this.is3D = is3D; InitDSPSettings(Parent.Format.nChannels); + + FAudio.FAudioVoice_SetOutputVoices( + handle, + ref Device.ReverbSends + ); } private void InitDSPSettings(uint srcChannels)