Skip to content

Demonstrating low latency Emscripten Audio, in C++, compiled to WASM with Emscripten, running in the browser.

License

Notifications You must be signed in to change notification settings

Armchair-Software/emscripten-sound-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI Build

Sound Demo for the WebGPU Emscripten Armchair Engine

A simple tone generator. Written in C++, compiled to WASM with Emscripten, running in the browser, on top of a WebGPU rendering back-end.

This primarily demonstrates the Emscripten Audio system - a C++ helper class to assist in managing Emscripten WASM Audio Worklets with a simple interface.

This is a very low-latency approach, as the sound generation runs away from the main thread, in a dedicated realtime-priority audio worklet.

For other demos, see:

Live demo

Live demo: https://armchair-software.github.io/emscripten-sound-demo/

This requires Firefox Nightly, or a recent version of Chrome or Chromium, with webgpu and Vulkan support explicitly enabled.

Dependencies

Building

The easiest way to assemble everything (including in-tree shader resource assembly) is to use the included build script:

./build.sh

To launch a local server and bring up a browser:

./run.sh

For manual builds with CMake, and to adjust how the example is run locally, inspect the build.sh and run.sh scripts.

About

Demonstrating low latency Emscripten Audio, in C++, compiled to WASM with Emscripten, running in the browser.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published