Skip to content

Commit

Permalink
Adding debugging for #1
Browse files Browse the repository at this point in the history
  • Loading branch information
twystd committed Feb 14, 2024
1 parent 91359b3 commit a278729
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions html/javascript/worklets/sn.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,21 @@ export class SN extends AudioWorkletProcessor {
}

process (inputs, outputs, parameters) {
const out = outputs[0]
const samples = out[0].length
console.log('>> debug sn::process outputs:', outputs)

if (this.paused) {
this.pause(out, samples, parameters)
} else {
this.synthesize(out, samples, parameters)
if (outputs != null && outputs.length > 0) {
const out = outputs[0]

console.log('>> debug sn::process out:', out)
if (out != null && out.length > 0) {
const samples = out[0].length

if (this.paused) {
this.pause(out, samples, parameters)
} else {
this.synthesize(out, samples, parameters)
}
}
}

return true
Expand Down

0 comments on commit a278729

Please sign in to comment.