feat: true RMS dBFS level measurement for LevelMeterFab via getFloatTimeDomainData

This commit is contained in:
daniel-c-harvey
2026-06-08 14:40:11 -04:00
parent 9cbc09edf7
commit 58725c4646
5 changed files with 150 additions and 29 deletions
@@ -463,6 +463,18 @@ export class AudioPlayer {
this.contextManager.getSpectrumAnalyzer().removeCallback(callbackId);
}
getLevelDb(): number {
return this.contextManager.getSpectrumAnalyzer().getLevelDb();
}
startLevelAnimation(callbackId: string, callback: (db: number) => void): void {
this.contextManager.getSpectrumAnalyzer().addLevelCallback(callbackId, callback);
}
stopLevelAnimation(callbackId: string): void {
this.contextManager.getSpectrumAnalyzer().removeLevelCallback(callbackId);
}
// ==================== Private Methods ====================
private resetState(): void {