SFML community forums

Help => Audio => Topic started by: Tristanbox09 on December 10, 2020, 03:28:39 am

Title: SoundBuffer error "Incomplete type not allowed"
Post by: Tristanbox09 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;
}
Title: Re: SoundBuffer error "Incomplete type not allowed"
Post by: Stauricus on December 10, 2020, 04:50:27 am
what is soundOff?
Title: Re: SoundBuffer error "Incomplete type not allowed"
Post by: Kvaz1r on December 10, 2020, 09:03:52 am
Did you also move line
#include <SFML/Audio.hpp>
into your header?