Problems with sound effects (SOLVED)

Started by MrBen, Tue 27/06/2006 12:07:25

Previous topic - Next topic

MrBen

hi, I'm currently making my first game that has used sound, and I'm having problems...

The music I've made is working fine but when I try to make a sound effect it doesn't play then an error comes up saying "could not load sound 1"

here's the code I'm using...

Ã,  PlayMusic(2);
Ã,  StartCutscene(eSkipESCOnly);
DisplayMessage(982);
Wait(20);
object[4].Visible = true;
Wait(10);
Ã,  PlaySound(1);
ShakeScreen(7);
Wait(5);
object[4].Visible = false;
Wait(20);
cBob.Say("Awwww crap!");
object[4].Visible = true;
Wait(20);
cBob.Say("I hate Tuesdays");
object[0].Visible = false;
Wait(1);
object[4].Visible = false;
EndCutscene();

Is there a seperate file I need to save the sound into..?

Also I made a different sound effect thinking it could be that, but the new one still doesn't work...?

Gilbert

What format is the sound file in? It must either be .wav, .ogg or .mp3 .
Also, did you name it something like sound1.ogg ?
(also, check that it's not because the default explorer of "hide known extension" option's checked which made you actually named the file sound1.ogg.ogg)


Revan

The first post was by Mr.Ben and we are making the game together, but he isn't here at the min...

we saved it as .wav and named it sound1 so it should be sound1.wav

and I'm unsure what you mean by "hide known extension" I cant find it...

Ashen

Open up Windows Explorer (or My Documents). Select 'Tools' > 'Folder Options', go to the 'View' tab, and in the 'Advanced Settings' options there should be a checkbox for 'Hide extensions for known file types'. If this is ticked, un-tick it, and check the filename again. However if it's a file you recorded youselves, I don't know if this'll be the problem, it's more usually associated with re-named files..

If that doesn't work, what if you try encoding the file as an mp3 or ogg? (Google for an encoder, if you don't have one.) It's possible that there's something about the format of the wav that AGS doesn't like (compression) - although I think that gives a different error.
I know what you're thinking ... Don't think that.

Revan

The file is just named sound1.wav (not sound1.wav.wav) I thought it might be because we have made our own sound effects so I downloaded one from the net, and it still couldn't load it... Is there something I'm missing, do you save the sound1.wav to the music folder?

Gilbert

Are you sure the file is in m$ .WAV format? Also make sure it's non-compressed as AGS doesn't support compressed .WAV formats that some programmes save to.
Also, it may be also the file is not in geniune .WAV format, that it might be just a .WMA or .MP3, etc. file renamed, trt cleaning it up using programmes like Audacity, for example.

Steel Drummer

Do you have speech in your game? If you do, it has to be the same file type as the sound.
I'm composing the music for this game:



Gilbert

I think it's not necessary, as long as they're in formats supported by AGS.

Revan

Quote from: Gilbot V7000a on Sat 01/07/2006 04:15:03
Are you sure the file is in m$ .WAV format? Also make sure it's non-compressed as AGS doesn't support compressed .WAV formats that some programmes save to.
Also, it may be also the file is not in geniune .WAV format, that it might be just a .WMA or .MP3, etc. file renamed, trt cleaning it up using programmes like Audacity, for example.

I have exported it using Audacity, at first as a .WAV then a .OGG then a .MP3 and nothing happens still the same error comes up... is there anychance someone could maybe make a quick room with a sound effect and send it to me with the editing file aswell so I can see if I am doing something stupidly wrong... (I've even tried to use different channels for the sound and nothing helps, still the same "cannot load sound(1)" error.... I'm at a loss....

SSH

If you want to upload your game folder somewhere secret then tell Ashen or me or someone you trust enough where it is we can have a look and see what the problem is. Tell us by PM if you want to keep the location secret...
12

Redlands

I had a similar problem with my first AGS game, which I just started yesterday. I had to put the sound file into the main directory of the game (i.e. NOT in the Music or Speech subfolders). I think this might be your problem, since I had exactly the same problem.

Revan

Quote from: Redlands on Thu 06/07/2006 08:09:43
I had a similar problem with my first AGS game, which I just started yesterday. I had to put the sound file into the main directory of the game (i.e. NOT in the Music or Speech subfolders). I think this might be your problem, since I had exactly the same problem.

Wow this guy got the problem right with his 1st post... after all that it needed to be saved in the main compiled file, and not the sound or speech file.... and it wasn't .wav.wav it was just saved incorrectly.......

SMF spam blocked by CleanTalk