Does 3D Sound Thread/Multi Buffer?

I want to attach the same 3D sound to two different points. Point One and Point Two.

The sound will play at random, but before it plays, I want to check the sound’s status.


self.Swd_Clank1 = MySndMgr.audio3d.loadSfx("testdata/sndfx/swd_clank1.wav");
self.Swd_Clank1.setVolume(1);
self.Swd_Clank1.setLoop(0);
MySndMgr.audio3d.attachSoundToObject(self.Swd_Clank1, self.RightSpear);

Must I define the sound a second time and attach it to point two? I ask this question because the sound at point one will not play if it is already playing. Therefore, if the same sound was attached to point two, it wouldn’t be able to play because it’s already playing at point one.

That is my guess anyway.

Exactly right. You must load the sound file twice if you want it to play simultaneously in two different places. But don’t worry, the second time you call load, it’s a very fast operation that only duplicates the sound reference in-memory.

David

I might as well ask this now.

Since I’m defining my sound as such:


self.Swd_Clank1 = MySndMgr.audio3d.loadSfx("testdata/sndfx/swd_clank1.wav"); 
self.Swd_Clank1.setVolume(1); 
self.Swd_Clank1.setLoop(0); 
MySndMgr.audio3d.attachSoundToObject(self.Swd_Clank1, self.RightSpear);

How should I go about getting the sounds garbage collected?

Given the manual code, you’re adding the sounds to a main manager, that’s in the form of a list…?

self.audio3d = Audio3DManager.Audio3DManager(base.sfxManagerList[0], base.cam);

I’m not sure how to go about cleaning up the sounds.


Another thing -

Can you add buffer to sounds, so the same sound can be played miltiple times at the same time?


Found somethin else to chew on -

audio-cache-limit

Does that limit the number of sounds I can use in game in anyway?


For some reaons, my sounds will not play when specified at certain moments.

For instance, I have a sound playing at cetain frames of an Actor animation. The sound plays at the first two appointed frames, but all the other key frames the sound should play on, the sound fails to play.

I don’t see any reason for the sound failing to react to the other appointed frames. Why just on the first two?