Hi,
now I'm trying to bring sound to the game, but I face a problem with the PointSound Class.
When I create an object, where I load the soundfile, set the scheduling bounds and set the distance gain using an array of point2f's (values: 10, 0.5f; 5, 1.0f), I still cannot notice a difference between beeing 10 units from the object and 5 units from the object. Did I missunderstood something or is it a bug, that should be reported?
Here is the code, where I set the values:
sound.setSoundData(soundContainer);
sound.setInitialGain(1f);
sound.setPosition(new Point3f(objPosition));
sound.setCapability(PointSound.ALLOW_ENABLE_READ);
sound.setCapability(PointSound.ALLOW_ENABLE_WRITE);
sound.setCapability(PointSound.ALLOW_POSITION_WRITE);
sound.setCapability(PointSound.ALLOW_POSITION_READ);
sound.setSchedulingBounds(tg.getBounds());
sound.setEnable(false);
sound.setLoop(BackgroundSound.INFINITE_LOOPS);
Point2f[] attenuation = { new Point2f(10, 0.5f),
new Point2f(5f, 1.0f) };
sound.setDistanceGain(attenuation);
where sound is a PointSound and soundContainer is a MediaContainer.
Again the sound is triggering in the bounds, but does not increase as I go nearer.
Hope you can help.