I’m currently writing an 2D-graphic-engine for a game called tears of blood. therefore, ialso wanted to include sound using fmod ex.

i looked also in this forum for an answer but i didn’t find one. so i try to explain my problem:

i use vs8 and fmod ex, i have a soundcard (MS-tech CMI8738) which supports hardware-sound, c++.

now i have a very simple program to load a wave (first of all i try a wave) and fmod isnt able to create the sound i show the code:


include <fmod.hpp>

include <windows.h>

include <iostream>

FMOD::System *m_lpSystem;
FMOD::Sound *m_lpSound;
FMOD::Channel *m_lpChannel = 0;

void main(void)



the debugger returns invalid parameter and m_lpSound is 0. the location of the sound is an the exe and the projects directory so the sound really exists. please help, other forums weren’t able to.

  • You must to post comments

oh thanx, it works!!!

but i dint understand why. the reason was as you mention the paramter FMOD_HARDWARE. i switched to FMOD_DEFAULT and everything works right. but in the sample i’ve loaded was FMOD_HARDWARE and it worked. this is confusing but it works.
also i switched from the pluginversion to full dll/lib. maybe that was also a reason.

  • You must to post comments

if it was the plugin version you probably didnt have the plugin for .wav located in the right place or didnt even load it.

  • You must to post comments

It could be a number of reasons. It shouldnt be invalid parameter, but if you get an error, just run the logging version of the dll and it will tell you exactly what went wrong.

  • your file is probably too big – you should have used createStream not createSound.
  • your driver is possibly misbehaving when you selected FMOD_HARDWARE, use the recommended startup sequence.
  • You dont seem to be checking any errors, but i assume you’re using the debugger to get the returned values.
  • The file format is using a non pcm codec which isnt supported on your machine.

Notice that the playsound example does exactly what you are doing, you should have been able to compare yours to it to tell if it was the file that was to blame or not.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.