User-created sounds not playing in FMOD with pthreads

I’m trying to set up the pthread-enabled wasm port. Everything seems alright, except sounds that are played by programmer sounds are silent. Swapping fmodstudioPL.js with fmodstudioL.js makes all sounds audible.

All sounds are loaded without the nonblocking flag. The exact same code works with the single-threaded version, and is silent with the pthread version.

Sounds doesn’t sound like a word anymore.

Is there something different about how programmer sounds are created with multiple threads?

Thanks :slight_smile:

This is not documented well in FMOD 2.3. Im attaching a section from the upcoming revamped HTML5 release in 2.4. Your relevant entry is the FMOD_STUDIO_EVENT_CALLBACK section.

--

The ‘P’ versions of the FMOD libraries support threaded mixing, streaming and FMOD_NONBLOCKING support.

An important limitation to note is that user callbacks will not fire from a pthread, as JavaScript objects cannot be shared between threads.
The table below lists if certain callbacks are supported at all, and if they are, conditions with different types of callbacks are marked with a ? in the ‘Note’ column.