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 ...@@ -263,6 +263,14 @@ namespace VA
{ {
return NativeAddSearchPath(_NetClient, SearchPath); 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 * Native imported functions from C++ unmanaged library declared private, so they can not be accessed
* directly through C# class method * directly through C# class method
......
...@@ -16,7 +16,6 @@ public class VAUListener : MonoBehaviour { ...@@ -16,7 +16,6 @@ public class VAUListener : MonoBehaviour {
private AudioReverbZone[] reverbZones; private AudioReverbZone[] reverbZones;
private float currentArtificialReverberationTime = 0f; private float currentArtificialReverberationTime = 0f;
private float shadowReverbTime; private float shadowReverbTime;
private VAUAuralizationMode globalAuraMode;
public delegate void ReverbTimeChangedDelegate(double reverbTime); public delegate void ReverbTimeChangedDelegate(double reverbTime);
public event ReverbTimeChangedDelegate ReverbTimeChanged; public event ReverbTimeChangedDelegate ReverbTimeChanged;
...@@ -41,7 +40,6 @@ public class VAUListener : MonoBehaviour { ...@@ -41,7 +40,6 @@ public class VAUListener : MonoBehaviour {
SetListenerPositionOrientation(); SetListenerPositionOrientation();
_VA.SetArtificalReverbarationTime(VAAudioRenderer, 0.3f); _VA.SetArtificalReverbarationTime(VAAudioRenderer, 0.3f);
reverbZones = FindObjectsOfType(typeof(AudioReverbZone)) as AudioReverbZone[]; reverbZones = FindObjectsOfType(typeof(AudioReverbZone)) as AudioReverbZone[];
globalAuraMode = FindObjectOfType<VAUAdapter>().gameObject.GetComponent<VAUAuralizationMode>();
} }
void OnEnable() void OnEnable()
...@@ -99,11 +97,11 @@ public class VAUListener : MonoBehaviour { ...@@ -99,11 +97,11 @@ public class VAUListener : MonoBehaviour {
if (shadowReverbTime == actReverbTime) if (shadowReverbTime == actReverbTime)
return; return;
if (actReverbTime < 0.3f) if (actReverbTime < 0.3f)
globalAuraMode.DiffuseDecay = false; _VA.SetRenderingModuleMuted("MyBinauralArtificialReverb", true);
else else
globalAuraMode.DiffuseDecay = true; _VA.SetRenderingModuleMuted("MyBinauralArtificialReverb", false);
shadowReverbTime = actReverbTime; 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