SAudioSource
Index
Functions Index
void Play ()
void Stop ()
void Pause ()
void UnPause ()
void PlayOneShot (SResource clip, float volume)
void PlayClipAtPoint (SResource clip, SVector position, float volume=1f)
Properties Index
bool Enabled get set
bool Loop get set
float DopplerLevel get set
float Volume get set
float Pitch get set
float Time get set
int TimeSamples get set
float Length get
int Samples get
bool IsPlaying get
float PanStereo get set
float SpatialBlend get set
bool Spatialize get set
bool SpatializePostEffects get set
float ReverbZoneMix get set
bool BypassEffects get set
bool BypassListenerEffects get set
bool BypassReverbZones get set
float Spread get set
int Priority get set
bool Mute get set
float MinDistance get set
float MaxDistance get set
SResource AudioClip get set
Functions
Play
void Play ()
Starts playing the audio clip.
Stop
void Stop ()
Stops playing the audio clip.
Pause
void Pause ()
Pauses the audio clip.
UnPause
void UnPause ()
Pauses the audio clip.
PlayOneShot
void PlayOneShot (SResource clip, float volume)
Plays the audio clip just ones at a desired volume.
PlayClipAtPoint
void PlayClipAtPoint (SResource clip, SVector position, float volume=1f)
Function Description
Properties
Enabled
bool Enabled get set
Is the Audio Source component enabled?
Loop
bool Loop get set
Is looping of the sound clip enabled?
DopplerLevel
float DopplerLevel get set
The Doppler level of the Audio Source. (See: Doppler Effect)
Volume
float Volume get set
The Volume level of the Audio Source.
Pitch
float Pitch get set
The Pitch level for the Audio Source.
Time
float Time get set
Playback position in seconds.
TimeSamples
int TimeSamples get set
Playback position in PCM samples.
Length
float Length get
Return Audio Length.
Samples
int Samples get
Return Audio Samples.
IsPlaying
bool IsPlaying get
Is the sound clip playing right now?
PanStereo
float PanStereo get set
Pans the sound to the left or right. Values range from -1 to 1: 0 is the middle, -1 is full left, 1 is full right.
SpatialBlend
float SpatialBlend get set
The level of impact 3D effects make on the AudioSource. 0 - no impact (full 2D sound), 1 - maximum impact (full 3D sound).
Spatialize
bool Spatialize get set
Is spatialization enabled?
SpatializePostEffects
bool SpatializePostEffects get set
Is spatialization enabled before or after other filters are in action?
ReverbZoneMix
float ReverbZoneMix get set
The level at which the audio coming from this Audio Source will be mixed into the global reverb of the scene (accomplished with Reverb Zones).
BypassEffects
bool BypassEffects get set
When true, none of global sound effects (reverbs, filters, etc.) are applied to the audio from this Audio Source.
BypassListenerEffects
bool BypassListenerEffects get set
When true, whichever global effects are set on the Audio Listener will not be applied to the audio from this Audio Source.
BypassReverbZones
bool BypassReverbZones get set
When true, the audio from this Audio Source is not mixed into the global reverb generated through Reverb Zones.
Spread
float Spread get set
The angle of spread of the audio channels in the 3D space (only works for stereo and multichannel audio). 0 by default - all channels are concentrated at the same speaker location, making it "mono".
Priority
int Priority get set
The priority of this Audio Source: when there are more Audio Sources playing than channels available, Priority defines which channels will be discarded in favour of those with a higher priority. 0 is the highest priority, 255 - the lowest.
Mute
bool Mute get set
Is the audio muted? If True, the Volume is set to 0. If False, the Volume is restored to the original level.
MinDistance
float MinDistance get set
At which distance from the Audio Source the sound will begin ceasing? The sound will be heard at its maximum volume within this distance. (Spatial Blend should not be equal to 0 for this property to take effect.)
MaxDistance
float MaxDistance get set
At which distance from the Audio Source the sound will no longer be heard? (Spatial Blend should not be equal to 0 for this property to take effect.)
AudioClip
SResource AudioClip get set
The audio clip that is or will be played by this Audio Source.
GameObject
SGameObject GameObject get
Returns a reference to the GameObject of this component.
Last updated
Was this helpful?

