So in our dialog system, I build a path to a wav file I want to play, based on character/language/stress level, etc. I then use
UFMODBlueprintStatics::PlayEventAttached to create a component attached to the speaker, use SetProgrammerSoundName to give the wave file, and then call Play(). I get the first half second of the audio, and then it stops. I’ve got a handler on the OnEventStopped that gets called, but way earlier than it should.
I note that the first call thing that Play() does is to call Stop(), which seems like it may generate spurious errors to me. But even if I remove my handler, the sound still cuts out almost immediately.
Is there something else I need to be doing other than SetProgrammerSoundName to get this to work? I’ve stepped through the code I can, and in EventCallbackCreateProgrammerSound() it looks like the call to LowLevelSystem->createSound() returns successfully. I added some logging to get the length of the sound it’s returning, and it’s correctly several seconds long.
Here’s some logs:
LogFMOD:Verbose: Playing component 0000016D00CE0100
EEarthfall_LogUtility: PlayVODialog: Sound started at: 4.659204
LogFMOD:Verbose: Creating programmer sound from file ‘…/…/…/Earthfall/Content/FMod/Dialog/en/Roy_call_Printer_Foundb_calm_en.wav’
LogFMOD:Verbose: Programmer sound reports length of 2159 ms
LogFMOD:Verbose: Destroying programmer sound
LogFMOD:Verbose: UFMODAudioComponent 0000016D00CE0100 PlaybackCompleted
Earthfall_LogUtility: PlayVODialog: Got Finished from FMOD at 5.220541
LogFMOD:Verbose: UFMODAudioComponent 0000016D00CE0100 Stop
So despite having a 2+ length sound, it stops after half a second.
Any hints on how to debug this?
Rick Saada, Holospark