AudioStreamRandomizer

package
v0.0.0-...-80877a9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 8, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package AudioStreamRandomizer provides methods for working with AudioStreamRandomizer object instances.

Index

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 Any

type Any interface {
	gd.IsClass
	AsAudioStreamRandomizer() Instance
}

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 New

func New() Instance

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 (self Instance) AsAudioStreamRandomizer() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) GetStream

func (self Instance) GetStream(index int) [1]gdclass.AudioStream

Returns the stream at the specified index.

func (Instance) GetStreamProbabilityWeight

func (self Instance) GetStreamProbabilityWeight(index int) Float.X

Returns the probability weight associated with the stream at the given index.

func (Instance) MoveStream

func (self Instance) MoveStream(index_from int, index_to int)

Move a stream from one index to another.

func (Instance) PlaybackMode

func (Instance) RandomPitch

func (self Instance) RandomPitch() Float.X

func (Instance) RandomVolumeOffsetDb

func (self Instance) RandomVolumeOffsetDb() Float.X

func (Instance) RemoveStream

func (self Instance) RemoveStream(index int)

Remove the stream at the specified index.

func (Instance) SetPlaybackMode

func (self Instance) SetPlaybackMode(value gdclass.AudioStreamRandomizerPlaybackMode)

func (Instance) SetRandomPitch

func (self Instance) SetRandomPitch(value Float.X)

func (Instance) SetRandomVolumeOffsetDb

func (self Instance) SetRandomVolumeOffsetDb(value Float.X)

func (Instance) SetStream

func (self Instance) SetStream(index int, stream [1]gdclass.AudioStream)

Set the AudioStream at the specified index.

func (Instance) SetStreamProbabilityWeight

func (self Instance) SetStreamProbabilityWeight(index int, weight Float.X)

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 (self Instance) SetStreamsCount(value int)

func (Instance) StreamsCount

func (self Instance) StreamsCount() int

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

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
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL