The UAudioComponent class a member function called Play that takes a float StartTime
The docs say:
Start a sound playing on an audio component
What does startTime actually refer to? If I pass in 0.0f will this play immediately?
The UAudioComponent class a member function called Play that takes a float StartTime
The docs say:
Start a sound playing on an audio component
What does startTime actually refer to? If I pass in 0.0f will this play immediately?
Itās defaulted to 0.f, if that helps. Looking a little closer, on line 265 of AudioComponent.h, it sets FActiveSound.RequestedStartTime to the new StartTime.
In ActiveSound.h, we find no comment on RequestedStartTime. However, in ActiveSound.cpp, FSoundParseParameters.StartTime is set equal to RequestedStartTime. Looking into the definition in ActiveSound.h, there is a comment on FSoundParseParameters.StartTime! Unfortunately, it looks like the writer died partway through.
// How far in to the sound the
Maybe itās supposed to be āHow far into the sound to start playingā? Thatās my best guess.
We can go a little further, since ParseParams is eventually passed to SoundBase->Parse().
No luck though, since in SoundBase.h, the Parse method is declared as virtual with no implementation in SoundBase.cpp. Thatās as far as Iām willing to search, so good luck.
Thanks
Hopefully Epic can shed some light!? Will copy paste this thread into the feed back forum
Yes, the parameter should be called SeekTime not StartTime. To me, StartTime implies a delay while SeekTime would imply what it actually does. Note that thereās logic to attempt to āseekā into sound cues ā so if you have a delay node in a sound cue, this StartTime will consume part of that delay. For example, a delay node of 4 seconds and a StartTime of 1 seconds will result in an actual delay of 3 seconds. It will also perform a seek into a sound file upon decode.