Open CsloudX opened 1 year ago
Are you interested in making pr for this? I think making a new matching set of apis would help unify and allow the backwards compatibility change by marking as deprecated and then removing many versions later
Should loading audio files work via ResourceLoader::load()
? I see there is nothing like ResourceFormatLoaderAudio
.
ResourceLoader::load
can be a high level interface for loading any resources. Instead of detecting format of the file inside the app (MusicPlayer in this example), Godot can do this internally.
PS. I need audio files loading at runtime in my project. I can help with testing or making a patch.
The load
function in Godot Engine utilizes its internal format. Importers convert the original file into this internal format. An .imported/godot/file.res
replaces the original file with the converted internal format, and then the "pointer" is saved in the .import
file.
Ok, so I'm confused again and I think I must be lucky with loading DDS by using ResourceLoader: https://github.com/godotengine/godot-proposals/issues/5748#issuecomment-1756301744
Describe the project you are working on
Music Player
Describe the problem or limitation you are having in your project
In 4.x, it has ability to load audio on runtime, but it not uniformed.
MP3
OGG
WAV
Describe the feature / enhancement and how it helps to overcome the problem or limitation
uniform all api to static method
load_from_file(path)
.load_from_file
forAudioStreamMP3
load_from_file
forAudioStreamWAV
If possible, I wish all have
load_from_buffer
.(sometime I will get data from network)load_from_buffer
forAudioStreamMP3
load_from_buffer
forAudioStreamWAV
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
/
If this enhancement will not be used often, can it be worked around with a few lines of script?
/
Is there a reason why this should be core and not an add-on in the asset library?
It is should be core.