[AUDIO_WORKLET] Add multichannel audio tests. NFC#23394
[AUDIO_WORKLET] Add multichannel audio tests. NFC#23394sbc100 merged 7 commits intoemscripten-core:mainfrom
Conversation
|
I love that Tim Wright composed our audio tests :) Please tell him I was a great fan or Lemmings and Shadow of the Beast 2 back in the day. |
😁
Now we'll need to widen the office doors even more to let in his ego! |
| EM_JS(EMSCRIPTEN_WEBAUDIO_T, createTrack, (EMSCRIPTEN_WEBAUDIO_T ctxID, const char* url, bool looping), { | ||
| var context = emscriptenGetAudioObject(ctxID); | ||
| if (context) { | ||
| var audio = document.createElement('audio'); |
There was a problem hiding this comment.
Why are these two JS functions needed? Is this functionality not available though existing emscripten APIs?
Are folks expected to create their own audio elements like this?
There was a problem hiding this comment.
Yep, there's no provision (that I know of) to create audio tracks.
In reality the audio will probably come in via other means (we decode and mix Opus files, for example, or generate effects).
95edc47 to
28c72a5
Compare
The code that doesn't undergo a single change is now in its own file
cf4c0b9 to
2b6fe3e
Compare
|
@juj please review if / when you get a chance |
These are the audio worklet tests from #22753 extracted to a standalone PR. The tests are:
The tests use different stack sizes (from 2kB to 6kB depending on the requirement).
The audio tracks were composed by Tim Wright especially for Emscripten and released under a CC0 license.
The tests can be run manually via:
There are no code changes to Emscripten apart from integrating the test.