Wrapper for the main AudioContext and umbrella for all Web Audio API-related utilities.
- Source:
Interfaces
Namespaces
Methods
(static) context() → {AudioContext}
Returns the main AudioContext
.
- Source:
Returns:
- Type
- AudioContext
(static) export(optionsopt) → {MediaRecorder}
Records the output of the provided input and exports it as a WebM file. When no duration is passed, the MediaRecorder must be stopped to complete the export.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Properties
|
- Source:
Returns:
- Type
- MediaRecorder
(static) nyquist(coefficientopt) → {Number}
Returns the Nyquist frequency for the current sample rate multiplied by an optional coefficient.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
coefficient |
Number |
<optional> |
1 |
Returns:
- Type
- Number
(static) start()
Resumes the main AudioContext
.
Must be called after the first user gesture so playback works in all browsers.
- Source:
(static) stop()
Suspends the main AudioContext
.
- Source:
(static) time(durationopt) → {Number}
Returns the currentTime
for the main AudioContext
plus an optional duration and lookahead time.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
duration |
Number |
<optional> |
0 |
- Source:
- See:
Returns:
- Type
- Number
(static) zeroTime() → {Number}
Returns the next appreciable timestamp.
Returns:
- Type
- Number