diff --git a/samples/sound/Sound.cpp b/samples/sound/Sound.cpp index c50b0c542..982eb99cd 100644 --- a/samples/sound/Sound.cpp +++ b/samples/sound/Sound.cpp @@ -31,11 +31,11 @@ void PlaySound() // Loop while the sound is playing while (Sound.GetStatus() == sf::Sound::Playing) { - // Display the playing position - std::cout << "\rPlaying... " << std::fixed << std::setprecision(2) << Sound.GetPlayingOffset() << " sec "; - // Leave some CPU time for other processes sf::Sleep(0.1f); + + // Display the playing position + std::cout << "\rPlaying... " << std::fixed << std::setprecision(2) << Sound.GetPlayingOffset() << " sec "; } std::cout << std::endl << std::endl; } diff --git a/src/SFML/Audio/SoundStream.cpp b/src/SFML/Audio/SoundStream.cpp index 0c796f8d2..0639a99f2 100644 --- a/src/SFML/Audio/SoundStream.cpp +++ b/src/SFML/Audio/SoundStream.cpp @@ -272,6 +272,7 @@ void SoundStream::Run() ClearQueue(); // Delete the buffers + ALCheck(alSourcei(Sound::mySource, AL_BUFFER, 0)); ALCheck(alDeleteBuffers(BuffersCount, myBuffers)); }