0
0

Hi!

I’m new here and my english is not the best, but i hope it’s good enough for you to help me :)
My problem:
I’m using sounds in my program by using the FSOUND_Sample_Load command.
For example:
shieldhit = FSOUND_Sample_Load(FSOUND_FREE,”sfx\shield.wav”,FSOUND_NORMAL,0,0);

This works fine!
But if i’m loading more than 16 wav-Files this way, my program crashes by closing it (after closing the program Dr. Watson tells me, that an error occured …).
What’s wrong ? Isn’t it possible to load more than 16 Samples at the same time ?
If this is fact, what can i do ?

Thx for help, Backside

  • You must to post comments
0
0

hm, very curious!

I’m now at my other pc and here it works!
I really don’t know what the problem is or if windows is the problem :)
In fact there was a problem on my Win2k machine (300MHz, 256MB Ram), but here (WinXP SP2, 2GHz, 1GB Ram) it works.
really interesting …
how can i identify a memory system override ?
or what else could it be ?

  • You must to post comments
0
0

You’d better learn using a debugger. It will tell you exactly where it is crashing and why. Saves hours of developer’s time. A profiler (like Bounds Checker) is also valuable in tracing memory bugs. A bad pointer or a corrupt stack or heap in YOUR APP may crash in FMOD or in a totally different place.

  • You must to post comments
0
0

Yes i checked the return value of FSOUND_Sample_Load, but that isn’t the problem.
I had 16 codelines like this:

FSOUND_Sample_Load(… sound1 …)
FSOUND_Sample_Load(… sound2 …)

FSOUND_Sample_Load(… sound16 …)

then I added the 17th sound:


FSOUND_Sample_Load(… sound16 …)
FSOUND_Sample_Load(… sound17 …)

and the program chrashed ->by closing it<- , the program itself worked without errors.
Thereby it didn’t matter what sound i deactivated by commenting it (with //), the error occured only if all 17 sounds were loaded!
And here on my XP-machine it works without problems.
So I don’t think that the problem is somewhere in my code (I suppose so).

Otherwise I’m not a professional and I have no idea about using a debugger or something equal.

  • You must to post comments
0
0

Well, i’m now on my Win2k machine again and i can’t reproduce the error …
In other words: Now it seems to work here, too !
I’m sorry, i don’t know what happend here last week but at the moment everything works without any problems.
Perhaps a windows-problem or something else but it seems not to be a problem of fmod or my program.

However, thanks for the help !

MfG, Backside

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.