Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Art on May 18, 2005, 04:13:27 PM

Title: How do i: Play several looped sounds together
Post by: Art on May 18, 2005, 04:13:27 PM
When i call Game.PlaySound, it terminates playing of previus sound.
I need to play several ogg files together in depense of state of the game ???
Title: Re: How do i: Play several looped sounds together
Post by: Mnemonic on May 18, 2005, 04:35:53 PM
Do you mean playing several sounds simultaneously or one after another?
Title: Re: How do i: Play several looped sounds together
Post by: Art on May 18, 2005, 06:41:49 PM
simultaneously
Title: Re: How do i: Play several looped sounds together
Post by: Mnemonic on May 18, 2005, 06:52:05 PM
Ok, in that case simply generate several entities and let them play the sounds:

var DummyEnt1 = Scene.CreateEntity();
var DummyEnt2 = Scene.CreateEntity();

DummyEnt1.PlaySound("sound1.ogg");
DummyEnt2.PlaySound("sound2.ogg");

If the number of sounds is fixed you can also pre-make sound entities directly in SceneEdit.
Title: Re: How do i: Play several looped sounds together
Post by: Art on May 19, 2005, 08:59:52 AM
Thank you Mnemonic :)
It should help me