Commit 52324fd2 authored by Maurice Tayeb Andreas's avatar Maurice Tayeb Andreas

kleine Änderung VAUListener

schaltet DD aus wenn Reverb < 0.3
parent bd1fb108
......@@ -10,7 +10,7 @@ using VA;
public class VAUAdapter : MonoBehaviour {
private static string HostIP = "localhost";
private static string HostIP = "VRBOX6";
public static string GlobalAuralizationMode = "all";
private static int Port = 12340;
private static string DefaultHRIRPath = "$(DefaultHRIR)";
......
......@@ -16,6 +16,7 @@ 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;
......@@ -40,6 +41,7 @@ public class VAUListener : MonoBehaviour {
SetListenerPositionOrientation();
_VA.SetArtificalReverbarationTime(VAAudioRenderer, 0.3f);
reverbZones = FindObjectsOfType(typeof(AudioReverbZone)) as AudioReverbZone[];
globalAuraMode = FindObjectOfType<VAUAdapter>().gameObject.GetComponent<VAUAuralizationMode>();
}
void OnEnable()
......@@ -97,6 +99,12 @@ public class VAUListener : MonoBehaviour {
if (shadowReverbTime == actReverbTime)
return;
if (actReverbTime < 0.3f)
globalAuraMode.DiffuseDecay = false;
else
globalAuraMode.DiffuseDecay = true;
shadowReverbTime = actReverbTime;
if (i > 0)
......
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