1
Audio / SoundBuffer error "Incomplete type not allowed"
« on: December 10, 2020, 03:28:39 am »
Hello guys,
I am trying to load a losing sound for minesweeper, and I achieved this in the main window first. I then moved my function to a class and I am getting an incomplete type not allowed on my buffer object. Any ideas? My code is below:
void Board::losingSound(sf::SoundBuffer& buffer, sf::Sound& sound)
{
buffer.loadFromFile("sound/gameover.wav");
sound.setBuffer(buffer);
sound.play();
soundOff = true;
}
I am trying to load a losing sound for minesweeper, and I achieved this in the main window first. I then moved my function to a class and I am getting an incomplete type not allowed on my buffer object. Any ideas? My code is below:
void Board::losingSound(sf::SoundBuffer& buffer, sf::Sound& sound)
{
buffer.loadFromFile("sound/gameover.wav");
sound.setBuffer(buffer);
sound.play();
soundOff = true;
}