Legacy GM [SOLVED] audio_create_stream issue

M

MajorDeuce

Guest
Hi, I've been using GM8 and 8.1 for years now and recently I've been trying to make the big switch to studio.

I always use external sound in a sub directory like "/res/snd/sound.type" like this:
global.snd_eat=sound_add(working_directory + "\res\snd\eatfood.wav",0,true)

So.. I'm trying to accomplish the same task in studio like this:
global.snd_hit=audio_create_stream(working_directory + "\res\hit.ogg")

This does not work, yet when I do it like this in the main directory:
global.snd_hit=audio_create_stream(working_directory + "\hit.ogg")
It works no problem.

This is troublesome because I want the external resources neatly tucked away in a folder, not in the main game's directory.

Anyone know what could be going wrong/what I'm doing wrong? Thanks for taking the time to read this post.
 
M

MajorDeuce

Guest
Ah.. I figured it out. It was a misunderstanding of how audio_create_stream works. To use it, you have to add the file in included files, then just type the file name alone into the arguments. This works in sub directories. eg. mainpath/res/snd/name.type"

It's bittersweet. I'm glad I got it working but adding sounds will be just a little more painful than it was in GM8.1. Oh well, it's worth it for all the other gains with studio I guess.
 
Top