Commit cdef7bdc authored by Maurice Tayeb Andreas's avatar Maurice Tayeb Andreas

löschen der Listener und SoundSources

parent 85307ecf
......@@ -13,7 +13,7 @@ public class VAUAdapter : MonoBehaviour {
private static string HostIP = "localhost";
private static int Port = 12340;
private static string DefaultHRIRPath = "$(DefaultHRIR)";
private static string DefaultDirectivityPath = "$(DefaultDirectivity)";
private static string DefaultDirectivityPath = "$(HumanDir)";
private static int defaulthrir;
private static int defaultdirectivity;
private static VANet _VA = null;
......@@ -71,11 +71,6 @@ public class VAUAdapter : MonoBehaviour {
// Use this for initialization
void Awake()
{
//var dllDirectory = @"Assets/Plugins/VAUnity/bin";
//var dllDirectory = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
//var dllDirectory = @"C:/Users/Public/Documents/Unity Projects/Standard Assets Example Project/Assets/Plugins/VAUnity/bin"; // w
// var dllDirectory = System.Reflection.Assembly.GetExecutingAssembly().Location + @"../../Plugins/VAUnity/bin";
//Environment.SetEnvironmentVariable( "PATH", Environment.GetEnvironmentVariable("PATH") + ";" + dllDirectory );
if(_VA==null)
_VA = new VANet();
if (!_VA.IsConnected())
......
......@@ -10,16 +10,13 @@ public class VAUListener : MonoBehaviour {
public int auramode = 123;
private int Listener;
private VANet _VA = null;
private Vector3 viewvec;
private Vector3 upvec;
private Vector3 viewvec = new Vector3(0, 0, 1);
private Vector3 upvec = new Vector3(0, 1, 0);
private Quaternion q;
private Transform t;
// Use this for initialization
void Start()
{
upvec.Set(0, 1, 0);
viewvec.Set(0, 0, 1);
_VA = VAUAdapter.VA;
Listener = _VA.CreateListener(listenername, auramode, VAUAdapter.DefaultHRIR);
_VA.SetListenerHRIRDataset(Listener, VAUAdapter.DefaultHRIR);
......@@ -43,11 +40,11 @@ public class VAUListener : MonoBehaviour {
// Debug.Log(t1_ogl);
}
//void OnDestroy()
//{
// _VA.DeleteListener(Listener);
//}
void OnDestroy()
{
int i = _VA.DeleteListener(Listener);
}
}
......@@ -12,8 +12,8 @@ public class VAUSoundSource : MonoBehaviour {
public string SignalSource = "";
private VANet _VA = null;
private int SoundSource;
private Vector3 viewvec;
private Vector3 upvec;
private Vector3 viewvec = new Vector3(0, 0, 1);
private Vector3 upvec = new Vector3(0, 1, 0);
private Quaternion q;
private Transform t;
private bool islooping;
......@@ -54,10 +54,10 @@ public class VAUSoundSource : MonoBehaviour {
}
//void OnDestroy()
//{
// //_VA.DeleteSoundSource(SoundSource);
// //_VA.DeleteSignalSource(SignalSource);
//}
void OnDestroy()
{
_VA.DeleteSoundSource(SoundSource);
//_VA.DeleteSignalSource(SignalSource);
}
}
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