Any way to load sounds from a file at runtime? #3014
-
I'm making a rhythm game, and I want people to be able to drag and drop the music files into their data folder and play them. I've got it so it loads up images, text, and the note data, but I've hit a snag with the sound file as from what it seems like, I would have to import the file into s&box as a .sound file, then play it. Is there any way to do this without having the sound file built into the gamemode? Also, what file types does it support? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You're probably going to have to read the sound file in and then write to a sound stream with the sample data. |
Beta Was this translation helpful? Give feedback.
-
I do have code to create sounds (not streams) at runtime on a branch somewhere, not sure why I didn't merge it in, probably was waiting until it was needed. |
Beta Was this translation helpful? Give feedback.
I do have code to create sounds (not streams) at runtime on a branch somewhere, not sure why I didn't merge it in, probably was waiting until it was needed.