// -------------------------------------------------------------------------------- // // Part of: Photon Voice Utilities for Unity - Copyright (C) 2018 Exit Games GmbH // // // This MonoBehaviour is a sample demo of how to use AudioSource.Factory // by implementing IAudioReader. // // developer@exitgames.com // -------------------------------------------------------------------------------- using System; using UnityEngine; namespace Photon.Voice.Unity.UtilityScripts { [RequireComponent(typeof(Recorder))] public class TestTone : MonoBehaviour { private void Start() { Recorder rec = this.gameObject.GetComponent(); rec.SourceType = Recorder.InputSourceType.Factory; rec.InputFactory = () => { return new AudioUtil.ToneAudioPusher(440, 100, 24000, 1); }; } } }