SFML community forums

Help => Audio => Topic started by: Serapth on November 10, 2011, 07:52:43 pm

Title: sf::Sound by value
Post by: Serapth 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?
Title: sf::Sound by value
Post by: Laurent 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.