Answered
0
0

Using 1.07.07 and UE4 4.10.4 on PC. When we call FMOD::System::createSound to create a user-created sound, we get this warning message:

LogFMOD:Warning: c:\jk\workspace\Build__1.7__UE4Libs_Win\lowlevel_api\src\fmod_file.cpp(545) - File offset: 0 + length: 512 > actual file size 0, truncating length.

Are we doing something wrong? Or does it just always spit out this warning in this situation, when there is no file involved?

This is our code:

auto* StudioSystem = IFMODStudioModule::Get().GetStudioSystem(EFMODSystemContext::Runtime);
FMOD::System* System;
FMOD_RESULT result = StudioSystem->getLowLevelSystem(&System);

FMOD_CREATESOUNDEXINFO exinfo;
memset(&exinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO));
exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO);
exinfo.numchannels = 1;
exinfo.defaultfrequency = CHAT_BUFFER_SIZE;
exinfo.decodebuffersize = CHAT_AUDIO_REQUEST_BUFFER_SIZE;
exinfo.length = CHAT_AUDIO_REQUEST_BUFFER_SIZE * exinfo.numchannels * sizeof(uint8);
exinfo.format = FMOD_SOUND_FORMAT_PCM16;
exinfo.pcmreadcallback = pcmreadcallback;

result = System->createSound(0, FMOD_OPENUSER | FMOD_LOOP_NORMAL | FMOD_CREATESTREAM, &exinfo, &Sound);
  • You must to post comments
Best Answer
0
0

Hi Mike,
The warning can be ignored. It looks like user ‘files’ that come out of the OPENUSER flag are 0 length, therefore triggering that warning. We’ll add a filter to stop that warning being printed out for OPENUSER sounds for the next release.
regards,
Brett

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.