Commit 3115eb2e authored by Maurice Tayeb Andreas's avatar Maurice Tayeb Andreas

Renderer deaktiviert wenn ReverbTime < 0.3 s

parent 52324fd2
......@@ -263,6 +263,14 @@ namespace VA
{
return NativeAddSearchPath(_NetClient, SearchPath);
}
public void SetRenderingModuleMuted(string sModuleID, bool bMuted)
{
NativeSetRenderingModuleMuted(_NetClient, sModuleID, bMuted);
}
public bool IsRenderingModuleMuted(IntPtr pClient, string sModuleID)
{
return NativeIsRenderingModuleMuted(_NetClient, sModuleID);
}
/*
* Native imported functions from C++ unmanaged library declared private, so they can not be accessed
* directly through C# class method
......
......@@ -16,7 +16,6 @@ public class VAUListener : MonoBehaviour {
private AudioReverbZone[] reverbZones;
private float currentArtificialReverberationTime = 0f;
private float shadowReverbTime;
private VAUAuralizationMode globalAuraMode;
public delegate void ReverbTimeChangedDelegate(double reverbTime);
public event ReverbTimeChangedDelegate ReverbTimeChanged;
......@@ -41,7 +40,6 @@ public class VAUListener : MonoBehaviour {
SetListenerPositionOrientation();
_VA.SetArtificalReverbarationTime(VAAudioRenderer, 0.3f);
reverbZones = FindObjectsOfType(typeof(AudioReverbZone)) as AudioReverbZone[];
globalAuraMode = FindObjectOfType<VAUAdapter>().gameObject.GetComponent<VAUAuralizationMode>();
}
void OnEnable()
......@@ -99,11 +97,11 @@ public class VAUListener : MonoBehaviour {
if (shadowReverbTime == actReverbTime)
return;
if (actReverbTime < 0.3f)
globalAuraMode.DiffuseDecay = false;
_VA.SetRenderingModuleMuted("MyBinauralArtificialReverb", true);
else
globalAuraMode.DiffuseDecay = true;
_VA.SetRenderingModuleMuted("MyBinauralArtificialReverb", false);
shadowReverbTime = actReverbTime;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment