This commit is contained in:
2026-01-21 09:04:43 -06:00
parent 9d722c59c2
commit 89bd583e18

View File

@@ -190,7 +190,7 @@ soundwave.create = function(opts) {
var v = player.voices[i] var v = player.voices[i]
var done = v.stopped || (!v.loop && v.pos >= v.source.frames) var done = v.stopped || (!v.loop && v.pos >= v.source.frames)
if (!done) { if (!done) {
active.push(v) push(active, v)
} else if (v.finish_hook) { } else if (v.finish_hook) {
v.finish_hook() v.finish_hook()
} }
@@ -216,7 +216,7 @@ soundwave.create = function(opts) {
if (opts.vol != null) newvoice.vol = opts.vol if (opts.vol != null) newvoice.vol = opts.vol
} }
player.voices.push(newvoice) push(player.voices, newvoice)
return newvoice return newvoice
} }
@@ -233,8 +233,8 @@ soundwave.create = function(opts) {
if (v.stopped) continue if (v.stopped) continue
var chunk = pull_voice_chunk(v, frames) var chunk = pull_voice_chunk(v, frames)
if (chunk) { if (chunk) {
blobs.push(chunk) push(blobs, chunk)
vols.push(v.vol) push(vols, v.vol)
} }
} }