Adding gain and mute state controller for rendering and reproduction modules

parent 9ecef3f9
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class VAURendererController : MonoBehaviour
{
public string RendererID = "";
public bool OutputMuted = false;
public double OutputGain = 1.0;
private bool OutputMutedShadow;
private double OutputGainShadow;
void Start ()
{
VAUAdapter.VA.SetRenderingModuleMuted( RendererID, OutputMuted );
VAUAdapter.VA.SetRenderingModuleGain( RendererID, OutputGain );
OutputMutedShadow = OutputMuted;
OutputGainShadow = OutputGain;
}
void Update()
{
if( OutputMuted != OutputMutedShadow )
{
VAUAdapter.VA.SetRenderingModuleMuted( RendererID, OutputMuted );
OutputMutedShadow = OutputMuted;
}
if( OutputGain != OutputGainShadow )
{
VAUAdapter.VA.SetRenderingModuleGain( RendererID, OutputGain );
OutputGainShadow = OutputGain;
}
}
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class VAUReproductionController : MonoBehaviour
{
public string ReproductionID = "";
public bool OutputMuted = false;
public double OutputGain = 1.0;
private bool OutputMutedShadow;
private double OutputGainShadow;
void Start ()
{
VAUAdapter.VA.SetReproductionModuleMuted( ReproductionID, OutputMuted );
VAUAdapter.VA.SetReproductionModuleGain( ReproductionID, OutputGain );
OutputMutedShadow = OutputMuted;
OutputGainShadow = OutputGain;
}
void Update()
{
if( OutputMuted != OutputMutedShadow )
{
VAUAdapter.VA.SetReproductionModuleMuted( ReproductionID, OutputMuted );
OutputMutedShadow = OutputMuted;
}
if( OutputGain != OutputGainShadow )
{
VAUAdapter.VA.SetReproductionModuleGain( ReproductionID, OutputGain );
OutputGainShadow = OutputGain;
}
}
}
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