Enumerationmigueldeicaza.swiftgodot 0.45.0SwiftGodot
PlaybackMode
AudioStreamRandomizer.swift:13enum PlaybackMode
Cases
case randomNoRepeats
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.
case random
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.
case sequential
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.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (12) members.
Type members
Instance members
var playbackMode: AudioStreamRandomizer.PlaybackMode
Controls how this AudioStreamRandomizer picks which AudioStream to play next.
var randomPitch: Double
The intensity of random pitch variation. A value of 1 means no variation.
var randomVolumeOffsetDb: Double
The intensity of random volume variation. A value of 0 means no variation.
var streamsCount: Int32
The number of streams in the stream pool.
func addStream(index: Int32, stream: AudioStream?, weight: Double
) 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 getStream(index: Int32
) -> AudioStream? Returns the stream at the specified index.
func getStreamProbabilityWeight(index: Int32
) -> Double Returns the probability weight associated with the stream at the given index.
func moveStream(indexFrom: Int32, indexTo: Int32
) Move a stream from one index to another.
func removeStream(index: Int32
) Remove the stream at the specified index.
func setStream(index: Int32, stream: AudioStream?
) Set the AudioStream at the specified index.
func setStreamProbabilityWeight(index: Int32, weight: Double
) 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.
Citizens in SwiftGodot
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.