Enumerationmigueldeicaza.swiftgodot 0.45.0SwiftGodot
MixTarget
AudioStreamPlayer.swift:21enum MixTarget
Cases
case stereo
The audio will be played only on the first channel.
case surround
The audio will be played on all surround channels.
case center
The audio will be played on the second channel, which is usually the center.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (17) members.
Type members
Instance members
var autoplay: Bool
If
true
, audio plays when added to scene tree.var bus: StringName
Bus on which this audio is playing.
var finished: SimpleSignal
Emitted when the audio stops playing.
var maxPolyphony: Int32
The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds.
var mixTarget: AudioStreamPlayer.MixTarget
If the audio configuration has more than two speakers, this sets the target channels. See
MixTarget
constants.var pitchScale: Double
The pitch and the tempo of the audio, as a multiplier of the audio sample’s sample rate.
var stream: AudioStream?
The
AudioStream
object to be played.var streamPaused: Bool
If
true
, the playback is paused. You can resume it by settingstreamPaused
tofalse
.var volumeDb: Double
Volume of sound, in dB.
func getPlaybackPosition(
) -> Double Returns the position in the
AudioStream
in seconds.func getStreamPlayback(
) -> AudioStreamPlayback? Returns the
AudioStreamPlayback
object associated with thisAudioStreamPlayer
.func hasStreamPlayback(
) -> Bool Returns whether the
AudioStreamPlayer
can return theAudioStreamPlayback
object or not.func isPlaying(
) -> Bool func play(fromPosition: Double
) Plays the audio from the given
fromPosition
, in seconds.func seek(toPosition: Double
) Sets the position from which audio will be played, in seconds.
func stop(
) Stops the audio.
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.