Skip to content
Snippets Groups Projects
Commit cb7d8fcc authored by Maurice Tayeb Andreas's avatar Maurice Tayeb Andreas
Browse files

made VAUnity deployable.

From now on audio files have to be stored in the Asset folder and in the VA folder under data/Audiofiles
parent 756170a7
No related branches found
No related tags found
No related merge requests found
using UnityEngine;
using UnityEditor;
using System;
using System.Collections;
using System.Collections.Generic;
......@@ -10,7 +9,7 @@ using VA;
public class VAUAdapter : MonoBehaviour {
private static string HostIP = "VRBOX5";
private static string HostIP = "localhost";
public static string GlobalAuralizationMode = "all";
private static int Port = 12340;
private static string DefaultHRIRPath = "$(DefaultHRIR)";
......@@ -75,8 +74,8 @@ public class VAUAdapter : MonoBehaviour {
_VA = new VANet();
Init();
DeactivateUnitySound();
if (! (_VA.AddSearchPath(Application.dataPath + "/..")))
Debug.Log("[VA] Could not add SearchPath:" + Application.dataPath + "/..");
// if (! (_VA.AddSearchPath(Application.dataPath + "/..")))
// Debug.Log("[VA] Could not add SearchPath:" + Application.dataPath + "/..");
}
void OnEnable()
......
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.IO;
using System.Collections.Generic;
using VA;
......@@ -54,7 +53,7 @@ public class VAUSoundSource : MonoBehaviour {
{
if (GetComponent<AudioSource>().clip != null)
{
SignalSource = _VA.CreateAudiofileSignalSource(AssetDatabase.GetAssetPath(GetComponent<AudioSource>().clip), this.name + "_signal");
SignalSource = _VA.CreateAudiofileSignalSource( "Audiofiles/" + GetComponent<AudioSource>().clip.name + ".wav", this.name + "_signal");
_VA.SetSoundSourceSignalSource(SoundSource, SignalSource);
Debug.Log("[VAU]" + SignalSource + " connected to SoundSource " + SoundSource);
_VA.SetAudiofileSignalSourcePlaybackAction(SignalSource, "PLAYING");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment