Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: getPlayingOffset() always 0?  (Read 6041 times)

0 Members and 1 Guest are viewing this topic.

Grimlen

  • Newbie
  • *
  • Posts: 29
    • View Profile
    • Email
getPlayingOffset() always 0?
« 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?

pdinklag

  • Sr. Member
  • ****
  • Posts: 330
  • JSFML Developer
    • View Profile
    • JSFML Website
Re: getPlayingOffset() always 0?
« Reply #1 on: November 28, 2013, 07:03:34 am »
Sounds like a bug, I will check on this.
JSFML - The Java binding to SFML.

pdinklag

  • Sr. Member
  • ****
  • Posts: 330
  • JSFML Developer
    • View Profile
    • JSFML Website
Re: getPlayingOffset() always 0?
« Reply #2 on: December 02, 2013, 08:08:54 pm »
Confirmed, this was a misinterpretation of the method on my part.
JSFML - The Java binding to SFML.