Skip to content

Commit

Permalink
improved logging messages to aid with debugging, see #133
Browse files Browse the repository at this point in the history
  • Loading branch information
jbphet committed Jun 14, 2021
1 parent b188c17 commit dbad965
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/PeakDetectorAudioNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,13 @@ class PeakDetectorAudioNode extends AudioWorkletNode {
}

// Load the worklet code that will run on the audio rendering thread.
console.log( 'loading peak-detector module on audio rendering thread...' );
phetAudioContext.audioWorklet.addModule( '../../tambo/js/peak-detector.js' )
.then( () => {
console.log( 'peak detector worklet loaded successfully' );
} )
.catch( err => {
console.log( `error while loading peak detector worklet: ${err}` );
console.warn( `error while loading peak detector worklet, peak detector probably won't work, error: ${err}` );
} );

tambo.register( 'PeakDetectorAudioNode', PeakDetectorAudioNode );
Expand Down

0 comments on commit dbad965

Please sign in to comment.