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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - molo32

Pages: [1]
1
Audio / play 3 times sound buffer
« on: July 08, 2018, 09:03:15 pm »
pressing the f key should play the buffer. Then when you finish playing, increase again "i" and play again until "i" equals 3

but when pressing f only plays once, what is the problem?
      
if (sf::Keyboard::isKeyPressed(sf::Keyboard::F)) {

         for (int i = 0; i < 3; i++)
         {
sound.setBuffer(buffer2);

sound.play();
}

   }

Pages: [1]