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

Author Topic: Having multiple sf::Music open  (Read 2334 times)

0 Members and 1 Guest are viewing this topic.

Tukimitzu

  • Full Member
  • ***
  • Posts: 117
  • Anti-Hero Member
    • View Profile
Having multiple sf::Music open
« on: September 16, 2016, 01:18:01 am »
Is there any problem having multiple sf::Music opened? Should I call openFromFile(...) only when I'm about to play it or can I have multiple sf::Music opened and then just call play when I want? Even if there "shouldn't" be a problem, what is safer, faster and what not?

Currently I open all my music at once on the start of the program, then play it as I need, but I'm not sure that's a good idea.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Having multiple sf::Music open
« Reply #1 on: September 16, 2016, 07:32:03 am »
There's no problem doing all the things you describe. If you have issues with that, please describe them. If not, then... why do you ask such a question?
Laurent Gomila - SFML developer

Tukimitzu

  • Full Member
  • ***
  • Posts: 117
  • Anti-Hero Member
    • View Profile
Re: Having multiple sf::Music open
« Reply #2 on: September 16, 2016, 06:55:10 pm »
To confirm or deny that I'm doing things right.
I'm trying to find this leak so I'm looking for it everywhere.
Thanks!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Having multiple sf::Music open
« Reply #3 on: September 16, 2016, 07:47:42 pm »
There's nothing wrong in what you do (without seeing your code), but that doesn't mean that SFML nor OpenAL is free of bug.

Let's focus on your other thread and close this one, to avoid splitting the answers.
Laurent Gomila - SFML developer