Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update script to work with Godot 4 #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Stoxis
Copy link

@Stoxis Stoxis commented Jun 8, 2023

Updated to work with Godot 4

Updated to work with Godot 4
@EeveeEuphoria
Copy link

Tested this myself and it seems to work just fine on Godot 4.1.1, thanks for this! Hope this gets merged.

@MonteCrysto31
Copy link

So I just found the pull request after fixing it myself for Godot 4 ^^'

I just tried your fix but I saw that support for Ogg Vorbis file had been commented out, here's how I changed that section to work:

elif filepath.ends_with(".ogg"):
	var newstream = AudioStreamOggVorbis.load_from_buffer(bytes)
	newstream.loop = true #set to false or delete this line if you don't want to loop
	return newstream

The data property is not accessible, but you can create an AudioStreamOggVorbis directly with the load_from_buffer method. I tested this and it works as of Godot 4.2.1

@dsyze
Copy link

dsyze commented Aug 2, 2024

Thanks a lot! It works very well with wav files on Godot4.2!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants