Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > irrKlang
Play same file multiple times

Lukas
Guest
Quote
2015-07-21 10:28:02

Hi,
First of all, I am new to irrklang and programming (we use c++), so it would be nice if you could use not too many technical Terms. :)
We develop a small underwater Simulation with ogre3d and irrklang and I would like to give the fish a 3D Sound. Just a Little watercurrent or something like that.
Problem is, that not every fish has a sound, to be honest, it seems that only one fish has it.
To play the sound every fish has a Sound object which gets the position of the fish. The key function is:
//update soundposition for every fish
void Sound::updateFish(Ogre::Vector3 pFishPosition)
{
if (fishWhirl->isFinished())
{
fishWhirl->setVolume(50); //just for testing reasons
fishWhirl = soundEngine->play3D(fish,
vec3df(pFishPosition.x, pFishPosition.y, pFishPosition.z),
false, false, true);
}
}

Has anyone an idea how to do this? Is it even possible to Play the sam3 Sound file simultanousely several times?


erik
Registered User
Quote
2015-07-21 12:50:38

I honestly don't understand what your problem is. Could you maybe rephrase what you want to do and what you fail to do?


Lukas
Guest
Quote
2015-07-21 15:43:23

I have a couple of fish and I would like to give them 3D-Sounds.
Problem: Only one fish Plays the Sound and all others are quiet.


niko
Moderator
Quote
2015-07-22 05:39:54

Maybe your 'fishWhirl' variable is static? Otherwise, it should work. If you really call play3D() for each fish, it should work.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internation?l" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact