The problem I have is that I can't manage to get my loops to play seamlessly. I tried both .wav and .ogg files (I'm aware of loop problems with compressed formats, such as mp3). I've browsed this forum and looked at many examples on how to achieve such seamless playing of musical loops, but I have not yet found a working example. The three main approaches I found (including variations) and which I tried:
1. on Update, check if the current clip !isPlaying, then change soundfile and play (http://answers.unity3d.com/questions...ck-random-song) -> currently the most simple and best sounding option, but still 'gappy'
2. play clip, then use Invoke() (or InvokeRepeat or yield etc. - tried them all) in combination with audio.clip.length to try and start a new clip right after the other -> very noticable, uneven gaps
3. play a clip and loop it, then during play change the soundfile -> changing clip unfortunately stops play and you have to restart it manually again
I tried various variations but none of these provided an unhearable transition between two different soundfiles. I was surprised that the first option (http://answers.unity3d.com/questions...ck-random-song) worked as well as it did, since I found there was only a noticable gap when the random soundfile was different than the previous one - when the next random[soundfile] was the same as the previous one, there was a seamless transition.
I also had a look at http://www.psneville.com/?p=874 but since I'm not that familiar with C# and because the code is slightly outdated (when I open the package in Unity 3.3 I get a lot of errors), I have not managed to find out if and if so, how this example really works.
One more important detail: I am making an iPhone game (so I'd would really like my interactive music to work on iPhone). All of my findings with noticable transitions between two music sound files so far have been on PC, MAC and iPhone platforms though.
So: is there anybody out there who has managed to create a working musical sequencer/loop-based music system in Unity with seamless transitions between music sound files? Or can anyone point me in the right direction? Or tell me that it cannot yet be done in Unity?