Hello,
I'm trying to make a soundmanager using sfml audio, but I'm having some problems on the loading. I searched in this website and tried to do everything of what you said, but still doesn't work
Here's the loading:
int SoundManager::LoadSound(string strFileName)
{
sf::SoundBuffer *buffer = new sf::SoundBuffer();
if (!buffer->LoadFromFile(strFileName))
{
buffer->~SoundBuffer();
return -1;
}
for (size_t i = 0; i < m_buffers.size(); i++)
{
if (!m_buffers[i])
{
m_buffers[i] = buffer;
return i;
}
}
m_buffers.push_back(buffer);
return m_buffers.size() - 1;
//return 0;
}
if I made a really stupid mistake, please don't bother me, I'm a newbie as a programmer so be patient. :oops: