Documentation
¶
Overview ¶
Package AudioStreamRandomizer provides methods for working with AudioStreamRandomizer object instances.
Index ¶
- type Advanced
- type Any
- type Expanded
- type Extension
- type ID
- type Instance
- func (self Instance) AddStream(index int, stream AudioStream.Instance)
- 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) AudioStream.Instance
- func (self Instance) GetStreamProbabilityWeight(index int) Float.X
- func (self Instance) ID() ID
- func (self Instance) MoveStream(index_from int, index_to int)
- func (self Instance) PlaybackMode() PlaybackMode
- func (self Instance) RandomPitch() Float.X
- func (self Instance) RandomVolumeOffsetDb() Float.X
- func (self Instance) RemoveStream(index int)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetPlaybackMode(value PlaybackMode)
- func (self Instance) SetRandomPitch(value Float.X)
- func (self Instance) SetRandomVolumeOffsetDb(value Float.X)
- func (self Instance) SetStream(index int, stream AudioStream.Instance)
- func (self Instance) SetStreamProbabilityWeight(index int, weight Float.X)
- func (self Instance) SetStreamsCount(value int)
- func (self Instance) StreamsCount() int
- 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 Expanded ¶
type Expanded [1]gdclass.AudioStreamRandomizer
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsAudioStream ¶
func (self *Extension[T]) AsAudioStream() AudioStream.Instance
func (*Extension[T]) AsAudioStreamRandomizer ¶
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
func (*Extension[T]) AsResource ¶
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
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 AudioStream.Instance)
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) AudioStream.Instance
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() PlaybackMode
func (Instance) RandomPitch ¶
func (Instance) RandomVolumeOffsetDb ¶
func (Instance) RemoveStream ¶
Remove the stream at the specified index.
func (Instance) SetPlaybackMode ¶
func (self Instance) SetPlaybackMode(value PlaybackMode)
func (Instance) SetRandomPitch ¶
func (Instance) SetRandomVolumeOffsetDb ¶
func (Instance) SetStream ¶
func (self Instance) SetStream(index int, stream AudioStream.Instance)
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 ¶
type PlaybackMode ¶
type PlaybackMode int //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 )