Refactoring
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user