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();
}
}
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();
}
}