Skip to content

Update examples/webaudio for 2025 #1

@joeljaffesd

Description

@joeljaffesd

Hi Marek,

I'm a university student working on a project of similar nature to cppsketch, in particular, the audioweb example.
When I build and serve the project for the web, I encounter the following issues:

  1. When building, em++ complains about the -sEXTRA_EXPORTED_RUNTIME_METHODS=['cwrap', 'ccall'] flag, the modern equivalent is simply EXPORTED_RUNTIME_METHODS.
  2. When serving, I get a deprecation warning regarding the use of ScriptProcessorNode rather than AudioWorklet, and the following error starts piling up at what seems to be the block rate:
Uncaught TypeError: Cannot read properties of undefined (reading 'buffer')
    at audioCallback (audio.js:47:49)
    at scriptNode.onaudioprocess (audio.js:100:3)

I've created a fork that handles the compilation flag, and am working towards solving the TypeError. My ultimate goal is to create a system that uses CodeMirror to allow for rapid iteration and testing of C++ audio code without a local dev env, something like the Faust Web IDE but for C++.

I would love to collaborate, should you have the time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions