Refactoring

This commit is contained in:
2025-10-15 01:41:52 +02:00
parent e492c03f15
commit 8e6b07797c
11 changed files with 180 additions and 173 deletions

View File

@ -4,6 +4,7 @@ export interface CsoundEngineOptions {
onMessage?: (message: string) => void;
onError?: (error: string) => void;
onPerformanceEnd?: () => void;
onAnalyserNodeCreated?: (node: AnalyserNode) => void;
}
export class CsoundEngine {
@ -145,6 +146,7 @@ export class CsoundEngine {
this.scopeNode.connect(this.audioContext.destination);
this.log('Analyser node created and connected');
this.options.onAnalyserNodeCreated?.(this.scopeNode);
} catch (error) {
console.error('Failed to setup analyser:', error);
this.log('Error setting up analyser: ' + error);