I’ve looked exaustively for differences between my code and fmod’s geometry example, and i still get stuck
In brief, this is what i am doing.
1. Create the system
2. get driver caps and set speaker mode
3. initialize system with 100 maxchannels and FMOD_INIT_NORMAL | FMOD_INIT_OCCLUSION_LOWPASS
4. create a sound with FMOD_SOFTWARE | FMOD_3D
5. I set the sound minmaxdist to 1-10000, then i set loop mode
6. i create a channel (paused), set its position to the origin, its velocity to zero, and unpause the channel afterwards.
7. setGeometrySettings to 200
8. create a cube (12 polygons – 6 triangles, and 36 vertices: i though it should be 8 vertices, but i have to take into account every time a vertex is used by a face, otherwise fmod returns an error). this cube goes from -2 to 2, in every axes. When adding each polygon, i set the reverb and occlusion to 1. the poly are set double faced.
9. I position the cube at the origin
10. I call setActive(true), even if it is the default… desperate try…
11. set3DListener attributes:
listener = 0,
position: x=0, y=0, z=-5
velocity: all zero
center: x=0, y=0, z=1
up: x=0, y=1, z=0
12. system update.
13. repeat from 11, until… err crtl-c is pressed (hehe, rapid development :p)
Ok, i’m really desperate and feeling very dumb (and probably with a good reason), and i would appreciate the help from anyone expert enough to look at my application flow and imediately get the error.
I bet i am doing something wrong with the vertices. The example reads from a file, and that part of the code is quite obscure to me…. If i set the geometry position to zero, then the relative coordinates become world coordinates, right?? By the way, i’ve set the polys as double faced. Must i worry with the winding anyway?
I would be very grateful for that help. Thank you.
- Merejiah asked 11 years ago
Ok found the problem was the delay time between calls to System::update, where it was skipping geometry updates if the time delta was 0ms. With such a tight loop it didnt get time to update. Everything else was ok.
I’ve adjusted the delta check so that the test case you provided now works, this will be in 4.08.01 which is coming out in a few hours.
ok, i’ve tried one poly (a quad, actually) with full reverb and occlusion. It still does not work. I would like to send the code to you but i can’t see no attachment options in the forum post interface. Should i send the zip directly to your mail?
Thank you for the support and your fast reply,
Please login first to submit.