Compressed in Memory Audio major bug in Unity 2021.2

I’ve reported this bug a long time ago and I’m surprised it hasn’t been fixed in Unity 2021.2 yet. The TL;DR is this: if I use a Compressed in Memory audio clip in a build made with Unity 2021.2 it will never stop playing and will live in memory forever even though I destroy the AudioSource. The workaround is to use the “Decompress on Load” load type. However this has huge negative memory implications and it frankly cancels out the memory gains from using native ASTC/DXT compressed texture formats for mobile builds.

Does anyone know a workaround for this that lets you use the Compressed in Memory load type?

There are some fixes for compressed audio in the merge queue now. I’ll check to see if the fix for destroying the audio source is included.

I confirmed this fix is in that batch of fixes.

1 Like

Thank you! Just to confirm, the fix is in the merge queue for a Unity 2021.2.x patch right?

It will be if not already, yes.

1 Like