wjc272008 / jmonkeyengine

Automatically exported from code.google.com/p/jmonkeyengine
0 stars 0 forks source link

AudioNode.setTimeOffset ambiguity #490

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The documentation and code appear to be conflicting with respect to what 
AudioNode.setTimeOffset does

This documentation implies that it is used to set an initial delay before 
playing the sound:
http://jmonkeyengine.org/wiki/doku.php/jme3:advanced:audio?s[]=settimeoffset

This code appears to set the amount of the sample to skip before playing:

       alSourcef(id,  AL11.AL_SEC_OFFSET, src.getTimeOffset());

http://code.google.com/p/jmonkeyengine/source/browse/branches/jme3/src/lwjgl-oal
/com/jme3/audio/lwjgl/LwjglAudioRenderer.java?r=5564#209

The Javadoc is ambiguously specified as "Set the time offset in seconds when 
the sound will start playing"

For my purposes, I was hoping to be able to set the delay BEFORE a sound starts 
playing (from the beginning)

Original issue reported on code.google.com by airbagg...@gmail.com on 9 Apr 2012 at 12:55

GoogleCodeExporter commented 9 years ago
 * Fixed in the wiki and javadoc

Original comment by ShadowIs...@gmail.com on 1 Jun 2012 at 4:17