0
0

I have a weird problem. When I run the FMOD sample program in VB6 it tells me there is a division by zero error and the program asks if I want to debug.

If I ‘debug but do nothing and just have the program continue it seems to work perfectly. Can I fix this nuissance?

  • You must to post comments
0
0

Inserting a DoEvents after the FSOUND_Init call fixed it for me.

  • You must to post comments
0
0

I had this before too, well actually a user that was betaing my player had this, oddly it only affects some users.

To fix it i had to split up some of my fmod calls. Basically giving it time to startup, at least thats what I figured, once i spaced out my calls over a period of functions, which was easier to read anyhow, the problem disappeared. I am going to assume u are getting this error on tracker modules right?

++Cire

  • You must to post comments
0
0

I’m wondering if it is something to do with FPU exception masking.

  • You must to post comments
0
0

Thanks. I’ll try that out. For the record, the error points to the lines

lp_cutoff = 5000
lp_reson = 1

and if I comment those out it then points to

lblProcessor = Format(FSOUND_GetCPUUsage, “00.00”) & “%”

If I comment all those lines out the error disappears, but (and sorry I’m new to this) I don’t know what those lines do (I can guess, especially the GetCPUUsage part) so I don’t really want to take them out.

thanks

  • You must to post comments
0
0

This problem also occurs at Borland Delphi. I’m having the same problems with my player. I tried a lot of thing against, but the only thing that worked was either not using DirectSound or not initializing FSOUND 😕

  • You must to post comments
0
0

I´m having the same problem frequently. It seems to be a bug in fmod since I haven´t used a computation with a devision by zero.
Also VB frequently states that an error occurs when running fmod and then it shuts down the whole app. E.g. when I am running the code of ´Here’s some code for a smooth VB-VU´ (see the list of topics) I get the same errormessage.

<font size=-1>[ This Message was edited by: Ultrasaurus on 2002-03-16 05:19 ]</font>

  • You must to post comments
0
0

Just my two cents, but when setting a Label control’s Caption, you should be explicit with the property to avoid problems:

lblBlah.Caption = “blah”

I’ve got a very detailed application going with VB and Win32 API and FMOD of course, and have yet to ever see a Div by 0 error. Must be something specific about the particular functions you’re using in FMOD? GetCPUUsage and all the Stream/Channel/Info functions work great here for mp3/wav playback. I don’t have a need for MODule formats tho.

  • You must to post comments
0
0

I just thought of another option that might remove some bugs.
I had some bugs (i dont’t remember if it were division by zero errors, but it were strange errors) and they were solved when I disabled Optimization (No Optimization option in the project options)
It might be worth trying.

  • You must to post comments
0
0

I also got a problem a problem like this! Unfortunately I don’t remember precisely how I resolved it, but:

1) Be careful with initialization of the Brett’s lowpass filter (the same included with fmod example) because if you don’t initialize it with correct values, it will return a division by zero error.

2) If your lbl.caption=FSOUND_GetCpuUsage statement is in a timer, it may happen that the function is called before fmod initialization, giving a division by zero error.

3) (But I don’t think this is your case) Watch out for MMX and FPU instructions if your code contains assembly.

  • You must to post comments
0
0

The division by zero occurs when I run the program right from the VB screen. I don’t make an EXE. It just says it as soon as I hit the ‘play’ button in VB

  • You must to post comments
0
0

It is more safer to compile and test out the exe ( not from the IDE ).

  • You must to post comments
0
0

KarLKoX’s right. My own player sometimes crashes when I close the program after I use some multithreading tricks (winamp vis plugins emu – say yeah KarL :smile:).
Obviously the compiled version works pretty good…

  • You must to post comments
0
0

Yeah !!!!! :smile:
Fplayer rulez 😀

  • You must to post comments
Showing 13 results
Your Answer

Please first to submit.