Class Sound
Represents a sound played for the player
Assembly: SlipeClient.dll
Syntax
[DefaultElementClass(ElementType.Sound)]
public class Sound : Element
Constructors
|
Improve this Doc
View Source
Create an extra GTA radio station sound
Declaration
public Sound(ExtraStations station, int trackId, bool looped = false)
Parameters
|
Improve this Doc
View Source
Sound(RadioStation, Int32, Boolean)
Create a GTA radio station sound
Declaration
public Sound(RadioStation station, int trackId, bool looped = false)
Parameters
|
Improve this Doc
View Source
Sound(SoundContainer, Int32, Int32, Boolean)
Declaration
public Sound(SoundContainer container, int bankId, int soundId, bool looped = false)
Parameters
|
Improve this Doc
View Source
Sound(String, Boolean, Boolean)
Declaration
public Sound(string pathOrUrl, bool looped = false, bool throttled = true)
Parameters
Properties
|
Improve this Doc
View Source
Bpm
Gets the beats per minute of this sound element.
Declaration
Property Value
|
Improve this Doc
View Source
BufferLength
Gets the buffer playback length of the sound. Works only with streams.
Declaration
public float BufferLength { get; }
Property Value
|
Improve this Doc
View Source
Effects
Used to enable or disable specific sound effects.
Declaration
public SoundEffects Effects { get; }
Property Value
|
Improve this Doc
View Source
Length
Declaration
public float Length { get; }
Property Value
|
Improve this Doc
View Source
LevelData
Get the left/right level from this sound
Declaration
public Tuple<int, int> LevelData { get; }
Property Value
|
Improve this Doc
View Source
Used to get the meta tags attached to this sound. These provide information about the sound, for instance the title or the artist.
Declaration
public SoundMeta MetaTags { get; }
Property Value
|
Improve this Doc
View Source
Pan
Get and set the pan level of this sound element. (-1.0 (left) to 1.0 (right))
Declaration
public float Pan { get; set; }
Property Value
|
Improve this Doc
View Source
Paused
Get and set if the sound is paused
Declaration
public bool Paused { get; set; }
Property Value
|
Improve this Doc
View Source
Properties
Get the properties of this sound
Declaration
public SoundProperties Properties { get; }
Property Value
|
Improve this Doc
View Source
Speed
Get and set the speed of this sound
Declaration
public float Speed { get; set; }
Property Value
|
Improve this Doc
View Source
TrackPosition
Get and set the position in seconds on the sound track
Declaration
public float TrackPosition { get; set; }
Property Value
|
Improve this Doc
View Source
Volume
Get and set the volume. Range is from 0.0 to 1.0. This can go above 1.0 for amplification.
Declaration
public float Volume { get; set; }
Property Value
Methods
|
Improve this Doc
View Source
Destroy()
Stop and destroy this sound
Declaration
public override bool Destroy()
Returns
Overrides
|
Improve this Doc
View Source
GetFftData(Int32, Int32)
This function gets the fast fourier transform data for an audio stream which is an array of floats representing the current audio frame.
Declaration
public float[] GetFftData(int iSamples = 512, int iBands = 0)
Parameters
Returns
|
Improve this Doc
View Source
GetSfxStatus(SoundContainer)
Check if a soundcontainer is available on this client
Declaration
public static bool GetSfxStatus(SoundContainer container)
Parameters
Returns
Events
|
Improve this Doc
View Source
OnBeat
Declaration
public event Sound.OnBeatHandler OnBeat
Event Type
|
Improve this Doc
View Source
OnDownloadFinished
Declaration
public event Sound.OnDownloadFinishedHandler OnDownloadFinished
Event Type
|
Improve this Doc
View Source
Declaration
public event Sound.OnMetaChangedHandler OnMetaChanged
Event Type
|
Improve this Doc
View Source
OnStart
Declaration
public event Sound.OnStartHandler OnStart
Event Type
|
Improve this Doc
View Source
OnStop
Declaration
public event Sound.OnStopHandler OnStop
Event Type
|
Improve this Doc
View Source
OnStream
Declaration
public event Sound.OnStreamHandler OnStream
Event Type