Commit graph

8 commits

Author SHA1 Message Date
Rob Watson
0b300afefe wasm backends: Avoid a heap allocation in default_output_config() 2020-09-11 11:39:43 +02:00
Rob Watson
b5b6014edf wasm backends: Fix default_output_config behaviour 2020-09-11 09:29:00 +02:00
JoshuaBatty
7c1adce330 adds support for buffersizes in webaudio and emscripten 2020-05-27 12:05:55 +02:00
mitchmindtree
f03fd69b65 [webaudio] Return Err instead of panicking on input device requests
Currently we are yet to implement input stream support for CPAL's
webaudio host. Instead of panicking, we should return an
error, None or empty iterator in order to let the user write well
behaved cross-platform apps and notify the user accordingly rather than
crashing.
2020-05-25 19:26:42 +02:00
mitchmindtree
1dfdeace25 Add implementation of supported stream configs for webaudio
The `supported_stream_configs` method now returns the range of
configurations that are required to be supported for
`BaseAudioContext.createBuffer()` as mentioned here:

https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createBuffer

That is, valid stream configurations are now considered to be any
configuration that has:

- 1 <= channel_count <= 32 and
- 8khz <= sample_rate <= 96khz
- sample_format == f32

Closes #410.
Closes #411.
2020-05-25 13:19:52 +02:00
mitchmindtree
78e1796ba8 Add callback and playback timestamp implementation for webaudio stream 2020-05-22 14:35:29 +02:00
mitchmindtree
640a1d39ed Rebase/Update webaudio PR for recent breaking changes
This rebases #372, addressing the recent changes introduced by #397, #395, and #371 in the process.

TODO:

- [ ] Complete implementation of `callback` and `playback` timestamps in the output stream callback.
2020-05-21 16:16:23 +02:00
Damian Peckett
6f43fc2b60 Add a wasm-bindgen based generic Web Audio backend. 2020-05-06 13:44:00 +02:00