Class SoundParams
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
The sound paramaters used for loading sounds on the client side
public class SoundParams
- Inheritance
-
SoundParams
- Inherited Members
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
public bool DisposeOnFinish
Field Value
Location
The specific sound to be played
public AssetLocation Location
Field Value
Pitch
The sounds intial pitch.
public float Pitch
Field Value
Position
The position of the sound
public Vec3f Position
Field Value
Range
The sounds initial range (default is 32)
public float Range
Field Value
ReferenceDistance
The range in which the sound does not attenuate at all
public float ReferenceDistance
Field Value
RelativePosition
If true then Position is added relative to the players current position
public bool RelativePosition
Field Value
ShouldLoop
If the sound should start again when finished
public bool ShouldLoop
Field Value
SoundType
Determines whether to apply the music or sound volumne level to the Volume
public EnumSoundType SoundType
Field Value
Properties
Volume
The sounds initial volumne (0f - 1f)
public float Volume { get; set; }