Table of Contents

Class SoundParams

Namespace
Vintagestory.API.Client
Assembly
VintagestoryAPI.dll

The sound paramaters used for loading sounds on the client side

[ProtoContract]
public class SoundParams
Inheritance
SoundParams
Inherited Members
Extension Methods

Constructors

SoundParams()

Empty Constructor.

public SoundParams()

SoundParams(AssetLocation)

Constructs the sound based off the asset location.

public SoundParams(AssetLocation location)

Parameters

location AssetLocation

The asset location of the track.

Fields

DisposeOnFinish

Probably want to set this to false on looping sounds. But remember to dispose it yourself when you no longer need it

[ProtoMember(5)]
public bool DisposeOnFinish

Field Value

bool

Location

The specific sound to be played

[ProtoMember(1)]
public AssetLocation Location

Field Value

AssetLocation

LowPassFilter

0...1

[ProtoMember(7)]
public float LowPassFilter

Field Value

float

Pitch

The sounds intial pitch.

[ProtoMember(6)]
public float Pitch

Field Value

float

Position

The position of the sound

[ProtoMember(2)]
public Vec3f Position

Field Value

Vec3f

Range

The sounds initial range (default is 32)

[ProtoMember(11)]
public float Range

Field Value

float

ReferenceDistance

The range in which the sound does not attenuate at all

[ProtoMember(9)]
public float ReferenceDistance

Field Value

float

RelativePosition

If true then Position is added relative to the players current position

[ProtoMember(3)]
public bool RelativePosition

Field Value

bool

ReverbDecayTime

0...99f

[ProtoMember(8)]
public float ReverbDecayTime

Field Value

float

ShouldLoop

If the sound should start again when finished

[ProtoMember(4)]
public bool ShouldLoop

Field Value

bool

SoundType

Determines whether to apply the music or sound volumne level to the Volume

[ProtoMember(12)]
public EnumSoundType SoundType

Field Value

EnumSoundType

Properties

Volume

The sounds initial volumne (0f - 1f)

public float Volume { get; set; }

Property Value

float