git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1074 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
137ef64f2a
commit
e9d7547593
@ -18,6 +18,8 @@ void PlaySound()
|
|||||||
if (!Buffer.LoadFromFile("datas/sound/footsteps.wav"))
|
if (!Buffer.LoadFromFile("datas/sound/footsteps.wav"))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
sf::SoundBuffer b2 = Buffer;
|
||||||
|
|
||||||
// Display sound informations
|
// Display sound informations
|
||||||
std::cout << "footsteps.wav :" << std::endl;
|
std::cout << "footsteps.wav :" << std::endl;
|
||||||
std::cout << " " << Buffer.GetDuration() << " sec" << std::endl;
|
std::cout << " " << Buffer.GetDuration() << " sec" << std::endl;
|
||||||
@ -25,7 +27,7 @@ void PlaySound()
|
|||||||
std::cout << " " << Buffer.GetChannelsCount() << " channels" << std::endl;
|
std::cout << " " << Buffer.GetChannelsCount() << " channels" << std::endl;
|
||||||
|
|
||||||
// Create a sound instance and play it
|
// Create a sound instance and play it
|
||||||
sf::Sound Sound(Buffer);
|
sf::Sound Sound(b2);
|
||||||
Sound.Play();
|
Sound.Play();
|
||||||
|
|
||||||
// Loop while the sound is playing
|
// Loop while the sound is playing
|
||||||
|
Loading…
Reference in New Issue
Block a user