So I have created a kind of wrapper around the Unity AudioSource called MicroSource. It is used in the custom audio system MicroAudio which basically uses pooling for AudioSources and gives back MicroSource wrapper for easier control of the AudioSources and some nice QoL features.
PROBLEM: I allocate MicroSource object/class for each sound which is not very good. I could do pooling for it also but user can store reference to the MicroSource and use it later, which means it can be used when new sound effects have already taken it. I though about adding flag "DontReleaseOnComplete" and then user manually releases it back to pool when its done with the sound but seems like there are better and more elegant solutions to this problem.
So basically if anyone has any suggestions how to resolve this problem?