Page 1 of 1

Problems with sound

PostPosted: Oct 21, 2007 @ 6:38pm
by Ryumaster
Hi! I'm getting far too many problems with Hekkus (Windows Desktop, not testing with ppc yet), it is most likely because of my ignorance, so I have few questions:
Firstly, is it true that I can play 4-5 or more wav files at the same time simply by calling PlaySound(bla bla); for each one of them?

PostPosted: Oct 22, 2007 @ 8:00am
by edge

PostPosted: Oct 22, 2007 @ 7:07pm
by Ryumaster

PostPosted: Oct 23, 2007 @ 7:47am
by edge
Hi Ryumaster,

In our own games we have no problems using the Hekkus Sound library. Please check the following:
- When using the static library, define HSS_STATICLIB before defining ESOUND_HEKKUS
- Preload all sound effects and see if you can play multiple sounds (while playing a music file) without incorrect breakpoints or crashes
- Try to stop all sounds before freeing a sound effect, does this help?
- Is your global pointer set up correctly, also is ecd linked correctly?

PostPosted: Oct 23, 2007 @ 5:48pm
by Ryumaster
Thank You a lot for answering! Now I'll focus on game audio and try to fix everything. By the way, what is the difference between Free(); and DeAlloc ? Do the both free memory that surface uses?

PostPosted: Oct 24, 2007 @ 8:00am
by edge
Can you tell me if any of the solutions mentioned above fixed your audio problem? Also, can you tell me more about your question about Free() and DeAlloc(), for which class/object are you using these?

PostPosted: Nov 13, 2007 @ 8:20pm
by Ryumaster
Hi!
The only problem with sound left is when I call FreeSoundEffect(). It works fine only once, and later I always get breakpoint as I mentioned above. (too bad stopping all sounds helps not)
Anyway, it works for everyone, and I'll make it work for me :) I just haven't got enough time for more testings. Probably.

About Free(). The point why I've asked it's because I've tried to free surfaces from memory Using Free();, but because Free takes no parameters, and surfacename.free do not work for me either, I thought maybe it is good idea to free using DeAlloc(surfacename) because DeAlloc has something to do with memory. Unfortunately, there was more to it, because my surfaces are still always stays in memory.

PostPosted: Nov 14, 2007 @ 10:35am
by edge

PostPosted: Nov 15, 2007 @ 10:31pm
by Ryumaster
Hi! Thank You for large reply, it is all clear with surfaces now.
About sound. Looks like this ugly heap corruption has something to do with how Windows works with dll files, there are many similar threads Google gives out, anyway, I'm still working on it.
If I choose to use Static Libs (everything set fine, I've checked many times), I get this error we all had before (breakpoint on delete). I have got only one question for now - if I use static libs, I have to use hss.dll anyway? When I delete if from folder, I get an error. This is normal? Cause I'm just thinking, maybe I messed up somewhere in VS2005 configs.

PostPosted: Nov 16, 2007 @ 10:16am
by edge
Hi Ryumaster,

You can check if you're really using the static library by just removing the DLL. If it runs without any errors, then everything went well.

Because you get the error message, you probably link the wrong library. Please make sure it links /Hekkus/lib_static/xp instead of Hekkus/lib/xp.

PostPosted: Nov 16, 2007 @ 5:38pm
by Ryumaster
OMG, that is the case. I could never figure out, that static libs was not in archives of Hekkus. In fact, they are only available to donors. Well, I know what to do next... And once again, Edge saves the day :) Thank You!

Hmmm

PostPosted: Nov 20, 2007 @ 5:04pm
by Ryumaster

PostPosted: Nov 21, 2007 @ 4:33pm
by edge