From e9d754759385bbf6c01e63e78e9b11110c26f6b1 Mon Sep 17 00:00:00 2001 From: laurentgom Date: Fri, 10 Apr 2009 14:12:54 +0000 Subject: [PATCH] git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1074 4e206d99-4929-0410-ac5d-dfc041789085 --- samples/sound/Sound.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/samples/sound/Sound.cpp b/samples/sound/Sound.cpp index 982eb99c..079057a1 100644 --- a/samples/sound/Sound.cpp +++ b/samples/sound/Sound.cpp @@ -18,6 +18,8 @@ void PlaySound() if (!Buffer.LoadFromFile("datas/sound/footsteps.wav")) return; + sf::SoundBuffer b2 = Buffer; + // Display sound informations std::cout << "footsteps.wav :" << std::endl; std::cout << " " << Buffer.GetDuration() << " sec" << std::endl; @@ -25,7 +27,7 @@ void PlaySound() std::cout << " " << Buffer.GetChannelsCount() << " channels" << std::endl; // Create a sound instance and play it - sf::Sound Sound(Buffer); + sf::Sound Sound(b2); Sound.Play(); // Loop while the sound is playing