Skip to content

Instantly share code, notes, and snippets.

@fire
Last active May 22, 2024 09:43
Show Gist options
  • Save fire/b9ed7853e7be24ab1d5355ef01f46bf1 to your computer and use it in GitHub Desktop.
Save fire/b9ed7853e7be24ab1d5355ef01f46bf1 to your computer and use it in GitHub Desktop.

godotengine/godot-proposals#1151

https://github.com/fire/godot/tree/play-scheduled

https://github.com/fire/godot-schedule-play-demo

Use cases:

  1. metronome
  2. graphic that moves towards you and you have to hit in sync to a end line to play a note.
  3. Playing an audio clip of an chicken cry at 8 am and then a second cry at 8 am and 5 minutes.

Creates silence or a skip version that is inserted before the clip is played.

  • cancelled if I call play or play_scheduled

  • cancelled if I call stop in time

  • get_game_time_msec is monotonic and adding buffer sizes is monotonic

  • so we effectively have a monotonic audio clock

Prior broken work. https://github.com/aleksfadini/godot-flawed-metronome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment