Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Rui 'Trovatore' Pires on Mon 31/01/2005 11:58:34

Title: Problem with footsteps sounds (SOLVED)
Post by: Rui 'Trovatore' Pires on Mon 31/01/2005 11:58:34
I remember a rather recent thread which also had a similar problem... but NOT QUITE the same one. In that once, the sound files did NOT get played, period.

In my case, they do... sometimes. Sometimes they don't. Which is very weird.

I have no idea what information I should supply for you to help me, but here is some: I have 8 frames plus a standing frame. In frame 2 I play sound sound3.ogg, and in frame 6 I play sound sound2.ogg (i.e., in the view manager I've replaced NO SND with 3 and 2 respectively). Sometimes, when the player character walks, the sounds play; sometimes they don't. I see no rhyme nor reason to it. I'm using beta 15. This has happened both in "test game" and when I ran the compiled EXE standalone.

I have probably let out information which might be valuable, like the length of the sound files I'm trying to play (I don't include it right away because it might NOT be relevant) plus other things I can't remember right now. If I have, please let me know and I'll post it. Any and all help is appreciated.
Title: Re: Problem with footsteps sounds
Post by: strazer on Mon 31/01/2005 12:11:19
Does it also happen if you do it manually, i.e.

if (player.View == YOURVIEW && player.Loop == YOURLOOP && player.Frame == 2) PlaySound(3);

?
If so, do you have any other sounds that are played from rep_ex or do you have a lot of other characters with frame sounds walking around in the room?
Since there's a limited number of sound channels, maybe the sounds are being played but are cut off immediately by another sound started somewhere else.
Title: Re: Problem with footsteps sounds
Post by: Rui 'Trovatore' Pires on Mon 31/01/2005 12:16:57
Actually, if I do that it doesn't happen anymore, but that's not a suitable workaround, as the sound plays continually while the frame is displayed, resulting in quite odd behaviour. And no, no other sound effects at all are being played at this point, only the footsteps.
Title: Re: Problem with footsteps sounds
Post by: Scorpiorus on Mon 31/01/2005 12:31:59
By the way, does changing sound options make any difference?

If not then any chance you can upload a game demonstrating the problem for us to test?
Title: Re: Problem with footsteps sounds
Post by: Rui 'Trovatore' Pires on Mon 31/01/2005 12:37:09
What kind of sound options?

As regards uploading: the game is for ATC. And the rules are pretty nasty about outside help, I only started the thread because I thought it was an AGS problem - therefore not a problem to the rules. I'll PM Andail and tell him to check this thread out, and he'll let me know whether it's OK to upload for further examination. If not, I'll just have to make do without footstep sounds.
Title: Re: Problem with footsteps sounds
Post by: Scorpiorus on Mon 31/01/2005 12:57:59
Quote from: Rui "Erik" Pires on Mon 31/01/2005 12:37:09
What kind of sound options?
I mean, for instance, changing Digital sound setting.
Title: Re: Problem with footsteps sounds
Post by: Rui 'Trovatore' Pires on Mon 31/01/2005 17:35:46
Er... :P I'm afraid I still don't get it, sorry... you mean changing these things in the file itself, or something in AGS?
Title: Re: Problem with footsteps sounds
Post by: Scorpiorus on Mon 31/01/2005 18:20:51
Ah, I mean those in the game setup (WaveOut device/direct sound device), I should have mentioned that sorry :)
Title: Re: Problem with footsteps sounds
Post by: Pumaman on Mon 31/01/2005 19:41:13
When you say "sometimes they play, sometimes they don't", do you mean that one footstep sound will be missing now and then, or do you mean that you get none at all for a period of time?
Title: Re: Problem with footsteps sounds
Post by: Rui 'Trovatore' Pires on Tue 01/02/2005 07:05:52
It's quite random. SOmetimes I walk, and there they are. Often, if they play once, they're bound to always play, at least while I don«t stop or change direction - but even then, sometimes there is no sound for a particular frame. Simetimes I get quite a lot of sounds in a stretch; sometimes it's quite long before I get any sound. Most times, the first footsteps in the animation do NOT have sound... but sometimes, though not as often, they do.

BTW, I'm using continuous scaling, if it makes a difference. And the problem happens in all leves of zoom, as far as I've seen.
Title: Re: Problem with footsteps sounds
Post by: Gilbert on Tue 01/02/2005 07:13:40
Hmmm what happened if you change it so it only plays one sound in one of the frames of the loop?
Also, how long do the files play? Will it be possible that the time passed between 2 sounds playing not long enough so they're overlaping ? I know this can be irrevalent, just asking about some possibilities hoping to narrow it down.
Alternately, try lengthening the sample play time (by adding silence maybe), I'd heard that some sound players can't play samples properly if they're too short.
Title: Re: Problem with footsteps sounds
Post by: Rui 'Trovatore' Pires on Tue 01/02/2005 07:15:57
Gilbot, I'll try your suggestions later, I have to rush off right now. Just wanted to ask - I assume, by all these posts and their content, I'm the only person that has had this problem, yes? Then I guess the problem lieth not in AGS but in My Own Buggardly Self. I don't know whether to be relieved or further alianeted.

Again, I'll try your suggestions when I can, Gilbot.

EDIT - I feel so embarassed... moreso because I had READ the other thread. :P Yes, enlarging the file to 1 second (I don't remember how short if was BEFORE, sadly) took care of the problem. Thanks, Gilbot and everyone.