Public Member Functions

 SoundFX ()
 
AudioClip GetClip ()
 
AudioMixerGroup GetMixerGroup (AudioMixerGroup defaultMixerGroup)
 
bool ReachedGroupPlayLimit ()
 
float GetClipLength (int idx)
 
float GetPitch ()
 
int PlaySound (float delaySecs=0.0f)
 
int PlaySoundAt (Vector3 pos, float delaySecs=0.0f, float volumeOverride=1.0f, float pitchMultiplier=1.0f)
 
void SetOnFinished (System.Action onFinished)
 
void SetOnFinished (System.Action< object > onFinished, object obj)
 
bool StopSound ()
 
void AttachToParent (Transform parent)
 
void DetachFromParent ()
 

Public Attributes

string name = string.Empty
 
SoundFXNext playback = SoundFXNext.Random
 
float volume = 1.0f
 
Vector2 pitchVariance = Vector2.one
 
Vector2 falloffDistance = new Vector2( 1.0f, 25.0f )
 
AudioRolloffMode falloffCurve = AudioRolloffMode.Linear
 
AnimationCurve volumeFalloffCurve = new AnimationCurve( new Keyframe[2] { new Keyframe( 0f, 1.0f ), new Keyframe( 1f, 1f ) } )
 
AnimationCurve reverbZoneMix = new AnimationCurve( new Keyframe[2] { new Keyframe( 0f, 1.0f ), new Keyframe( 1f, 1f ) } )
 
float spread = 0.0f
 
float pctChanceToPlay = 1.0f
 
SoundPriority priority = SoundPriority.Default
 
Vector2 delay = Vector2.zero
 
bool looping = false
 
OSPProps ospProps = new OSPProps()
 
AudioClip [] soundClips = new AudioClip[1]
 
bool visibilityToggle = false
 

Properties

int Length [get]
 
bool IsValid [get]
 
SoundGroup Group [get, set]
 
float MaxFalloffDistSquared [get]
 
float GroupVolumeOverride [get]
 

Constructor & Destructor Documentation

◆ SoundFX()

OVR.SoundFX.SoundFX ( )

Member Function Documentation

◆ AttachToParent()

void OVR.SoundFX.AttachToParent ( Transform  parent)

◆ DetachFromParent()

void OVR.SoundFX.DetachFromParent ( )

◆ GetClip()

AudioClip OVR.SoundFX.GetClip ( )

◆ GetClipLength()

float OVR.SoundFX.GetClipLength ( int  idx)

◆ GetMixerGroup()

AudioMixerGroup OVR.SoundFX.GetMixerGroup ( AudioMixerGroup  defaultMixerGroup)

◆ GetPitch()

float OVR.SoundFX.GetPitch ( )

◆ PlaySound()

int OVR.SoundFX.PlaySound ( float  delaySecs = 0.0f)

◆ PlaySoundAt()

int OVR.SoundFX.PlaySoundAt ( Vector3  pos,
float  delaySecs = 0.0f,
float  volumeOverride = 1.0f,
float  pitchMultiplier = 1.0f 
)

◆ ReachedGroupPlayLimit()

bool OVR.SoundFX.ReachedGroupPlayLimit ( )

◆ SetOnFinished() [1/2]

void OVR.SoundFX.SetOnFinished ( System.Action  onFinished)

◆ SetOnFinished() [2/2]

void OVR.SoundFX.SetOnFinished ( System.Action< object >  onFinished,
object  obj 
)

◆ StopSound()

bool OVR.SoundFX.StopSound ( )

Member Data Documentation

◆ delay

Vector2 OVR.SoundFX.delay = Vector2.zero

◆ falloffCurve

AudioRolloffMode OVR.SoundFX.falloffCurve = AudioRolloffMode.Linear

◆ falloffDistance

Vector2 OVR.SoundFX.falloffDistance = new Vector2( 1.0f, 25.0f )

◆ looping

bool OVR.SoundFX.looping = false

◆ name

string OVR.SoundFX.name = string.Empty

◆ ospProps

OSPProps OVR.SoundFX.ospProps = new OSPProps()

◆ pctChanceToPlay

float OVR.SoundFX.pctChanceToPlay = 1.0f

◆ pitchVariance

Vector2 OVR.SoundFX.pitchVariance = Vector2.one

◆ playback

SoundFXNext OVR.SoundFX.playback = SoundFXNext.Random

◆ priority

SoundPriority OVR.SoundFX.priority = SoundPriority.Default

◆ reverbZoneMix

AnimationCurve OVR.SoundFX.reverbZoneMix = new AnimationCurve( new Keyframe[2] { new Keyframe( 0f, 1.0f ), new Keyframe( 1f, 1f ) } )

◆ soundClips

AudioClip [] OVR.SoundFX.soundClips = new AudioClip[1]

◆ spread

float OVR.SoundFX.spread = 0.0f

◆ visibilityToggle

bool OVR.SoundFX.visibilityToggle = false

◆ volume

float OVR.SoundFX.volume = 1.0f

◆ volumeFalloffCurve

AnimationCurve OVR.SoundFX.volumeFalloffCurve = new AnimationCurve( new Keyframe[2] { new Keyframe( 0f, 1.0f ), new Keyframe( 1f, 1f ) } )

Property Documentation

◆ Group

SoundGroup OVR.SoundFX.Group
getset

◆ GroupVolumeOverride

float OVR.SoundFX.GroupVolumeOverride
get

◆ IsValid

bool OVR.SoundFX.IsValid
get

◆ Length

int OVR.SoundFX.Length
get

◆ MaxFalloffDistSquared

float OVR.SoundFX.MaxFalloffDistSquared
get

The documentation for this class was generated from the following file: