PlaySettings

PlaySettings Struct

The PlaySettings class contains settings for playing sounds.

Syntax

[Sansar.Script.Interface]
public struct PlaySettings

Remarks

Requirements

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

Members

See Also: Inherited members from ValueType.

Public Constructors

  Full constructor.

Public Fields

  DontSync bool . false = we adjust the offset per Agent so that the sound is synchronized to everyone. This means late-joining Agents will hear sound at a greater offset. true = turn this off, let everyone hear sound from start / your offset
static readonly
Looped PlaySettings . The default play parameters for looped sounds.
  Looping bool . false = play once, true = sound will loop.
  Loudness float . Loudness in dB.
  Offset float . Play from time offset (in seconds). Use DontSync if you want everyone to hear the sound from this offset regardless of when they join.
  PitchShift float . Relative pitch.
static readonly
PlayOnce PlaySettings . The default play parameters for sounds that play once.

Member Details

PlaySettings Constructor

Full constructor.

Syntax

[Sansar.Script.Interface]
public PlaySettings (bool looping, float loudness, float pitchShift, float offset, bool dontSync)

Parameters

looping
false = play once, true = sound will loop
loudness
Loudness in dB.
pitchShift
Relative pitch.
offset
Play from time offset (in seconds).
dontSync
false = we adjust the offset per Agent so that the sound is synchronized to everyone.

Remarks

 

Requirements

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

DontSync Field

false = we adjust the offset per Agent so that the sound is synchronized to everyone. This means late-joining Agents will hear sound at a greater offset. true = turn this off, let everyone hear sound from start / your offset

Syntax

public bool DontSync

Remarks

The default value is false.

Requirements

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

Looped Field

The default play parameters for looped sounds.

Syntax

[Sansar.Script.Interface]
public static readonly PlaySettings Looped

Remarks

 

Requirements

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

Looping Field

false = play once, true = sound will loop.

Syntax

public bool Looping

Remarks

The default value is false.

Requirements

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

Loudness Field

Loudness in dB.

Syntax

public float Loudness

Remarks

Default is 0.

Requirements

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

Offset Field

Play from time offset (in seconds). Use DontSync if you want everyone to hear the sound from this offset regardless of when they join.

Syntax

public float Offset

Remarks

The default is 0.

Requirements

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

PitchShift Field

Relative pitch.

Syntax

public float PitchShift

Remarks

The default is 0.

Requirements

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

PlayOnce Field

The default play parameters for sounds that play once.

Syntax

[Sansar.Script.Interface]
public static readonly PlaySettings PlayOnce

Remarks

 

Requirements

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


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

0 Comments

Article is closed for comments.