Interface: AnalyzeOptions
Defined in: analyzer.ts:189
Properties
end?
end?: number;
Defined in: analyzer.ts:205
End of the analyzed range in seconds (exclusive). Default: end of file.
framesPerBucket?
framesPerBucket?: number;
Defined in: analyzer.ts:199
Exact bucket size in frames. Overrides maxBuckets.
maxBuckets?
maxBuckets?: number;
Defined in: analyzer.ts:197
Upper bound on the number of buckets (per channel). The bucket size is 256 frames (≈ 5.8 ms at 44.1 kHz), raised as needed to stay within this bound. Default 100 000 — enough to zoom deep into an hour of audio. Use a small value (e.g. 1 000) when you only draw a few dozen bars, such as in chat bubbles or lists: it saves memory (12 bytes per bucket and channel).
onProgress?
onProgress?: (fraction) => void;
Defined in: analyzer.ts:213
Called with the analyzed fraction (0…1), at most every 1%, ending with 1.
Parameters
| Parameter | Type |
|---|---|
fraction | number |
Returns
void
signal?
signal?: AbortSignal;
Defined in: analyzer.ts:211
Cancels the analysis; the promise rejects with an AbortError. A download
in progress is not interrupted: it finishes in the background and is
cached for the next call.
splitChannels?
splitChannels?: boolean;
Defined in: analyzer.ts:201
Keep channels apart instead of aggregating them into one. Default false.
start?
start?: number;
Defined in: analyzer.ts:203
Start of the analyzed range in seconds. Default 0.