I have a little problem here, maybe someone of you can help.
I’m using FMOD for sound output in .NET application (written in C#). On some lower end machines, I found that initialising FMOD can take like 2 seconds which is too much in my case.
So I thought I’d move the initialisation into another thread, since it usually takes a while until the first sound is loaded or played and made all sound functions check if the initialisation is complete and if not, wait for it to finish.
So far so good. Everything works fine. Everything initialises, waits properly and plays with no errors. The only problem I have, is that I hear no sound output at all
Can someone give me a hint of what might cause the problem?
Any input is appreciated!
- The Wretched asked 14 years ago
I noticed a few months back that FMOD is packed with UPX compression. I also remember when tinkering with UPX on an old PC I had a few years back that certain Anti-Virus software hangs up access to UPX compressed files for a few seconds while it tries a rather time consuming scan of the file.
What you may be experiencing is the same thing, when you call FSOUND_Init, windows finally gets around to loading the fmod.dll file, and since it is UPX compressed, your anti-virus software (if you are running any) is delaying the load, so your program hangs, until the scan on the dll is complete.
That’s just one theory I have, hope it helps some ;P
[quote="brett":4ixtqs34]what is low end? Ive never had fmod take any more than a split second to initialize. have you compared output modes by setting winmm or dsound with fsound_Setoutput? I dont recommend calling fmod from different threads.[/quote:4ixtqs34]
It’s very likely not an fmod problem but rather a swapping related one, because there’s a lot more memory being used than there is available. 😉
Toying around with different initialisation modes has moved the problem, but not eliminated it.
I guess the loading of the dll file takes most of the time, but unfortunately there’s not really an easy way around that…
Well, it seems that I won’t be using a thread to initialise sound then. I am not really sure if it would help improving the situation anyway
[quote="brett":1vj2cvwn]if you want to try the upx theory, just decompress fmod.dll permenantly.
upx -d fmod.dll
that will remove any decompression overhead. :D[/quote:1vj2cvwn]
Since it’s not hard to do I tried it. There was no measurable difference. This comes as no surprise, because I believe the problem is lack of memory and not lack of CPU power and UPX claims to have no memory overhead.
But thanks for all your tips anyway!
The loading hit I was talking about with UPX only happens with certain antivirus software that scans the files your system attempts to access, norton antivirus is a good example of this.
Other than that, it definately wouldn’t be caused by UPX, it would have to be one of the best written and infinately useful programs I have ever used… JUST LIKE FMOD!!
[quote="Heffo":17u26nzy]The loading hit I was talking about with UPX only happens with certain antivirus software that scans the files your system attempts to access, norton antivirus is a good example of this.
Other than that, it definately wouldn’t be caused by UPX, it would have to be one of the best written and infinately useful programs I have ever used… JUST LIKE FMOD!![/quote:17u26nzy]
Please login first to submit.