PlayHandle
PlayHandle Class
The PlayHandle represents audio play handles.
Syntax
Remarks
Requirements
Namespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Members
Member Details
Dispose Method
Releases resources held by this instance.
Syntax[Sansar.Script.Interface] public void Dispose ()
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Finalize Method
Syntax
RemarksEnsures that this instance has been Disposed.
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
GetLoudness Method
Retrieves the loudness for this PlayHandle.
Syntax[Sansar.Script.Interface] public float GetLoudness ()
Returns
The loudness (in dB).
RemarksThis synchronous method returns the broadcasted loudness. It does not wait to hear back from clients.
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
GetPitchShift Method
Retrieves the relative pitch for this PlayHandle.
Syntax[Sansar.Script.Interface] public float GetPitchShift ()
Returns
The relative pitch.
RemarksThis synchronous method returns the broadcasted pitch. It does not wait to hear back from clients.
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
GetRemainingSeconds Method
Returns the number of seconds remaining.
Syntax[Sansar.Script.Interface] public float GetRemainingSeconds ()
Returns
The number of seconds remaining. (0 if done playing, -1 if looped)
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
GetStatus Method
Returns the current PlayStatus.
Syntax[Sansar.Script.Interface] public PlayStatus GetStatus ()
Returns
The current PlayStatus.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
IsPlaying Method
Returns whether the sound is currently playing.
Syntax[Sansar.Script.Interface] public bool IsPlaying ()
Returns
true if currently playing
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
OnFinished Method
Triggers action when this sound is finished playing. Doesn't trigger if stopped or looping.
Syntax[Sansar.Script.Interface] public void OnFinished (Action handler)
Parameters
handler
Action to be called when the sound finishes playing.
Remarks
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetLoudness Method
Sets the loudness for this PlayHandle.
Syntax[Sansar.Script.Interface] public void SetLoudness (float loudness)
Parameters
loudness
The loudness (in dB).
Returns
The return value is an internal event id.
RemarksThis asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetLoudness Method
Sets the loudness for this PlayHandle.
SyntaxParameters
loudness
The loudness (in dB).
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
RemarksThis asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetLoudness Method
Sets the loudness for this PlayHandle.
SyntaxParameters
loudness
The loudness (in dB).
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
RemarksThis asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetPitchShift Method
Sets the relative pitch for this PlayHandle.
Syntax[Sansar.Script.Interface] public void SetPitchShift (float pitch)
Parameters
pitch
The relative pitch in semitones. (default = 0)
Returns
The return value is an internal event id.
RemarksThis asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetPitchShift Method
Sets the relative pitch for this PlayHandle.
SyntaxParameters
pitch
The relative pitch in semitones. (default = 0)
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
RemarksThis asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
SetPitchShift Method
Sets the relative pitch for this PlayHandle.
SyntaxParameters
pitch
The relative pitch in semitones. (default = 0)
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
RemarksThis asynchronous method queues the write then returns. To block until the write has occurred, pass this method to Sansar.Script.ScriptBase.WaitFor while in a coroutine.
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Stop Method
Stops the sound on this PlayHandle.
Syntax[Sansar.Script.Interface] public void Stop ()
Returns
The return value is an internal event id.
RemarksThis asynchronous method queues the write then returns.
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Stop Method
Stops the sound on this PlayHandle.
SyntaxParameters
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
RemarksThis asynchronous method queues the write then returns.
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Stop Method
Stops the sound on this PlayHandle.
SyntaxParameters
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
RemarksThis asynchronous method queues the write then returns.
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Stop Method
Stops the sound on this PlayHandle.
Syntax[Sansar.Script.Interface] public void Stop (bool fadeout)
Parameters
fadeout
Will fade out if true.
Returns
The return value is an internal event id.
RemarksThis asynchronous method queues the write then returns.
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Stop Method
Stops the sound on this PlayHandle.
SyntaxParameters
fadeout
Will fade out if true.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
RemarksThis asynchronous method queues the write then returns.
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Stop Method
Stops the sound on this PlayHandle.
SyntaxParameters
fadeout
Will fade out if true.
handler
Handler to be called when the event completes.
Returns
The return value is an internal event id.
RemarksThis asynchronous method queues the write then returns.
RequirementsNamespace: Sansar.Simulation Assembly: Sansar.Simulation (in Sansar.Simulation.dll) Assembly Versions: 1.1.0.0
Last updated