hello
.
the setpositional entrypoint does not seem to work
as i turn left and right, i hear the sound comming on the left and/or right speaker
but considering the distance, the sound doe not fade, nor stops
[java]
sound = new AudioNode(main.getAssetManager(), “Sounds/welding1.wav”, false);
sound.setPositional(true);
sound.setVolume(1);
sound.setTimeOffset(0);
sound.setPitch(1);
sound.setRefDistance(0.5f);
sound.setMaxDistance(1f);
sound.setDirectional(false);
sound.setReverbEnabled(false);
sound.setLooping(true);
rootNode.attachChild(sound);
sound.setLocalTranslation(pos);
sound.play();
[/java]
also i cant have the sound looping with play instance
but i need many instances of a looping sound at different positions in the game
plz help
thx
zarch
July 16, 2013, 4:43pm
2
Create multiple audio nodes to have the same sound in multiple positions.
pspeed
July 16, 2013, 5:00pm
3
This…
sound.setMaxDistance(1f);
Means that sound will never get any quieter after 1 meter away.
http://hub.jmonkeyengine.org/javadoc/com/jme3/audio/AudioNode.html#setMaxDistance(float)
<cite>@pspeed said:</cite>
This...
sound.setMaxDistance(1f);
Means that sound will never get any quieter after 1 meter away.
http://hub.jmonkeyengine.org/javadoc/com/jme3/audio/AudioNode.html#setMaxDistance(float)
thx man
i saw that entry point the wrong way
but what about non looping instances ?
play does not allow multiple overlapping sounds
why is it coded that way ?
if i have many looping sounds produced at many places, i cant use instances, then i am screwed
how do we achieve this ?
(edit : i’ll try this “Create multiple audio nodes to have the same sound in multiple positions.”)
pspeed
July 16, 2013, 7:34pm
6
If you have multiple looping sounds in multiple places then by definition you have multiple audio nodes/sources.
playInstance() is not meant to handle this case… it’s for quick one-off sounds where you might have multiple ones coming “from the same location”. Say, a gun shot.