RimWorld

RimWorld

Playlist
 This topic has been pinned, so it's probably important
Aleksey  [developer] 23 Jul @ 4:45pm
Seeking Functionality
If you're wondering why seeking wasn't implemented, here's why:

The logic for seeking is already in the code and works as it should with a caveat. That is to say, any mod-added song will not properly when seeking. Songs from the base game and DLCs do work perfectly with seeking, but what's the point if you can't use it with all songs? So, I've decided to keep it disabled.

Here's the technical reason:
Songs from the base game and DLCs have AudioClips with a loadType of Streaming. This type of AudioClip works well with setting the time or timeSamples properties of the AudioSource. Songs loaded from outside the game have AudioClips with loadTyes of DecompressOnLoad. This means that the song is decompressed and loaded into memory, completely available for data manipulation. It doesn't work that way though. Setting the time or timeSamples of the AudioSource with these clips loaded results in seeking to somewhere still in the beginning of the song, regardless of where you seek to. The timestamp is correct, but the actual position in the song you'd hear is completely wrong.

There's no fix for this. This is a Unity problem and after scouring the Internet and AI for answers, there just are none.

Note: This would apply to any manipulation of the currently-playing song's playback. That means fast-forwards and skipping to parts in the song is out too.