Starting Audio halfway through?

Hey, folks!

So, I’m writing a game which requires the music to become more complex as you type the correct answers to questions. I have 11 audio clips, each the same loop, but with an extra instrument added in, and I’m wondering if there’s a way to immediately switch from the audio.timeSamples position in one AudioClip to that same position in another. Is there a way to do this? I can’t seem to figure it out from looking at the script reference. At the moment, I’ve got…


//assuming the music needs to change to the "wind file"...
looptime = audio.timeSamples;
audio.Stop();
audio.clip = wind;
audio.Play(looptime);

But this doesn’t work. Any advice, folks?

Cheers,

Simon

Samples are Read Only.

Why not just start all clips at the same time and then change the volume of each clip.

audio.volume = 0.0;

audio.volume = 1.0;