new Microphone(options, @param)
This manager handles the recording of audio signal.
Parameters:
Name | Type | Attributes | Default | Description | ||||||
---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
Properties
|
||||||||
@param |
module:core.Window | options.win - the associated Window | ||||||||
options.format |
string |
<optional> |
'audio/webm;codecs=opus' | the format for the audio file | ||||||
options.sampleRateHz |
number |
<optional> |
48000 | the audio sampling rate, in Hz | ||||||
options.clock |
Clock |
<optional> |
an optional clock | |||||||
options.autoLog |
boolean |
<optional> |
false | whether or not to log |
- Source:
Members
flush
Submit a request to flush the recording.
- Source:
pause
Submit a request to pause the recording.
- Source:
resume
Submit a request to resume the recording.
resume has no effect if the recording was not previously paused.
- Source:
start
Submit a request to start the recording.
Note that it typically takes 50ms-200ms for the recording to actually starts once a request to start has been submitted.
- Source:
stop
Submit a request to stop the recording.
- Source:
Methods
(protected) _onChange()
Callback for changes to the recording settings.
Changes to the settings require the recording to stop and be re-started.
- Source:
(protected) _prepareRecording()
Prepare the recording.
- Source:
download(filename)
Offer the audio recording to the participant as a sound file to download.
Parameters:
Name | Type | Description |
---|---|---|
filename |
string | the filename |
- Source:
getRecording(tag, flushopt)
Get the current audio recording as an AudioClip in the given format.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
tag |
string | an optional tag for the audio clip | ||
flush |
boolean |
<optional> |
false | whether or not to first flush the recording |
- Source:
upload(tag)
Upload the audio recording to the pavlovia server.
Parameters:
Name | Type | Description |
---|---|---|
tag |
string | an optional tag for the audio file |
- Source: