music/sound issues when room is loading

Started by Mouth for war, Wed 02/02/2011 19:15:28

Previous topic - Next topic

Mouth for war

I've encountered something annoying.
When a room loads where I have both a song playing AND a looping soundeffect in the background it takes a few seconds before it starts playing. the music and sound starts and pauses several times before they play normally. Any idea why that's happening?
thanks in advance!
mass genocide is the most exhausting activity one can engage in, next to soccer

barefoot

I May Not Be Perfect but I Have A Big Heart ..

Mouth for war

#2
Yes I tried that too and it didn't help I'm afraid :)

*Edit* I did however script that the soundeffect starts playing when the player leave a room and then have the music start after fadein in the next room. That works ok
mass genocide is the most exhausting activity one can engage in, next to soccer


Mouth for war

I tried to search but I only ended up at a screen with the searchbox saying "Did you forget to put something to search for?"So i thought there were no topics for it. I couldn't even click on the link you provided. Maybe something's temporarily wrong with my connection or something...
mass genocide is the most exhausting activity one can engage in, next to soccer


Calin Leafshade

#6
Yea this is a known bug on certain sound cards but i dont think the cause was ever identified.

Interestingly this also happens during the FadeIn() and FadeOut() commands so I would guess its not actually related to the room loading but actually the fading function.
If I were to guess I would say that the sound buffer is not being updated during the fades and cards with small buffers end up skipping.

CJ is logging in pretty regularly at the moment so you can probably expect a fairly speedy response.

Mouth for war

Ah I see, I have a M-audio firewire solo. Mainly a soundcard for recording music. I increased the buffersize and I think it did help a little but still a short stuttering...oh well. thanks for the info Calin :)
mass genocide is the most exhausting activity one can engage in, next to soccer

Calin Leafshade

304 and I have definitely isolated this to the fading function. The sound does not seem to stutter if the transition mode is set to 'Instant'.

From there you can use a gui to implement your own fades.

Ryan Timothy B

Quote from: Calin Elephantsittingonface on Wed 09/02/2011 15:08:10
The sound does not seem to stutter if the transition mode is set to 'Instant'.

This is actually incorrect. The stutter may not be noticeable with low resolution games, but Journey of Iesir is 1024 x 768 and it stutters between room changes with the transition mode set to instant. It's not nearly as bad as with the Fading, but it's still present.

I'm actually glad you pointed this out to me, because the music stutter with Fading was almost unbearable. Now I'll just do it the way you mentioned above. Which is one reason why an on_event for room afterFadeIn would be much nicer instead of doing the workaround method.

Dualnames

It stutters cause you're using mp3 or oggs, using wavs doesn't cause that.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Calin Leafshade

Quote from: Ryan Timothy on Wed 09/02/2011 18:54:50
This is actually incorrect.

That's a shame. I would think that an issue with the fading function would be easier to solve than what is obviously a general buffer issue.

Quote from: Dualnames on Wed 09/02/2011 19:14:46
It stutters cause you're using mp3 or oggs, using wavs doesn't cause that.

That would increase most games' size by a factor of about 10.

Dualnames

Quote from: Calin Elephantsittingonface on Wed 09/02/2011 19:23:33
Quote from: Ryan Timothy on Wed 09/02/2011 18:54:50
This is actually incorrect.

That's a shame. I would think that an issue with the fading function would be easier to solve than what is obviously a general buffer issue.

Quote from: Dualnames on Wed 09/02/2011 19:14:46
It stutters cause you're using mp3 or oggs, using wavs doesn't cause that.

That would increase most games' size by a factor of about 10.

Indeed, but it's unfortunately a great solution. Also ogg seems to be slightly better than mp3.
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

xenogia

Ahh the sound issue.  I used to get it randomly within a scene sometimes as well when using external plugins.

Pumaman

What colour depth is the game, and does the problem happen with both DX5 and D3D?

xenogia

I sent you my game a while ago regarding sound stutters.  Run's at 640x400 32bit D3D.  Sound stutters get worse if you filter the game to a higher res.

Knoodn

in my case it happens only in DirectDraw5 mode.
with Direct3D everything is fine.

game runs in 640x480 32-bit.

cat

Sorry for digging this up, but the problem still exists.

Quote from: Knoodn on Fri 11/02/2011 14:46:43
in my case it happens only in DirectDraw5 mode.
with Direct3D everything is fine.

game runs in 640x480 32-bit.

This quick fix works for me. But with DirectDraw5 I had bad stuttering too. (640x480 32bit) However, Direct3D doesn't work on some old computers...

As code is now open source - any chance for a fix here?

SMF spam blocked by CleanTalk