AudioComponent

 

 

AudioComponent Class

 

The AudioComponent handles interactions with audio components.

 

Syntax

[Sansar.Script.Interface]
public class AudioComponent : Sansar.Script.InstanceInterface

 

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Members

See Also: Inherited members from Sansar.Script.InstanceInterface.

Public Fields

static readonly
ComponentType ComponentType . The AudioComponent.ComponentType of this component

Public Properties

[read-only]
ComponentId Sansar.Script.ComponentId . Retrieves the component id for this AudioComponent.
[read-only]
IsValid bool . Whether or not this interface is valid. (Inherited from Sansar.Script.InstanceInterface.)
[read-only]
Name string . This AudioComponent name, as specified in the editor.

Public Methods

  PlaySoundOnComponent (SoundResource, PlaySettings) : PlayHandle
Play sound on this component (and follow its position).
  PlayStreamOnComponent (StreamChannel, float) : PlayHandle
Play web audio stream on this component (and follow its position).
override
ToString () : string
A string representation of this object.

 

Member Details

ComponentId Property

Retrieves the component id for this AudioComponent.

Syntax

[get: Sansar.Script.Interface]
public Sansar.Script.ComponentId ComponentId { get; }

Value

The id.

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

ComponentType Field

The AudioComponent.ComponentType of this component

Syntax

public static readonly ComponentType ComponentType

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

Name Property

This AudioComponent name, as specified in the editor.

Syntax

[get: Sansar.Script.Interface]
public string Name { get; }

Value

Remarks

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

PlaySoundOnComponent Method

Play sound on this component (and follow its position).

Syntax

[Sansar.Script.Interface]
public PlayHandle PlaySoundOnComponent (SoundResource soundResource, PlaySettings playSettings)

Parameters

soundResource
The sound resource to play.
playSettings
The play parameters.

Returns

The play handle for controlling playback.

Remarks

Plays for all agents in this scene. As the component moves, this sound will follow the component's location.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

PlayStreamOnComponent Method

Play web audio stream on this component (and follow its position).

Syntax

[Sansar.Script.Interface]
public PlayHandle PlayStreamOnComponent (StreamChannel streamChannel, float loudness)

Parameters

streamChannel
Channel of the audio stream to play.
loudness
Relative loudness in dB.

Returns

The play handle for controlling playback.

Remarks

Plays for all agents in this scene. As the component moves, this stream will follow the component's location.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

ToString Method

A string representation of this object.

Syntax

[Sansar.Script.Interface]
public override string ToString ()

Returns

A string representation of this object.

Remarks

The format of this string may change between releases.

Requirements

Namespace: Sansar.Simulation
Assembly: Sansar.Simulation (in Sansar.Simulation.dll)
Assembly Versions: 1.1.0.0

 


 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.