• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Loading sound from Included Files

F

Fattyshow

Guest
I'm pretty new to Game Maker.
I've been working on a minigame for a Twitch stream and I want it to be customizable.
I've already put all the sprites (just a few) as Included files so the user can easily change the images.

Now there is this Victory sound (victory.ogg).
I put this in 'Included Files' too since I want them to be able to change that.
What function can I use to make it play that file, since the drag & drop function doesn't allow me to choose it.

Thanks in advance
 
D

DevNorway

Guest
I think you should load your victory.ogg as a sound, instead of an included file. Name it something like snd_victory. To play it, use the audio_play_sound function.
 
S

Supercoder

Guest
A while ago I would have recommended sound_add(), but according to the manual it's been deprecated. I've looked around but I can't seem to find a viable replacement... It seems you'll have to go with DevNorway's advice.
 

FrostyCat

Redemption Seeker
A while ago I would have recommended sound_add(), but according to the manual it's been deprecated. I've looked around but I can't seem to find a viable replacement... It seems you'll have to go with DevNorway's advice.
I'm starting to tire of people spreading the myth of GMS 1.x having no viable means of loading sound at runtime.

With OGG files, there is audio_create_stream(). With raw PCM, there is audio_create_buffer_sound(). With minor modifications to PCM you can also theoretically load certain WAV files, though I have not formally tried this myself.

Yes, the equivalent in GMS 1.x has lost quite a bit of generality compared to sound_add(). But this is not my definition of unviable or impossible.
 

obscene

Member
Any audio files you set to stream on disk will not be packaged into an audiogroup file, left loose in the install folder and can be replaced by the user.
 
F

Fattyshow

Guest
Any audio files you set to stream on disk will not be packaged into an audiogroup file, left loose in the install folder and can be replaced by the user.
This is what I needed, set it to Compressed - Streamed (On Disk, higher CPU).

Thanks for the help everyone
 
Top