Commit 2b8adcb2 authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen

Merge branch 'develop' of https://git.rwth-aachen.de/ita/VAUnity into develop

parents b0a1c5b6 a2f21b56
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class VAUAudioRendererGenericPath : VAUAudioRenderer
{
[Tooltip("Generic path renderer channel number")]
public int NumberOfChannels = 2;
[Tooltip("Generic path renderer channel number")]
public int FilterLengthSamples = 88200;
[Tooltip("Generic path renderer sampling rate")]
public double SamplingRate = 44100;
[Tooltip("Generic path renderer default impules response file")]
public string IRFilePath = "";
[Tooltip("Generic path sound source")]
public VAUSoundSource SoundSource;
[Tooltip("Generic path sound receiver")]
public VAUSoundReceiver SoundReceiver;
private bool UpdatePerformed = false;
void Start ()
{
}
void Update()
{
if (SoundSource && SoundReceiver && !UpdatePerformed) {
VAUAdapter.VA.UpdateGenericPathFromFile (ID, SoundSource.ID, SoundReceiver.ID, IRFilePath);
if( SoundSource.ID > 0 && SoundReceiver.ID > 0 )
UpdatePerformed = true;
}
}
}
......@@ -22,8 +22,6 @@ public class VAUListener : VAUSoundReceiver {
private double ShadowHeadHeight;
private double ShadowHeadDepth;
private Quaternion q;
private Transform t;
private AudioReverbZone[] reverbZones;
private float shadowReverbTime;
......
......@@ -9,7 +9,7 @@ public class VAUSoundReceiver : MonoBehaviour {
[Tooltip("Descriptive name")]
public string Name = "SoundReceiver";
[Tooltip("Set an explicit renderer for this receiver")]
[Tooltip("Set an explicit renderer for this receiver [todo]")]
public VAUAudioRenderer Renderer = null;
[Tooltip("Connect an directivity to this receiver")]
......
......@@ -16,7 +16,15 @@ public class VAUSoundSource : MonoBehaviour
[Tooltip("Insert a custom VAUSignalSource-Script.")]
public VAUSignalSource SignalSource = null;
[Tooltip("Set an explicit renderer for this source [todo]")]
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;
......@@ -45,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