WWW Audio and PlayOneShot: Playing the same AudioClip Twice Cuts off First Instance

We want our users to be able to add their own sounds to the game. Right now I’m preloading all audio using the WWW class because from what I understand, streaming audio is not working currently under the latest build of Unity.

From what I understand PlayOneShot creates a new AudioSource and handles all the clean up once the clip is done. The sounds layer with each other perfectly, as long as each AudioSource instance is playing a different clip.

However, if I try to play the same medium length clip twice, I can hear that the first clip is stopped prematurely. I’ve tried everything I can think of:

I’ve tried to instantiate a new audioclip but it returns an empty clip.
I’ve Manually created another AudioSource and used Play(), but it cuts off as well.

Unity answers has a question with the same problem but with no working answer:

I’ve had no issues with multiple copies of the same clip when using files directly out of the library. It seems that this problem could be directly related to WWW. Any help would be greatly appreciated.

should I file a bug report?

I have an answer now after lots of testing. WWW is not the problem directly.

WWW.audioClip return an AudioClip object, NOT a reference. So if you were to PlayOneShot(WWW.audioClip), duplicate shots of the same sound would layer. However, if you stored WWW.audioClip in a variable, PlayOneShot would be sent the same AudioClip each call so it would restart the sound. Essentially, if you want PlayOneShot to layer, you have to pass it a unique instance of an audioclip each time.

However, you cant use Instantiated WWW clips with PlayOneShot

source: http://forum.unity3d.com/threads/98284-Channel-Error-with-PlayOneShot-Using-Instantiate-and-WWW-Bug