openframeworks / openframeworks/openFrameworks
How to use Emscriptens audioProcess function for audioWorklets with ofSoundstreams buffer?
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
Right now I need to make some changes to Emscriptens audioWorklet branch, because I process the audio on the JS side, while the audioWorklet branch expects the audio to be processed on the c++ side.
This is a simple Emscripten audioWorklet test / example: https://github.com/juj/emscripten/blob/audio_worklets/test/webaudio/tone_generator.c
And this is how I implemented it:
https://github.com/Jonathhhan/openFrameworks/blob/emscripten_3.1.9_audioWorklet/addons/ofxEmscripten/src/ofxEmscriptenSoundStream.cpp
https://github.com/Jonathhhan/openFrameworks/blob/emscripten_3.1.9_audioWorklet/addons/ofxEmscripten/libs/html5audio/lib/emscripten/audio_worklet.js
It would be nice to change the implementation in a way, that it runs without any modifications of the Emscripten source code.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the Emscripten tone_generator.c example with addons/ofxEmscripten/src/ofxEmscriptenSoundStream.cpp and addons/ofxEmscripten/libs/html5audio/lib/emscripten/audio_worklet.js. Determine how audio processing should be shared between JavaScript and C++ for ofSoundStream buffers, then verify the implementation works without modifying Emscripten source.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, javascript, wasm
- Domain
- audio-video-rtc
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100