HTML5 engine - 2.03.03
using fmodstudioL.wasm
banks loaded via memory
I have a simple audio table and an event with a single programmer instrument. I have this code (below) in my CREATE_PROGRAMMER_SOUND
callback, but the error (described below code snippet) occurs when running this code in any context, not just in an event callback.
this.hostKey
is a string. getSoundInfo
throws when the sound name is not found in the table, so it knows the table exists and returns sound info correctly.
const info = audioSystem.FMOD.STUDIO_SOUND_INFO();
audioSystem.assert(audioSystem.system.getSoundInfo(this.hostKey, info));
const soundVal: any = {};
audioSystem.assert(audioSystem.core.createSound(info.name_or_data, info.mode & ~audioSystem.FMOD.OPENMEMORY_POINT | audioSystem.FMOD.OPENMEMORY, info.exinfo, soundVal));
The issue occurs when calling createSound
here. It throws ERR_FORMAT: Unsupported file or audio format.
Preceding this error is also the following trace:
[LOG] SystemI::createSoundInternal : Create data=0x5a8970, mode=0x00000A00
[LOG] SystemI::createSoundInternal : exinfo->cbsize = 144
[LOG] SystemI::createSoundInternal : exinfo->length = 15237152
[LOG] SystemI::createSoundInternal : exinfo->fileoffset = 7936
[LOG] SystemI::createSoundInternal : exinfo->numsubsounds = 1
[LOG] SystemI::createSoundInternal : exinfo->inclusionlist = 0x5a869c
[LOG] SystemI::createSoundInternal : exinfo->inclusionlistnum = 1
[LOG] SystemI::createSoundInternal : exinfo->dlsname =
[LOG] SystemI::createSoundInternal : exinfo->encryptionkey =
[LOG] SystemI::createSoundInternal : exinfo->suggestedsoundtype = 5
[ERR] CodecOggVorbis::openInternal : failed to open as ogg
[ERR] CodecMOD::openInternal : 'M.K.' etc ID check failed [???]
[ERR] CodecS3M::openInternal : 'SCRM' ID check failed [????]
[ERR] CodecXM::openInternal : 'Extended Module: ' ID check failed [????]
[ERR] CodecIT::openInternal : 'IMPM' etc ID check failed [????]
[ERR] CodecMIDI::openInternal : 'HThd' ID check failed [????]
[ERR] CodecMPEG::openInternal : failed to open as mpeg
The sounds in the audio table are .ogg
vorbis files, but the error and trace were identical when I tested with a .wav
file.
I have also tried playing around with the flags for createSound
to no avail (other than receiving errors from using OPENMEMORY_POINT
with memory-loaded banks).