mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
* Remove requiring the features argument * Update meyda-tests.ts * Fix constructor options based on runtime * Add more tests
27 lines
486 B
TypeScript
27 lines
486 B
TypeScript
function dummyNumbers(a: number): void {}
|
|
|
|
const AC = new AudioContext();
|
|
|
|
const result = Meyda.extract('rms', []);
|
|
if (result) {
|
|
if (result.zcr) {
|
|
dummyNumbers(result.zcr);
|
|
}
|
|
}
|
|
|
|
const analyzer = Meyda.createMeydaAnalyzer({
|
|
audioContext: AC,
|
|
source: AC.createOscillator(),
|
|
bufferSize: 2048,
|
|
});
|
|
|
|
Meyda.windowing([], Meyda.windowingFunction);
|
|
|
|
analyzer.start();
|
|
analyzer.stop();
|
|
analyzer.get();
|
|
|
|
analyzer.start('rms');
|
|
analyzer.stop();
|
|
analyzer.get(['rms']);
|