Records a sound of given duration in seconds, after
a buffer also in seconds, and
returns a Sound promise: a nullary function
that returns a Sound. Example:
init_record();
const promise = record_for(2, 0.5);
// In next query, you can play the promised Sound, by
// applying the promise:
play(promise());
Parameters
duration: number
duration in seconds
buffer: number
pause before recording, in seconds
Returns (() => Sound)
promise: nullary function which returns recorded Sound
Records a sound of given
duration
in seconds, after abuffer
also in seconds, and returns a Sound promise: a nullary function that returns a Sound. Example: