Documentation
¶
Overview ¶
Package AudioStreamRandomizer provides methods for working with AudioStreamRandomizer object instances.
Index ¶
- type Advanced
- type Any
- type Instance
- func (self Instance) AddStream(index int, stream [1]gdclass.AudioStream)
- func (self Instance) AsAudioStream() AudioStream.Instance
- func (self Instance) AsAudioStreamRandomizer() Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) GetStream(index int) [1]gdclass.AudioStream
- func (self Instance) GetStreamProbabilityWeight(index int) Float.X
- func (self Instance) MoveStream(index_from int, index_to int)
- func (self Instance) PlaybackMode() gdclass.AudioStreamRandomizerPlaybackMode
- func (self Instance) RandomPitch() Float.X
- func (self Instance) RandomVolumeOffsetDb() Float.X
- func (self Instance) RemoveStream(index int)
- func (self Instance) SetPlaybackMode(value gdclass.AudioStreamRandomizerPlaybackMode)
- func (self Instance) SetRandomPitch(value Float.X)
- func (self Instance) SetRandomVolumeOffsetDb(value Float.X)
- func (self Instance) SetStream(index int, stream [1]gdclass.AudioStream)
- func (self Instance) SetStreamProbabilityWeight(index int, weight Float.X)
- func (self Instance) SetStreamsCount(value int)
- func (self Instance) StreamsCount() int
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
- type PlaybackMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Instance ¶
type Instance [1]gdclass.AudioStreamRandomizer
Picks a random AudioStream from the pool, depending on the playback mode, and applies random pitch shifting and volume shifting during playback.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AddStream ¶
func (self Instance) AddStream(index int, stream [1]gdclass.AudioStream)
Insert a stream at the specified index. If the index is less than zero, the insertion occurs at the end of the underlying pool.
func (Instance) AsAudioStream ¶
func (self Instance) AsAudioStream() AudioStream.Instance
func (Instance) AsAudioStreamRandomizer ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) GetStream ¶
func (self Instance) GetStream(index int) [1]gdclass.AudioStream
Returns the stream at the specified index.
func (Instance) GetStreamProbabilityWeight ¶
Returns the probability weight associated with the stream at the given index.
func (Instance) MoveStream ¶
Move a stream from one index to another.
func (Instance) PlaybackMode ¶
func (self Instance) PlaybackMode() gdclass.AudioStreamRandomizerPlaybackMode
func (Instance) RandomPitch ¶
func (Instance) RandomVolumeOffsetDb ¶
func (Instance) RemoveStream ¶
Remove the stream at the specified index.
func (Instance) SetPlaybackMode ¶
func (self Instance) SetPlaybackMode(value gdclass.AudioStreamRandomizerPlaybackMode)
func (Instance) SetRandomPitch ¶
func (Instance) SetRandomVolumeOffsetDb ¶
func (Instance) SetStream ¶
func (self Instance) SetStream(index int, stream [1]gdclass.AudioStream)
Set the AudioStream at the specified index.
func (Instance) SetStreamProbabilityWeight ¶
Set the probability weight of the stream at the specified index. The higher this value, the more likely that the randomizer will choose this stream during random playback modes.
func (Instance) SetStreamsCount ¶
func (Instance) StreamsCount ¶
func (*Instance) UnsafePointer ¶
type PlaybackMode ¶
type PlaybackMode = gdclass.AudioStreamRandomizerPlaybackMode //gd:AudioStreamRandomizer.PlaybackMode
const ( /*Pick a stream at random according to the probability weights chosen for each stream, but avoid playing the same stream twice in a row whenever possible. If only 1 sound is present in the pool, the same sound will always play, effectively allowing repeats to occur.*/ PlaybackRandomNoRepeats PlaybackMode = 0 /*Pick a stream at random according to the probability weights chosen for each stream. If only 1 sound is present in the pool, the same sound will always play.*/ PlaybackRandom PlaybackMode = 1 /*Play streams in the order they appear in the stream pool. If only 1 sound is present in the pool, the same sound will always play.*/ PlaybackSequential PlaybackMode = 2 )