Calling CreateSound() in FMOD version 0x00044110 on a wav file loaded into memory and it’s consistently returning FMOD_ERR_INVALID_PARAM. Keep in mind I was able to successfully call CreateSound() on the same wave file just passing the filename without error (however now I need it to be loaded from memory).

Any ideas as to how to get this working would be nice. Is ‘mode’ set to the correct flag? Is FMOD_CREATESOUNDEXINFO missing something? Here is the code snidbit:

            FMOD_CREATESOUNDEXINFO info;   
            memset(&info, 0, sizeof(FMOD_CREATESOUNDEXINFO)); 

            FileHandle file = FILESYSTEM->OpenFile( filename, "rb");
            int length = FILESYSTEM->FileSize( file );
            info.cbsize = sizeof(FMOD_CREATESOUNDEXINFO);
            info.length = length;

             char *buf = new char[ length ];
            FILESYSTEM->FileRead( buf, length, file );
            FILESYSTEM->FileClose( file );

            mode = FMOD_OPENMEMORY_POINT;//Also tried FMOD_OPENMEMORY

            result = m_System->createSound( buf, mode, &info, &sfx);//Returns FMOD_ERR_INVALID_PARAM


  • You must to post comments

All I can think of there is cbsize is wrong – ie you updated the DLL but didn’t update the header? or vice versa? (so FMOD_CREATESOUNEXINFO has different sizes)

using fmodexL version of the library can log the issue with most errors as well, it might tell you exactly what the invalid parameter was.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.