0 votes

I'm working on a Sonic fangame in Godot and I'm using GHZ music as a placeholder. the problem is GHZ music loops at a specific point so how do you loop music at a specific point?

Godot version 3.4
in Engine by (12 points)

1 Answer

0 votes

Easy solution: open it in a DAW and splice it to the length you want
medium solution: if you know the exact point at which it loops in seconds, then you can attach a script to the audioStream and on process check if your AudioStreamPlayer's getplayback_position ( ) == *insert loop time here*, and if true, play from startTime...

by (1,260 points)

Can you give me the code? I'm a beginner

I would not recommend this approach for a beginner! lot's of things that can go wrong.

It would be a lot easier to use Audacity or Garageband or Reaper.fm to cut the audio files to the correct length.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.