How to clone AudioClip object

M

Mike Mimic

Hi!

How can I clone (copy) AudioClip object. The problem is that I need
to play the same sound many times in a program (and that can also
be simultaneously). If I use only one object it does not play it
simultaneously - as it is written in the documentation:

play()
Starts playing this audio clip. Each time this method is called, the
clip is restarted from the beginning.

But if I create new object every time I play it (and that means read
file) I get delay.

And I think it is bad idea to make a queue full of AudioClip objects
because I do not know how many I will need.

So how can I make new AudioClip from previous AudioClip?


Mike
 
A

Andrew Thompson

....
| How can I clone (copy) AudioClip object.

Don't. Use two instances of the AudioClip object,
using the same filename, and be done with it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top