0
0

There appears to be a sound resource leek.

If an event has a control parameter and a sustain point that stays on a looping sound.
When keyed off, the parameter continues on as it should.

If the event is ended either via program or via (one shot and stop event option) after the parameter has moved passed the looped sound , the sound will not call the FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_RELEASE.

If the event is stop while on the sustain point things function as expected and FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_RELEASE is sent to the call back.

Dale

  • You must to post comments
0
0

I also receive multiple _END’s.

Here is the sample EVENT

[attachment=1:2prol3eb]statebug.JPG[/attachment:2prol3eb]

Here is the debug output , param->keyOff() was used to move of the sustain point.

The _END starts when the control param moves past the end of the sound.

FMOD_EVENT_CALLBACKTYPE_EVENTSTARTED
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_CREATE 20mm_1.wav
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_INFO
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_START /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_EVENTFINISHED

If the sound is Extended to the end of the event like this.
[attachment=0:2prol3eb]statebug2.JPG[/attachment:2prol3eb]
The following calls are recieved.

FMOD_EVENT_CALLBACKTYPE_EVENTSTARTED
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_CREATE 20mm_1.wav
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_INFO
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_START /20mm_1
FMOD_EVENT_CALLBACKTYPE_EVENTFINISHED
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END /20mm_1
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_RELEASE 20mm_1.wav

Are the END and RELEASE Supposed to after then event has ended?

Dale

  • You must to post comments
0
0

" An FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_RELEASE callback is generated when a "programmer" sound needs to be unloaded."

There’s no reason for the release callback to be called. You release a sound by calling freeEventData. Sounds dont free themselves from memory when an event stops, that would be innefficient.
regards,
Brett

  • You must to post comments
0
0

I ran 5 samples using UsageDetails.sound to see what was being released.
runs 1 and 2 were with out FMOD_EVENT_INIT_USER_ASSETMANAGER
and runs 3 ,4 and 5 with FMOD_EVENT_INIT_USER_ASSETMANAGER

5 was 2 key offs in a row.

The issue is that freeEventData should send a RELEASE to the CallBack when using ASSETMANAGER ,with out it, I would have to keep a separate list all all created sounds tied to the event, and release them.

Do to the create twice on #5, it also would require an freeEventData and the a sound list release any time an event was keyOff a looping sound, because when started again it Sends another create.

Run #1 Key Off

Creating Event
event start
FMOD_EVENT_CALLBACKTYPE_EVENTSTARTED
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_INFO
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_START
Keyoff Event
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
FMOD_EVENT_CALLBACKTYPE_EVENTFINISHED
Settings _EventFinished Flag
freeEventData
Pre freeEventData UsateDatails.sound= 6232
Post freeEventData UsateDatails.sound= 0
Clearing _EventFinished Flag

Run #2 Stop Event

Creating Event
event start
FMOD_EVENT_CALLBACKTYPE_EVENTSTARTED
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_INFO
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_START
Stop Event
FMOD_EVENT_CALLBACKTYPE_EVENTFINISHED
Settings _EventFinished Flag
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
freeEventData
Pre freeEventData UsateDatails.sound= 6232
Post freeEventData UsateDatails.sound= 0
Clearing _EventFinished Flag

Run #3 ASSETMANAGER with keyOff (note when freeEventData was called it did not generate a release message and the sound is now in limbo)

Creating Event
event start
FMOD_EVENT_CALLBACKTYPE_EVENTSTARTED
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_CREATE 20mm_1.wav
Pre createSound UsateDatails.sound= 0
Post createSound UsateDatails.sound= 5884
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_INFO
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_START
Keyoff Event
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
FMOD_EVENT_CALLBACKTYPE_EVENTFINISHED
Settings _EventFinished Flag
freeEventData
Pre freeEventData UsateDatails.sound= 5884
Post freeEventData UsateDatails.sound= 5884
Clearing _EventFinished Flag

Run #4 ASSETMANAGER with Event stop, date is destroyed when the stop event occurs

Creating Event
event start
FMOD_EVENT_CALLBACKTYPE_EVENTSTARTED
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_CREATE 20mm_1.wav
Pre createSound UsateDatails.sound= 0
Post createSound UsateDatails.sound= 5884
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_INFO
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_START
Stop Event
FMOD_EVENT_CALLBACKTYPE_EVENTFINISHED
Settings _EventFinished Flag
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_RELEASE 20mm_1.wav
freeEventData
Pre freeEventData UsateDatails.sound= 0
Post freeEventData UsateDatails.sound= 0
Clearing _EventFinished Flag

#5 Two key offs with out calling freeEventData

Creating Event
event start
FMOD_EVENT_CALLBACKTYPE_EVENTSTARTED
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_CREATE 20mm_1.wav
Pre createSound UsateDatails.sound= 0
Post createSound UsateDatails.sound= 5884
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_INFO
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_START
Keyoff Event
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
FMOD_EVENT_CALLBACKTYPE_EVENTFINISHED
Settings _EventFinished Flag
Clearing _EventFinished Flag
event start
FMOD_EVENT_CALLBACKTYPE_EVENTSTARTED
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_CREATE 20mm_1.wav
Pre createSound UsateDatails.sound= 5884
Post createSound UsateDatails.sound= 11768
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_INFO
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_START
Keyoff Event
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
FMOD_EVENT_CALLBACKTYPE_SOUNDDEF_END
FMOD_EVENT_CALLBACKTYPE_EVENTFINISHED
Settings _EventFinished Flag
Clearing _EventFinished Flag

HiTech

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.