SFML community forums

Bindings - other languages => Java => Topic started by: Grimlen on November 26, 2013, 08:56:59 am

Title: getPlayingOffset() always 0?
Post by: Grimlen on November 26, 2013, 08:56:59 am
For some reason when I play my sound, the getPlayingOffset() always returns 0.
Even though it's clearly played for more than a few seconds, it's still 0:

    @Override
    public void mousePressed(java.awt.event.MouseEvent e) {
            if(sound != null){
                Time t = jt.sound.getPlayingOffset();
                long sndPos = (t.asMilliseconds());
                System.out.println("POS: " + sndPos);
            }
    }
 

And yes, I can hear the sound perfectly fine.
Why does it display 0?

Was this function not implemented yet?
Title: Re: getPlayingOffset() always 0?
Post by: pdinklag on November 28, 2013, 07:03:34 am
Sounds like a bug, I will check on this.
Title: Re: getPlayingOffset() always 0?
Post by: pdinklag on December 02, 2013, 08:08:54 pm
Confirmed, this was a misinterpretation of the method on my part.