Fluury
Member
Heya.
I'd like the user to be able to load sprites and audio files into the game. The sprite part is easily handled by sprite_add(), however loading audio into the game seems vastly more complex, and from what I have seen, only possible in a very limited fashion.
It appears that the only way to achieve this is to load a specific audio file format (RAW, although some say wav also works, unsure about the latter) into a buffer, and then using an audio buffer function to turn it into a sound to play.
The search for tutorials or code examples was somewhat unsuccessful, a lot of the threads were either over 4 years old, or just didn't get a lot of attention in the first place, leaving the OP without an answer.
So here I am, with the following questions:
1. The documentation says only PCM audio is supported, however I am not familiar with the term. Some sources suggest that .wav is supported, some say only partially, and the massive gaps in time the statements were made makes me wonder if something maybe changed. So, what file formats are supported?
2. How would you even load an audio file, be it raw or .wav into a buffer? Do I just open an audio file using file_bin_open, then just read through it byte by byte until it's end and feed said information to a buffer?
3. Could anyone reference any coding examples/tutorials?
Thanks!
I'd like the user to be able to load sprites and audio files into the game. The sprite part is easily handled by sprite_add(), however loading audio into the game seems vastly more complex, and from what I have seen, only possible in a very limited fashion.
It appears that the only way to achieve this is to load a specific audio file format (RAW, although some say wav also works, unsure about the latter) into a buffer, and then using an audio buffer function to turn it into a sound to play.
The search for tutorials or code examples was somewhat unsuccessful, a lot of the threads were either over 4 years old, or just didn't get a lot of attention in the first place, leaving the OP without an answer.
So here I am, with the following questions:
1. The documentation says only PCM audio is supported, however I am not familiar with the term. Some sources suggest that .wav is supported, some say only partially, and the massive gaps in time the statements were made makes me wonder if something maybe changed. So, what file formats are supported?
2. How would you even load an audio file, be it raw or .wav into a buffer? Do I just open an audio file using file_bin_open, then just read through it byte by byte until it's end and feed said information to a buffer?
3. Could anyone reference any coding examples/tutorials?
Thanks!