AudioStream
Base class for audio streams.
AudioStream.swift:11class AudioStream
Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via AudioStreamWAV
) and Ogg (via AudioStreamOggVorbis
) file formats.
Superclasses
class Resource
Base class for serializable objects.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
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 Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Type members
Instance members
func getLength(
) -> Double Returns the length of the audio stream in seconds.
func instantiatePlayback(
) -> AudioStreamPlayback? Returns an AudioStreamPlayback. Useful for when you want to extend
_instantiatePlayback
but callinstantiatePlayback
from an internally held AudioStream subresource. An example of this can be found in the source files forAudioStreamRandomPitch::instantiate_playback
.func isMonophonic(
) -> Bool Returns true if this audio stream only supports monophonic playback, or false if the audio stream supports polyphony.
Show implementation details (6)
Hide implementation details
Subclasses
class AudioStreamGenerator
An audio stream with utilities for procedural sound generation.
class AudioStreamMP3
MP3 audio stream driver.
class AudioStreamMicrophone
Plays real-time audio input data.
class AudioStreamOggVorbis
A class representing an Ogg Vorbis audio stream.
class AudioStreamPolyphonic
AudioStream that lets the user play custom streams at any time from code, simultaneously using a single player.
class AudioStreamRandomizer
Wraps a pool of audio streams with pitch and volume shifting.
class AudioStreamWAV
Stores audio data loaded from WAV files.