-
Notifications
You must be signed in to change notification settings - Fork 399
Add support for Web Audio (Emscripten/WebAssembly) #887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
fwcd
wants to merge
32
commits into
PortAudio:master
Choose a base branch
from
fwcd:wasm
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 4 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
448425f
Add emscripten_sleep implementation of Pa_Sleep
fwcd 01f8f8d
Stub out Web Audio hostapi based on skeleton
fwcd a8aee40
Create an audio context and enable audio worklets
fwcd ac876e6
Make sure that PortAudio and consumers are compiled with -pthread
fwcd 0770e36
Add a README.md for building/testing the Web Audio hostapi
fwcd 8da3745
Include pa_debugprint
fwcd 848fbdd
Set up a basic 2-channel default output device
fwcd da02a65
Add experimental Emscripten/Wasm CI
fwcd c1a6865
Disable jack feature when targeting emscripten
fwcd 1706a88
Set VCPKG_CHAINLOAD_TOOLCHAIN_FILE in CI
fwcd be3f169
Disable unavailable -Wno-error=stringop-overflow
fwcd 692d915
Rename to WebAudioHostProcessingLoop
fwcd 83eb5a5
Experimentally set up Wasm Audio Worklet
fwcd 1431da1
Create a separate audio context per stream
fwcd a02a4e2
Implement IsStreamStopped and IsStreamActive
fwcd 42bdb7c
Update comments
fwcd d27dbc5
Add missing newlines to debug statements
fwcd d2639d6
Add some tips
fwcd 33c679a
Await context suspend/resume
fwcd 6e356cd
Wait for user interaction when attempting to resume context
fwcd c8d1abf
Add note on user interaction
fwcd edffb12
Handle the buffers in host loop properly
fwcd deb8a57
Use C wrapper for querying audio context state
fwcd 4057598
Connect node to context destination
fwcd 6d2ff90
Set sample rate during audio context creation
fwcd a2102c5
Use proper host format (non-interleaved 32-bit float)
fwcd 47d4202
Format code towards the prevalent style
fwcd 6375db9
Add utility function for suspension and suspend initially
fwcd 831c636
Add PA_WEBAUDIO_ASYNCIFY and experimental synchronous mode
fwcd c80758a
Experimentally build examples with PROXY_TO_PTHREAD
fwcd 3a6a5b7
Add checks to not block the main thread
fwcd c9015e5
Add missing <emscripten/threading.h> import
fwcd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| pa_hostapi_skeleton.c provides a starting point for implementing support for a new host API with PortAudio. The idea is that you copy it to a new directory inside /hostapi and start editing. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.