# FMOD::System::createSound fmod\_file.cpp Warning

**URL:** <https://qa.fmod.com/t/fmod-createsound-fmod-file-cpp-warning/12354>\
**Category:** FMOD Studio\
**Created:** [March 4, 2016, 9:30pm UTC](https://qa.fmod.com/t/fmod-createsound-fmod-file-cpp-warning/12354 "2016-03-04T21:30:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pwkmikekelly](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/pwkmikekelly/32/1763_2.png) [@pwkmikekelly](https://qa.fmod.com/u/pwkmikekelly)\
**Post date:** [March 4, 2016, 9:30pm UTC](https://qa.fmod.com/t/fmod-createsound-fmod-file-cpp-warning/12354/1 "2016-03-04T21:30:48Z")

</div>

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);
```

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [March 5, 2016, 2:35am UTC](https://qa.fmod.com/t/fmod-createsound-fmod-file-cpp-warning/12354/2 "2016-03-05T02:35:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![marcospgp](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/marcospgp/32/1886_2.png) [@marcospgp](https://qa.fmod.com/u/marcospgp)\
**Post date:** [January 30, 2021, 3:35pm UTC](https://qa.fmod.com/t/fmod-createsound-fmod-file-cpp-warning/12354/3 "2021-01-30T15:35:09Z")

</div>

Still getting this warning while trying to record into a sound from microphone input. Would be cool to have it removed to avoid confusion.

---

<div class="post-metadata">

**Author:** ![brett](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/brett/32/261_2.png) [@brett](https://qa.fmod.com/u/brett)\
**Post date:** [February 4, 2021, 1:26am UTC](https://qa.fmod.com/t/fmod-createsound-fmod-file-cpp-warning/12354/4 "2021-02-04T01:26:22Z")

</div>

This can be filtered by removing FMOD\_DEBUG\_LEVEL\_WARNING, but I have submitted a code change to remove the warning for 0 length files (user created).
