title: Loading FMOD sound bank on Android and cocos2d-x
body: <p>I have a game that is running on iOS and Win32 written using cocos2d-x c++.  I also use FMOD Studio for sound in the game.</p>
  
  <p>I am now porting the game to Android, and I am having issues with FMOD on Android.  I assume the issue is related to asset loading.  </p>
  
  <p>Currently the sound system initializes successfully.  I use the following code to load banks, which works on iOS and Windows:</p>
  
  <pre><code>void FMODWrapper::loadBank(const char * bankFile)
  {
      FMOD_RESULT result;
      std::string path = FileUtils::getInstance()-&gt;fullPathForFilename(bankFile);
  
      FMOD::Studio::Bank *bank;
      if (path.size() &gt; 0)
      {
          result = system-&gt;loadBankFile(path.c_str(), FMOD_STUDIO_LOAD_BANK_NORMAL, &amp;bank);
          if (result != FMOD_OK)
          {
  #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
                  LOGD("FMOD error! Unable to load bank: %s %d\n", path.c_str(), result);
  #else
                  printf("FMOD error! Unable to load bank: %s\n", path.c_str());
  #endif
          }
          _loadedBanks.push_back(bank);
      }
  }
  </code></pre>
  
  <p>When I run this with the FMOD debug libs I get the following output:</p>
  
  <blockquote>
    <p>11-02 20:48:50.173: I/fmod(2459): FMOD:
    AsyncCommand_system_loadBankFile::executeMain : Failed to open file
    'assets/Sound/MX_AND_SFX_MASTER_BANK.bank' 11-02 20:48:50.173:
    I/fmod(2459): ../../src/fmod_asynccommand_impl.cpp(443) : FMOD error
    (20) : File not found.  11-02 20:48:50.173: I/fmod(2459): FMOD:
    Debug_OutputTrace              :
    ../../src/fmod_asynccommand_impl.cpp(443) : FMOD error (20) : File not
    found.</p>
  </blockquote>
  
  <p>assets/Sound/MX_AND_SFX_MASTER_BANK.bank is correct as far as where my assets reside in my eclipse project.</p>
  
  <p>Anyone have any insight on what I should be passing in to the loadBankFile() call.</p>
  
  <p>Also, I tried using loadBankMemory with FileUtils::getDataFromFile().  This resulted in sound being played, but it was just noise. So not quite what I am looking for.</p>