# Core API playing a sound

**URL:** <https://qa.fmod.com/t/core-api-playing-a-sound/15532>\
**Category:** Unity\
**Created:** [March 9, 2020, 4:54pm UTC](https://qa.fmod.com/t/core-api-playing-a-sound/15532 "2020-03-09T16:54:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PeteDE](https://avatars.discourse-cdn.com/v4/letter/p/49beb7/32.png) [@PeteDE](https://qa.fmod.com/u/PeteDE)\
**Post date:** [March 9, 2020, 4:54pm UTC](https://qa.fmod.com/t/core-api-playing-a-sound/15532/1 "2020-03-09T16:54:03Z")

</div>

Hi,  
So I’ve been using FMOD Studio for a long time, but for a new game that I am working on I want to use the core API. I have been having some trouble being able to play the first sound. My code compiles fine, but I don’t hear anything and can’t seem to find out where it’s going wrong.

Could anyone tell me what I am doing wrong / not understanding?

```
    var corSystem = FMODUnity.RuntimeManager.CoreSystem;
    uint version;
    corSystem.getVersion(out version);

    Sound sound;
    corSystem.createSound("filename.wav", MODE.DEFAULT, out sound);

    ChannelGroup channelgroup;
    corSystem.createChannelGroup("master", out channelgroup);

    Channel channel;
    corSystem.playSound(sound, channelgroup, false, out channel);

```

Thanks!

---

<div class="post-metadata">

**Author:** ![alexzzen](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/alexzzen/32/6825_2.png) [@alexzzen](https://qa.fmod.com/u/alexzzen)\
**Post date:** [March 9, 2020, 6:13pm UTC](https://qa.fmod.com/t/core-api-playing-a-sound/15532/2 "2020-03-09T18:13:16Z")

</div>

If your wav file is inside the assets folder the correct path would be “Assets/filename.wav”. In any case you can check what createSound returns, if it can’t find the file it will return `ERR_FILE_NOTFOUND`:

```
    Sound sound;
    var result = corSystem.createSound("Assets/filename.wav", MODE.DEFAULT, out sound);
    UnityEngine.Debug.Log(result);
```

---

<div class="post-metadata">

**Author:** ![PeteDE](https://avatars.discourse-cdn.com/v4/letter/p/49beb7/32.png) [@PeteDE](https://qa.fmod.com/u/PeteDE)\
**Post date:** [March 9, 2020, 8:35pm UTC](https://qa.fmod.com/t/core-api-playing-a-sound/15532/3 "2020-03-09T20:35:24Z")

</div>

Thanks the issue was indeed the path! I wrongly assumed the path would be relative to the class
