0
0

Hello. My game crashes if I try to use FMUSIC_FreeSong:
Why? :-/ – I am using C++
Thank you.

[code:2n8j50mx] if(m_sound)
{
FMUSIC_FreeSong(m_sound);
}[/code:2n8j50mx]

[code:2n8j50mx]bool Csound::loadSound(const char filename)
{
/

if(m_sound)
{
FMUSIC_FreeSong(m_sound);
}
*/

   m_sound = FMUSIC_LoadSong(filename);
   if(m_sound)
   {
          playSound();
          return true; 
   }
   else
   {
     LOG << "Couldn't load--- " << filename << " ---" << ENDL;
     return false; 
   }

} [/code:2n8j50mx]

  • You must to post comments
0
0

Are you initializing m_sound to NULL before calling loadSound() for the first time?

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.