![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Ditoga |
My player uses custom state machines, when enter on running state it execute sfxRun.Play() and when exit the state, execute sfxRun.Stop()
sometimes when you enter the state for a very short time, a few milliseconds, the audio never stops.
sfxRun is an AudioStreamPlayer instance (a wav file in loop mode, but the same happens with ogg) This happens on release and debug builds.
What am I doing wrong?
latest Godot_mono on OSX
Thanks.
EDIT: Same happens with GDScript, here a simple example, the audio loop never stop.
var audio : AudioStreamPlayer
func _ready():
audio = get_node("audio")
func _input(event):
if event.is_action_pressed ("testKey"):
audio.play()
audio.stop()