Topic: Sound cloning problem

Hello, i have a problem about sound cloning, here's my set-up :

Two scenes, Scene-1 and SNDscene.
All sounds are on SNDscene.

I'm using sounds in a OO way, so i can play a whole collection with just few lines,
for playing i'm cloning the sound from SNDscene to Scene-1,
and i'm setting the setPosition argument to place it to the object i want.

The problem is, after a while (120~ uses), it stop playing for good.
in some other projects it stops playing after 15~ uses

here's a project to show the problem : Soundbug
(this one stops sounds after 120~ uses)

Press these keys to play sound at :
4 = left
8 = front
6 = right
2 = back

Any idea what's going on ?

Re: Sound cloning problem

I can't understand what exactly the problem.. I don't always understand English.

Re: Sound cloning problem

Well, in the example i posted, you press a key to play a sound,
but then after some uses, when you press again, nothing happen

Re: Sound cloning problem

You are probably saturating the sound buffer,
because you just duplicate and duplicate sound sources, and they are never deleted (as delete is not available yet from script).

You should use the same source for a specific sound if you don't need to play it simultaneously in different positions.
Or use a fixed number of sources (2 or 3) that you turn with.

Other temporary solution is to add a custom script to delete objects from a c++ plugin and call this script from lua when the sound finished playing. We can add this script to the trunk later.

Re: Sound cloning problem

Oh ok thanks for the precision, well, i went with this method, so far everything's ok

Re: Sound cloning problem

ok, the use of "stopSound" seems to relieve the system ?

Re: Sound cloning problem

No clue, when i was cloning them, i didn't used stopsound
But i can make some test if you wish