0
0

Hi,

I’m creating a sound using System::createSound() and it’s failing with FMOD_ERR_INVALID_FLOAT. I read the documentation but the description of the error isn’t very helpful. Basically the code wrapped around FMOD has been used for almost a year, and I just now updated FMOD to the latest version and started getting different error messages. Something I’m doing that used to work on an old version no longer works on this new version.

Here’s the source code:

[code:12n5u0ki]
char* data = FileIO::LoadFileZ( soundFile, length);

if(!data || !length)
{
    delete[] data;
    return;
}

// Second, format an FMOD structure to describe the raw WAV data
FMOD_CREATESOUNDEXINFO sndinfo = {0};

sndinfo.cbsize              = sizeof(sndinfo);
sndinfo.length              = length;
sndinfo.numchannels         = 1;
sndinfo.defaultfrequency    = 11025;
sndinfo.format              = FMOD_SOUND_FORMAT_PCM8;

// Third, create an FMOD::Sound object for the playable raw data
u32 soundFlags = FMOD_SOFTWARE | FMOD_2D | FMOD_LOOP_NORMAL | FMOD_OPENMEMORY | FMOD_OPENRAW;
err = mSystem->createSound(data, soundFlags, &sndinfo, &newsound);
delete[] data;[/code:12n5u0ki]

Any ideas on why I’m getting this error message? Any help is greatly appreciated. Thanks!

  • You must to post comments
0
0

False alarm, sorry. I forgot to use the new version of the DLL :(

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.