module
Eagle::AudioPlayback
Overview
Playback settings shared by AudioPlayer and AudioPlayer2D.
Direct including types
Defined in:
eagle/nodes/audio_player.crInstance Method Summary
-
#autoplay=(autoplay)
Start playing when the node enters the tree.
-
#autoplay?
Start playing when the node enters the tree.
-
#bus : String
The mixer bus, such as "music" or "sfx".
-
#bus=(bus : String)
The mixer bus, such as "music" or "sfx".
-
#effective_pan : Float32
The pan actually used.
-
#effective_volume : Float32
The volume actually used.
-
#emit_finished(*args) : Nil
Emitted when a non-looping sound reaches its end.
-
#finished : Eagle::Emitter()
Emitted when a non-looping sound reaches its end.
-
#loop=(loop)
Restart from the beginning when the sound ends.
-
#loop?
Restart from the beginning when the sound ends.
-
#on_finished(&block : -> Nil) : Proc(Nil)
Emitted when a non-looping sound reaches its end.
-
#pan : Float32
Stereo position from -1 to 1.
-
#pan=(pan : Float32)
Stereo position from -1 to 1.
-
#pan=(v : Number)
Sets
#panfrom any number. -
#pitch : Float32
Playback speed: 1 is normal.
-
#pitch=(pitch : Float32)
Playback speed: 1 is normal.
-
#pitch=(v : Number)
Sets
#pitchfrom any number. -
#play(sound : Sound | Nil = nil) : Voice | Nil
Plays sound, or the current
#sound. -
#playing? : Bool
True while the sound is playing.
-
#sound : Sound | Nil
The sound to play.
-
#sound=(sound : Sound | Nil)
The sound to play.
-
#stop : Nil
Stops playback.
-
#update_voice : Nil
Pushes volume, pitch and pan to the playing voice.
-
#voice : Voice | Nil
The voice currently playing, if any.
-
#volume : Float32
Volume from 0 to 1.
-
#volume=(volume : Float32)
Volume from 0 to 1.
-
#volume=(v : Number)
Sets
#volumefrom any number.
Instance Method Detail
Emitted when a non-looping sound reaches its end. Connect with on_finished { ... }.
Emitted when a non-looping sound reaches its end. Connect with on_finished { ... }.
Emitted when a non-looping sound reaches its end. Connect with on_finished { ... }.
Stereo position from -1 to 1. AudioPlayer2D computes it from position instead.