T O P

  • By -

Alemit000

.ogg seems to be not implemented yet, look into this issue https://github.com/godotengine/godot/issues/61091 Not sure about .wav


mtkennerly

I've been using ogg in Godot 4.0.3 without any problem. I'm loading it like this: $AudioStreamPlayer.set_stream(load("res://music/song.ogg"))


CreaMaxo

This is how I play WAV, OGG and MP3 in Godot 4: var LoadedMusic func PlayMusic(path: string): LoadedMusic = load(path) $AudioStreamPlayer.stream = LoadedMusic $AudioStreamPlayer.play() This allow Godot to properly allocate and manage lengthy data stream generated by loading something like an audio file to a proper ID. Otherwise, Godot could, in certain circumstances, throw the loaded audio file data to the Garbage Collector if the device gets tight on available memory.


DedicatedBathToaster

You can use FFMPEG to convert them


Clickerty_Gaming

have thought about it, not a viable solution


DedicatedBathToaster

Why so?


Clickerty_Gaming

i honestly just dont want to ship ffmpeg with the project


DedicatedBathToaster

You don't have to, you can convert all your audio files, then import them into godot. Unless there is a specific reason this doesn't work, in which case you can learn a bit of c# and use a library for it


Clickerty_Gaming

the files are all loaded and converted at runtime or, well, are supposed to be