title: FMOD don't play sound C++
body: <p>I actually try to play a sound with FMOD but it didn't work.</p>
  
  <pre><code>#ifndef __SOUND_HH__
  #define __SOUND_HH__
  
  #include &lt;string&gt;
  #include &lt;fmodex/fmod.h&gt;
  
  class Sound
  {
    FMOD_SYSTEM *sys;
  
    FMOD_SOUND *explosion;
    FMOD_RESULT resExplosion;
    FMOD_CHANNEL *channel1;
  
  public:
    Sound();
    ~Sound();
  
    void play(const std::string &amp;);
  };
  
  #endif
  </code></pre>
  
  <p>and </p>
  
  <pre><code>#include &lt;string&gt;
  #include &lt;iostream&gt;
  #include "Sound.hh"
  
  Sound::Sound()
  {
    FMOD_System_Create(&amp;this-&gt;sys);
    FMOD_System_Init(this-&gt;sys, 1, FMOD_INIT_NORMAL, NULL);
  }
  
  Sound::~Sound()
  {
    FMOD_System_Release(sys);
  }
  </code></pre>
  
  <p>but when I do play("mysound.wav"); on my code nothing append, I verify return value and no problem. so any idea ? thanks</p>
  
  <pre><code>void Sound::play(const std::string &amp;filename)
  {
    FMOD_System_CreateStream(this-&gt;sys, filename.c_str(), FMOD_HARDWARE | FMOD_LOOP_OFF | FMOD_2D, 0, &amp;this-&gt;explosion);
    FMOD_System_PlaySound(sys, FMOD_CHANNEL_FREE, explosion, 0 , &amp;channel1);
          std::cout &lt;&lt; "playayayyayayayayya" &lt;&lt; std::endl;
  }
  </code></pre>