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
AssetLocationThe 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
Location
The specific sound to be played
[ProtoMember(1)]
public AssetLocation Location
Field Value
LowPassFilter
0...1
[ProtoMember(7)]
public float LowPassFilter
Field Value
Pitch
The sounds intial pitch.
[ProtoMember(6)]
public float Pitch
Field Value
Position
The position of the sound
[ProtoMember(2)]
public Vec3f Position
Field Value
Range
The sounds initial range (default is 32)
[ProtoMember(11)]
public float Range
Field Value
ReferenceDistance
The range in which the sound does not attenuate at all
[ProtoMember(9)]
public float ReferenceDistance
Field Value
RelativePosition
If true then Position is added relative to the players current position
[ProtoMember(3)]
public bool RelativePosition
Field Value
ReverbDecayTime
0...99f
[ProtoMember(8)]
public float ReverbDecayTime
Field Value
ShouldLoop
If the sound should start again when finished
[ProtoMember(4)]
public bool ShouldLoop
Field Value
SoundType
Determines whether to apply the music or sound volumne level to the Volume
[ProtoMember(12)]
public EnumSoundType SoundType
Field Value
Properties
Volume
The sounds initial volumne (0f - 1f)
public float Volume { get; set; }