Progress on generic path update via Unity

parent 937a4938
......@@ -23,13 +23,18 @@ public class VAUAudioRendererGenericPath : VAUAudioRenderer
[Tooltip("Generic path sound receiver")]
public VAUSoundReceiver SoundReceiver;
private bool UpdatePerformed = false;
void Start ()
{
if( SoundSource && SoundReceiver )
VAUAdapter.VA.UpdateGenericPathFromFile (ID, SoundSource.ID, SoundReceiver.ID, IRFilePath);
}
void Update()
{
if (SoundSource && SoundReceiver && !UpdatePerformed) {
VAUAdapter.VA.UpdateGenericPathFromFile (ID, SoundSource.ID, SoundReceiver.ID, IRFilePath);
if( SoundSource.ID > 0 && SoundReceiver.ID > 0 )
UpdatePerformed = true;
}
}
}
......@@ -18,7 +18,13 @@ public class VAUSoundSource : MonoBehaviour
public VAUSignalSource SignalSource = null;
[Tooltip("Set an explicit renderer for this source [todo]")]
public VAUAudioRenderer Renderer = null;
public VAUAudioRenderer Renderer = null;
[Tooltip("Descriptive name")]
public string Name = "SoundReceiver";
[Tooltip("Sound power in Watts (default is 31mW)")]
public double SoundPower = 0.0031;
private VANet _VA = null;
private int _ID;
......@@ -47,6 +53,7 @@ public class VAUSoundSource : MonoBehaviour
// Add sound source
_ID = _VA.CreateSoundSource(this.name);
_VA.SetSoundSourceAuralizationMode(_ID, "all");
_VA.SetSoundSourceSoundPower (_ID, SoundPower);
}
void Start()
......
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