From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- Runtime/Audio/AudioParameters.h | 48 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Runtime/Audio/AudioParameters.h (limited to 'Runtime/Audio/AudioParameters.h') diff --git a/Runtime/Audio/AudioParameters.h b/Runtime/Audio/AudioParameters.h new file mode 100644 index 0000000..e4b49be --- /dev/null +++ b/Runtime/Audio/AudioParameters.h @@ -0,0 +1,48 @@ +#ifndef ___AUDIOPARAMETERS_H__ +#define ___AUDIOPARAMETERS_H__ + +#include "Runtime/Math/Vector3.h" +#include "Runtime/Audio/correct_fmod_includer.h" +#include "Runtime/Math/AnimationCurve.h" + +enum RolloffMode { kRolloffLogarithmic=0, kRolloffLinear, kRolloffCustom }; + +struct AudioParameters +{ + // Animated props + AnimationCurve panLevelCustomCurve; + AnimationCurve spreadCustomCurve; + AnimationCurve rolloffCustomCurve; + + float insideConeAngle; + float outsideConeAngle; + float outsideConeVolume; + + int priority; + float dopplerLevel; + float minDistance; + float maxDistance; + float pan; + + float pitch; + float volume; + + // rolloff + RolloffMode rolloffMode; ///< enum { kRolloffLogarithmic=0, kRolloffLinear, kRolloffCustom } + + bool loop; // <-- this will be replaced by a loop node + bool mute; + +#if UNITY_WII + bool starving; // For streaming sounds, when data isn't coming due disk eject +#endif + + bool bypassEffects; // Bypass/ignore any applied effects from AudioSource + bool bypassListenerEffects; // Bypass/ignore any applied effects from AudioListener + bool bypassReverbZones; // Bypass/ignore any applied effects from reverb zones + bool ignoreListenerPause; +}; + + + +#endif // ___AUDIOPARAMETERS_H__ -- cgit v1.1-26-g67d0