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

Author Topic: How to check if a music has been loaded?  (Read 1920 times)

0 Members and 1 Guest are viewing this topic.

santiaboy

  • Full Member
  • ***
  • Posts: 118
    • View Profile
How to check if a music has been loaded?
« on: January 25, 2013, 02:42:12 am »
Is there a way to check if the music has been loaded before? (without needing a bool variable)

I read the documentation and I don't seem to find it


« Last Edit: January 25, 2013, 02:53:02 am by santiaboy »

FRex

  • Hero Member
  • *****
  • Posts: 1845
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: How to check if a music has been loaded?
« Reply #1 on: January 25, 2013, 03:34:42 am »
I'm not sure if that's what you mean but did you try to check if duration is zero?
Back to C++ gamedev with SFML in May 2023

santiaboy

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: How to check if a music has been loaded?
« Reply #2 on: January 25, 2013, 03:52:42 am »
Well, that does solve it.
I wanted to know if there was some kind of music.isLoaded() or anything of the sort

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: How to check if a music has been loaded?
« Reply #3 on: January 25, 2013, 08:49:54 am »
If you can't find it in the doc, then it doesn't exist ;)
Laurent Gomila - SFML developer