Adding artificial reverb script (in development)

parent f8680e81
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class VAURendererArtificialReverb : MonoBehaviour : VAURendererController
{
public string RendererID = "";
public double RoomReverberationTime = 1.2; // s
public double RoomSurfaceArea = 220.0; // m^2
public double RoomVolume = 600.0; // m^3
private double RoomReverberationTimeShadow;
private double RoomSurfaceAreaShadow;
private double RoomVolumeShadow;
void Start ()
{
VAUAdapter.VA.SetArtificialRevberationTime( RendererID, RoomReverberationTime );
VAUAdapter.VA.SetArtificialSurfaceArea( RendererID, RoomSurfaceArea );
VAUAdapter.VA.SetArtificialRoomVolume( RendererID, RoomVolume );
RoomReverberationTimeShadow = OutputMuted;
RoomSurfaceAreaShadow = RoomSurfaceArea;
RoomVolumeShadow = RoomVolume;
}
void Update()
{
if( RoomReverberationTime != RoomReverberationTimeShadow )
{
VAUAdapter.VA.SetArtificialRevberationTime( RendererID, RoomReverberationTime );
RoomReverberationTimeShadow = RoomReverberationTime;
}
if( RoomSurfaceArea != RoomSurfaceAreaShadow )
{
VAUAdapter.VA.SetArtificialSurfaceArea( RendererID, RoomSurfaceArea );
RoomSurfaceAreaShadow = RoomSurfaceArea;
}
if( RoomVolume != RoomVolumeShadow )
{
VAUAdapter.VA.SetArtificialRoomVolume( RendererID, RoomVolume );
RoomVolumeShadow = RoomVolume;
}
}
}
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