# FMOD\_OS\_File\_Open : fopen failed to open 'RIFFئf', errno = 44

**URL:** <https://qa.fmod.com/t/fmod-os-file-open-fopen-failed-to-open-riff-f-errno-44/22400>\
**Category:** Unity\
**Created:** [December 12, 2024, 10:01am UTC](https://qa.fmod.com/t/fmod-os-file-open-fopen-failed-to-open-riff-f-errno-44/22400 "2024-12-12T10:01:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AdarshJ](https://avatars.discourse-cdn.com/v4/letter/a/22d042/32.png) [@AdarshJ](https://qa.fmod.com/u/AdarshJ)\
**Post date:** [December 12, 2024, 10:01am UTC](https://qa.fmod.com/t/fmod-os-file-open-fopen-failed-to-open-riff-f-errno-44/22400/1 "2024-12-12T10:01:10Z")

</div>

Hi FMOD community,

For the unity webgl build I am getting above error.

I am using player instrument to play dialogues, this works fine in editor, but it’s throwing following errors in webgl build  
[FMOD] FMOD\_OS\_File\_Open : fopen failed to open ‘RIFFئf’, errno = 44  
[FMOD] System::createSound(RIFFئf, 128, 0xa5deb8, 0xa5dea8) returned ERR\_FILE\_NOTFOUND for SYSTEM (0x4D43920).  
[FMOD] EventInstance::createProgrammerSoundImpl : Programmer sound callback for instrument ‘0’ returned no sound.

PFA code for the same.  
Any help is appreciated.

```auto
        internal void PlayVoiceAudioClip(string key, Action _callback)
        {
            if(_voiceEventReference.IsNull){ return;}
            StopVoiceAudio();
            _voiceEventInstance = FMODUnity.RuntimeManager.CreateInstance(_voiceEventReference);

            GCHandle stringHandle = GCHandle.Alloc(key, GCHandleType.Pinned);
            _voiceEventInstance.setUserData(GCHandle.ToIntPtr(stringHandle));
            _voiceEventInstance.setCallback(_voiceCallback);

            _voiceEventInstance.start();
            _voiceEventInstance.release();

        }
        [AOT.MonoPInvokeCallback(typeof(FMOD.Studio.EVENT_CALLBACK))]
    static FMOD.RESULT VoiceCallback(FMOD.Studio.EVENT_CALLBACK_TYPE type, IntPtr instancePtr, IntPtr parameterPtr)
    {
        FMOD.Studio.EventInstance instance = new FMOD.Studio.EventInstance(instancePtr);

        // Retrieve the user data
        IntPtr stringPtr;
        instance.getUserData(out stringPtr);

        // Get the string object
        GCHandle stringHandle = GCHandle.FromIntPtr(stringPtr);
        String key = stringHandle.Target as String;
        
        switch (type)
        {
            case FMOD.Studio.EVENT_CALLBACK_TYPE.CREATE_PROGRAMMER_SOUND:
            {
                FMOD.MODE soundMode = FMOD.MODE.LOOP_NORMAL | FMOD.MODE.CREATECOMPRESSEDSAMPLE | FMOD.MODE.NONBLOCKING;
                var parameter = (FMOD.Studio.PROGRAMMER_SOUND_PROPERTIES)Marshal.PtrToStructure(parameterPtr, typeof(FMOD.Studio.PROGRAMMER_SOUND_PROPERTIES));

                FMOD.Studio.SOUND_INFO dialogueSoundInfo;

                FMOD.RESULT keyResult = FMOD.RESULT.ERR_NOTREADY;
                keyResult = FMODUnity.RuntimeManager.StudioSystem.getSoundInfo(key, out dialogueSoundInfo);
                
                if (keyResult != FMOD.RESULT.OK)
                {
                    break;
                }
                FMOD.Sound dialogueSound;
                var soundResult = FMODUnity.RuntimeManager.CoreSystem.createSound(dialogueSoundInfo.name_or_data, soundMode | dialogueSoundInfo.mode, ref dialogueSoundInfo.exinfo, out dialogueSound);
                if (soundResult == FMOD.RESULT.OK)
                {
                    var sound = new FMOD.Sound(parameter.sound);
                    parameter.sound = dialogueSound.handle;
                    parameter.subsoundIndex = dialogueSoundInfo.subsoundindex;
                    Marshal.StructureToPtr(parameter, parameterPtr, false);
                }

                break;
            }
            case FMOD.Studio.EVENT_CALLBACK_TYPE.DESTROY_PROGRAMMER_SOUND:
            {
                var parameter = (FMOD.Studio.PROGRAMMER_SOUND_PROPERTIES)Marshal.PtrToStructure(parameterPtr, typeof(FMOD.Studio.PROGRAMMER_SOUND_PROPERTIES));
                var sound = new FMOD.Sound(parameter.sound);
                sound.release();
                //CompanionCharacter.Instance.NarrationProgrammerSoundEnded();
                break;
            }
            case FMOD.Studio.EVENT_CALLBACK_TYPE.DESTROYED:
            {
                // Now the event has been destroyed, unpin the string memory so it can be garbage collected
                stringHandle.Free();
                break;
            }
        }
        return FMOD.RESULT.OK;
    }

```

---

<div class="post-metadata">

**Author:** ![Connor\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/connor_fmod/32/3685_2.png) [@Connor\_FMOD](https://qa.fmod.com/u/Connor_FMOD)\
**Post date:** [December 17, 2024, 9:33pm UTC](https://qa.fmod.com/t/fmod-os-file-open-fopen-failed-to-open-riff-f-errno-44/22400/2 "2024-12-17T21:33:46Z")

</div>

Hi,

Thank you for the code. Could I grab some more info ?

- FMOD integration  
 ![UnityVersion](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/5/513dffa13f2fbd60f6f9f0e67a9c39b7a9aad03e.png)
- Unity version
- Could I see an example key
- Are you using an audio table ([FMOD Studio | Dialogue and Localization - Audio Tables](https://fmod.com/docs/2.02/studio/dialogue-and-localization.html#audio-tables))

Thanks
