I’ve implemented dialogue streaming for our game. We know a few frames in advance that a character wants to say something, so i stream in an MP3 (in it’s entirety), and supply the raw data to FMOD in the ProgrammerSound EVENT_CALLBACKTYPE_SOUNDDEF_CREATE (6) callback.
So far so good; the audio plays to completion.
The problem I’m having is that I never get the EVENT_CALLBACKTYPE_SOUNDDEF_RELEASE callback, so I can’t tell when FMOD is finished with my data.
The sequence of callbacks i get is:
Callback: 6 – EVENT_CALLBACKTYPE_SOUNDDEF_CREATE
Callback: 8 – EVENT_CALLBACKTYPE_SOUNDDEF_INFO
Callback: 1 – EVENT_CALLBACKTYPE_SOUNDDEF_START
For the create (6), I do a createStream with FMOD_OPENMEMORY_POINT flags.
For the INFO 8 and START 1 events, I don’t do anything. (This is the same as the programmer sound example).
I return FMOD_OK in all cases.
The behaviour is the same on PC and PS3 – i.e. plays fine, but no RELEASE callback.
Am I doing something wrong?
- Franta asked 10 years ago
Hi, have you tried using the latest development version (4.07.20)? I believe the fix was only applied to the development branch.
Failing that, can you send a small code sample which reproduces your problem to email@example.com ? I am unable to reproduce it here so far.
- Guest answered 9 years ago
I’ve finally got this working!
For anyone that’s interested, here’s what I did to fix it:
– updated to fmod 4.06.24 (not sure if this was any part of the actual problem, but since you guys said you fixed a bug, i’ll mention it)
– correctly update the FMOD event system (i was only updating the underlying core of fmod (i.e. the system, instead of the event system)
(this prevents you from getting the "sound finished" callback)
– set the "programmer sound" to "one shot" (this was preventing the "release sound" callback from being called)
Please login first to submit.