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

Author Topic: sf::Sound by value  (Read 2964 times)

0 Members and 1 Guest are viewing this topic.

Serapth

  • Full Member
  • ***
  • Posts: 105
    • View Profile
sf::Sound by value
« on: November 10, 2011, 07:52:43 pm »
Hello all,

I just want to verify, SoundBuffer is heavy and should be cached, but sf::Sound itself is light weight and passing it by value should not be a big deal, right?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
sf::Sound by value
« Reply #1 on: November 11, 2011, 11:33:30 am »
Yes. However it is not as lightweight as a sf::Sprite or sf::Text. sf::Sound internally manages an OpenAL sound resource, so it's not trivial to copy and destroy.
Laurent Gomila - SFML developer