Problem with playing sound backwards

In my game, I need to be able to play sounds, like dialouge, forwards and backwards.

My idea was to put two files, one forward and one reversed audio file in a sound cue and switch between them on int.
Problem is, that I can not control the entry point, at which the sound resumes to play when paused. Since it should be possible to spool forward or backward respectivly at any given time during the playback.

The switch works perfectly, time dilation through pitch also seems to work, but when I go from forward to backwards playing, the time at which the sound would playor rather resume is wrong. Is it possible to set the audio playback time (playback position) or anything of that matter? I know I can use the play node with a start time parameter, but since i need to resume from pausing, that’s not really applicable.

I would need to be able to set the playback position to (length - position) when switching to backward playing and vice versa. Any ideas? From looking at the C++ class it seems that there is no setter for that kind of value either.

It seems to me that the fact you are pausing the sound creates a limitation. Instead of pausing the sounds, just Stop it altogether but just before that store the playback position in a variable, say PlaybackPosition. Then you can restart it with Play passing PlaybackPosition as StartTime. Or you can Play the reverse sound passing Length - PlaybackPosition as StartTime.

1 Like

Thanks a lot, I just fixed it by doing exactly that, just needed a few hours of testing around.

But yours is in fact the seemingly best approach.