Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Pet Terry on Sun 05/12/2004 20:35:34

Title: Where did my footstep sounds go?
Post by: Pet Terry on Sun 05/12/2004 20:35:34
Okay, something weird just happened.

In my game I'm having sounds for footsteps and I'm changing the sounds with SetFrameSound(); command when the character steps on different types of ground/floor. Everything was okay until I converted all the .wav sound effects to .ogg. Now some of the footstep sounds can not be heard anymore. All the other converted sound effects are working, but the footstep sounds are not. I tried rebuilding .vox-files but it didn't help.

I'm using AGS v.2.62 on WinXP, if it helps in anyway. Any help would be appreciated.
Title: Re: Where did my footstep sounds go?
Post by: Rui 'Trovatore' Pires on Sun 05/12/2004 21:26:40
Make sure than the sound files are played in OGG. I found out that, for some reason, some WAV files turn to silence when compressed to OGG. Try, say, changing those OGG files BACK to WAV and see what happens.
Title: Re: Where did my footstep sounds go?
Post by: Pumaman on Sun 05/12/2004 21:33:26
If you try playing the footstep sound manually with a PlaySound command, does it work?
Title: Re: Where did my footstep sounds go?
Post by: Pet Terry on Sun 05/12/2004 21:43:27
The files work when I play them in WinAmp. However, I tried them with a PlaySound command and they didn't work. If something went wrong while converting, it's really weird that it happened to 3 of 4 footstep sounds. I'll try converting those files again to see if it helps.

EDIT: I converted the files back to .wav and they worked fine. Then I converted those .wavs back to .ogg, and they didn't work. Mysterious.
Title: Re: Where did my footstep sounds go?
Post by: Pumaman on Sun 05/12/2004 22:06:27
That is strange -- looks like AGS's OGG decoder doesn't recognise them for some reason. How about if you try a different conversion tool?
Title: Re: Where did my footstep sounds go?
Post by: Pet Terry on Sun 05/12/2004 22:19:46
Ah-ha! I found out what was the problem, I think. The files were too short. I copied and pasted some "empty sound" in the end of those files, and now they all work okay. Earlier the files were about 0.5 seconds long and now they are about 1 second long each.

Thanks for all the help, I'm glad the problem got solved. :)
Title: Re: Where did my footstep sounds go?
Post by: Rui 'Trovatore' Pires on Sun 05/12/2004 22:29:00
That a fact? Is this some sort of limitation no one was aware of? I mean, sounds have to be at least one second long?
Title: Re: Where did my footstep sounds go?
Post by: Pumaman on Sun 05/12/2004 22:32:05
Not that I'm aware of .. probably just one of those strange inconsistencies in the encoder / decoder.
Title: Re: Where did my footstep sounds go?
Post by: Pet Terry on Sun 05/12/2004 22:44:54
I checked the length of the sounds again, they were around 0.25 seconds long each at first and now they are from 0.5 seconds to 1 second long. But still, the problem seems to be gone now. It also makes sense why the rest of the sounds worked fine, they were all longer than the footstep sounds.

Also, when I tried the sounds, sometimes I heard them but they were very faint and random.
Title: Re: Where did my footstep sounds go?
Post by: Oz on Fri 10/12/2004 11:34:26
Quote from: Pumaman on Sun 05/12/2004 22:32:05
Not that I'm aware of .. probably just one of those strange inconsistencies in the encoder / decoder.

No, actually I've run into this problem too, though I didn't realize what was wrong until I read this thread. I too used very short .ogg samples and they wouldn't play back in the game. Weird.
Title: Re: Where did my footstep sounds go?
Post by: Pumaman on Fri 10/12/2004 18:30:11
Hmm, perhaps the OGG decoder that AGS uses doesn't support very short files? A bit strange, if so, but I don't think there's much I can do about it.