I've tried loading an mp3 for music and wavs for sound but can't get either one to play. No errors, just no sound.
Can you make the MP3 and WAV available - need to check they are in the right format.
Have you put the audio files in the application.app directory (and optionally in the Media directory if you're using that)? Have you typed the name of the directory and/or file correctly (including case)?
It's a little difficult to guess what else might be going on without code.
Found the problem, it doesn't seem to like sub-folders. The files were in the app directory, but I had a sub-directory called 'sfx'. I tried loading the sounds like: "sfx\stuff.wav" but that wouldn't work. If I remove the files from the sfx folder and just keep them in the root of the app folder then I can load them fine. Any insight as to why I can't load them from sub-folders?
You can load from sub-folders, as that's exactly what I do. I do this with sfx, gfx and data. Sub directories within the Media directory work as expected.
Are you sure that the main directory is set to Media -
SETCURRENTDIR ("Media")
and then are you using LOADSOUND "sfx/stuff.wav",value,repeat
? If not, make sure that it is.
And GLBasic uses "/" not "\"
My sfx folder isn't in the media directory it's off the root directory the application is in, which is the current working directory. So i dont see a need to use setcurrentdir.
I tried both types of slashes before just to make sure.
Then try SETCURRENTDIR ("SFX")?
Sub folders do work, but I suspect that the wav file is in the wrong format. GLB seems to be rather picky about the settings. Try opening them with Audacity and changing them to 16bit files and resaving.
took the words out of my mouth. I had to convert a few wav files using audacity. I didn't post it to the forums at the time as I assumed it was me being.......well being me :)
as i've already said, the wav files work fine when in the root directory, so it's obviously not the format.
Can you post the code that loads the sounds you're trying play?
Test with DOESFILEEXIST ?
And make sure the case is correct - on various platforms, file and directory naming case sensitive.
I'm not sure what the problem was, but it's working as expected now. Strange.