# ERR\_INVALID\_PARAM when creating low level sound in Unity

**URL:** <https://qa.fmod.com/t/err-invalid-param-when-creating-low-level-sound-in-unity/13610>\
**Category:** FMOD Engine\
**Created:** [December 23, 2017, 9:48pm UTC](https://qa.fmod.com/t/err-invalid-param-when-creating-low-level-sound-in-unity/13610 "2017-12-23T21:48:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![KarateKidzz](https://avatars.discourse-cdn.com/v4/letter/k/c37758/32.png) [@KarateKidzz](https://qa.fmod.com/u/KarateKidzz)\
**Post date:** [December 23, 2017, 9:48pm UTC](https://qa.fmod.com/t/err-invalid-param-when-creating-low-level-sound-in-unity/13610/1 "2017-12-23T21:48:46Z")

</div>

I have begun delving into the low-level API and have so far recreated the net\_stream example in Unity and added some DSP effects onto this.

I am now wanting to create a sound to be placed in the world but am getting an ERR\_INVALID\_PARAM.

Here is the section of code:

string absolutePath = Path.GetFullPath(file);  
CREATESOUNDEXINFO exInfo = new CREATESOUNDEXINFO();  
result = system.createSound(absolutePath, MODE.CREATESTREAM, ref exInfo, out sound);  
print(result);

I have tried using MODE.DEFAULT as well as messing around a little with the exInfo but to no success. I’m thinking it’s something to do with the file path but feel I am missing something.

Oh, and using the same file (full path, not the file name) in the play\_sound example gives the same error.

Any help will be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![KarateKidzz](https://avatars.discourse-cdn.com/v4/letter/k/c37758/32.png) [@KarateKidzz](https://qa.fmod.com/u/KarateKidzz)\
**Post date:** [December 24, 2017, 3:46pm UTC](https://qa.fmod.com/t/err-invalid-param-when-creating-low-level-sound-in-unity/13610/2 "2017-12-24T15:46:58Z")

</div>

Fix: Choose the createSound method that doesn’t take in a CREATESOUNDEXINFO.

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [December 27, 2017, 9:08pm UTC](https://qa.fmod.com/t/err-invalid-param-when-creating-low-level-sound-in-unity/13610/3 "2017-12-27T21:08:49Z")

</div>

Using CREATESOUNDEXINFO is for passing more information to the system when creating a sound. There are certain member variables of the CREATESOUNDEXINFO that need to be set otherwise you will get an ERR\_INVALID\_PARAM, which means the CREATESOUNDEXINFO you passed in is not valid.

If you do not wish to use or specify a CREATESOUNDEXINFO, you can use the functions that do not take in a CREATESOUNDEXINFO.
