I was just playing around with the 3ddemo project and thought I’d try to swap out the drum sounds for the car sound(so still using ‘examples.fev’).

Here’s what I did:

1) changed group directory: "examples/3d" —> "examples/car"
2) in ‘initObjects’ i make all of the getEvent calls that were drums into "car". code now looks like this… result = fmodEventGroup->getEvent("car", EVENT_DEFAULT, &objects[i].event);
result is always ‘FMOD_OK’.

all looks good, until…

In ‘initObjects’ the after the call:
result = objects[i].event->set3DAttributes(&pos, &vel)
‘result’ is always "FMOD_ERR_INVALID_HANDLE"
in fact I’ve tried other functions like ‘getMute’ ‘getProperty’ and ‘result’ is the same.

Can anybody help?

Thanks, Matt

  • You must to post comments

The event property "Max playbacks" is set to 1 for the car event. This means that your 2nd, 3rd, 4th etc. getEvent will steal the event instance every time thereby invalidating the previous handle. Increase "Max playbacks" to 7 and it should work.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.