diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c21b66f..9e7314f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +- fix: 音声処理手直し、リファクタリング + + ## [1.61.1](https://github.com/famibee/SKYNovel/compare/v1.61.0...v1.61.1) (2024-11-02) diff --git a/dist/SoundMng.js b/dist/SoundMng.js index 7e38922b..e2efbcd4 100644 --- a/dist/SoundMng.js +++ b/dist/SoundMng.js @@ -30,13 +30,13 @@ var V = function() { for (var t, e = 1, s = arguments.length; e < s; e++) for (var o in t = arguments[e]) Object.prototype.hasOwnProperty.call(t, o) && (n[o] = t[o]); return n; }).apply(this, arguments); -}, Z = ["mp3", "ogg", "oga", "opus", "mpeg", "wav", "m4a", "aiff", "wma", "mid", "caf"], X = {}; +}, Z = ["mp3", "ogg", "oga", "opus", "mpeg", "wav", "m4a", "aiff", "wma", "mid", "caf"], H = {}; function at(n) { var t = V({ m4a: "audio/mp4", oga: "audio/ogg", opus: 'audio/ogg; codecs="opus"', caf: 'audio/x-caf; codecs="opus"' }, n || {}), e = document.createElement("audio"), s = {}, o = /^no$/; Z.forEach(function(r) { var i = e.canPlayType("audio/".concat(r)).replace(o, ""), u = t[r] ? e.canPlayType(t[r]).replace(o, "") : ""; s[r] = !!i || !!u; - }), Object.assign(X, s); + }), Object.assign(H, s); } at(); var gt = /\.(\{([^\}]+)\})(\?.*)?$/; @@ -45,7 +45,7 @@ function Q(n) { if (!t.test(e)) return e; for (var s = t.exec(e), o = s[2].split(","), r = o[o.length - 1], i = 0, u = o.length; i < u; i++) { var a = o[i]; - if (X[a]) { + if (H[a]) { r = a; break; } @@ -57,23 +57,23 @@ function Q(n) { } return l; } -var Y = Z.filter(function(n) { - return X[n]; -}), J = function() { +var X = Z.filter(function(n) { + return H[n]; +}), Y = function() { function n() { } return n.add = function() { n.setLegacy(d().useLegacy); }, n.setLegacy = function(t) { - t ? Y.forEach(function(e) { + t ? X.forEach(function(e) { O.setExtensionXhrType(e, O.XHR_RESPONSE_TYPE.DEFAULT), O.setExtensionLoadType(e, O.LOAD_TYPE.AUDIO); - }) : Y.forEach(function(e) { + }) : X.forEach(function(e) { O.setExtensionXhrType(e, O.XHR_RESPONSE_TYPE.BUFFER), O.setExtensionLoadType(e, O.LOAD_TYPE.XHR); }); }, n.pre = function(t, e) { Q(t), e(); }, n.use = function(t, e) { - t.data && Y.indexOf(t.extension) > -1 ? t.sound = d().add(t.name, { loaded: e, preload: !0, url: t.url, source: t.data }) : e(); + t.data && X.indexOf(t.extension) > -1 ? t.sound = d().add(t.name, { loaded: e, preload: !0, url: t.url, source: t.data }) : e(); }, n.extension = "loader", n; }(), Pt = 0, xt = function(n) { function t(e) { @@ -397,7 +397,7 @@ var Y = Z.filter(function(n) { }, Object.defineProperty(t.prototype, "bufferSize", { get: function() { return this.script.bufferSize; }, enumerable: !1, configurable: !0 }), t.BUFFER_SIZE = 0, t; -}(lt), W = function() { +}(lt), J = function() { function n() { } return n.prototype.init = function(t) { @@ -453,7 +453,7 @@ var Y = Z.filter(function(n) { } return n.from = function(t) { var e = {}; - return typeof t == "string" ? e.url = t : t instanceof ArrayBuffer || t instanceof AudioBuffer || t instanceof HTMLAudioElement ? e.source = t : e = t, (e = V({ autoPlay: !1, singleInstance: !1, url: null, source: null, preload: !1, volume: 1, speed: 1, complete: null, loaded: null, loop: !1 }, e)).url && (e.url = Q(e.url)), Object.freeze(e), new n(d().useLegacy ? new wt() : new W(), e); + return typeof t == "string" ? e.url = t : t instanceof ArrayBuffer || t instanceof AudioBuffer || t instanceof HTMLAudioElement ? e.source = t : e = t, (e = V({ autoPlay: !1, singleInstance: !1, url: null, source: null, preload: !1, volume: 1, speed: 1, complete: null, loaded: null, loop: !1 }, e)).url && (e.url = Q(e.url)), Object.freeze(e), new n(d().useLegacy ? new wt() : new J(), e); }, Object.defineProperty(n.prototype, "context", { get: function() { return d().context; }, enumerable: !1, configurable: !0 }), n.prototype.pause = function() { @@ -664,7 +664,7 @@ var Y = Z.filter(function(n) { }, Object.defineProperty(n.prototype, "useLegacy", { get: function() { return this._useLegacy; }, set: function(t) { - J.setLegacy(t), this._useLegacy = t, this._context = !t && this.supported ? this._webAudioContext : this._htmlAudioContext; + Y.setLegacy(t), this._useLegacy = t, this._context = !t && this.supported ? this._webAudioContext : this._htmlAudioContext; }, enumerable: !1, configurable: !0 }), Object.defineProperty(n.prototype, "disableAutoPause", { get: function() { return !this._webAudioContext.autoPause; }, set: function(t) { @@ -916,7 +916,7 @@ var Y = Z.filter(function(n) { var e = document.createElement("canvas"); t = V({ width: 512, height: 128, fill: "black" }, t || {}), e.width = t.width, e.height = t.height; var s = ft.from(e); - if (!(n.media instanceof W)) return s; + if (!(n.media instanceof J)) return s; var o = n.media, r = e.getContext("2d"); r.fillStyle = t.fill; for (var i = o.buffer.getChannelData(0), u = Math.ceil(i.length / t.width), a = t.height / 2, l = 0; l < t.width; l++) { @@ -930,16 +930,16 @@ var Y = Z.filter(function(n) { }, resolveUrl: Q, sineTone: function(n, t) { n === void 0 && (n = 200), t === void 0 && (t = 1); var e = T.from({ singleInstance: !0 }); - if (!(e.media instanceof W)) return e; + if (!(e.media instanceof J)) return e; for (var s = e.media, o = e.context.audioContext.createBuffer(1, 48e3 * t, 48e3), r = o.getChannelData(0), i = 0; i < r.length; i++) { var u = n * (i / o.sampleRate) * Math.PI; r[i] = 2 * Math.sin(u); } return s.buffer = o, e.isLoaded = !0, e; -}, validateFormats: at, supported: X, extensions: Z }, A = function(n) { +}, validateFormats: at, supported: H, extensions: Z }, A = function(n) { return rt = n, n; }(new St()); -"extensions" in ht ? pt.add(J) : it.registerPlugin(J); +"extensions" in ht ? pt.add(Y) : it.registerPlugin(Y); class S { constructor(t, e, s, o, r, i, u, a) { this.fn = t, this.buf = e, this.start_ms = s, this.end_ms = o, this.ret_ms = r, this.volume = i, this.pan = u, this.stt = a ? new B() : new Ct(), a && this.addSnd(a); @@ -957,7 +957,7 @@ class S { const e = Number(h.getVal("sys:sn.sound.BGM.vol_mul_talking") ?? 1); if (e === 1) break; S.#t = e; - const s = H[F]; + const s = W[F]; s && s.setVol(this.volume * S.#t); break; case F: @@ -969,7 +969,7 @@ class S { if (this.#s = () => { }, S.#t === 1 || this.buf !== ot) return; S.#t = 1; - const t = H[F]; + const t = W[F]; t && t.setVol(this.volume * S.#t); }; setVol(t) { @@ -983,7 +983,7 @@ class S { destroy() { } } -let st, h, k, nt, H, G; +let st, h, k, nt, W, G; const F = "BGM", v = "SE", ot = "VOICE"; class f { constructor(t, e, s) { @@ -1061,8 +1061,8 @@ class f { }); }) : _.complete = () => { z(this.#e, e), this.#e.onPlayEnd(); - }, this.#o(), b) { - if (b.volume = m, w) this.#i(s, _); + }, this.#n(), b) { + if (b.volume = m, w) this.#o(s, _); else if (b.isPlayable) { const p = b.options.source; !(p instanceof ArrayBuffer) || p.byteLength === 0 ? b.play(_) : this.#e.addSnd(T.from({ @@ -1071,21 +1071,21 @@ class f { source: p })), u !== 0 && (b.filters = [new q.StereoFilter(u)]); } - this.#n = !1; + this.needLoad = !1; return; } - if (this.#n = L(t, "join", !0)) { + if (this.needLoad = L(t, "join", !0)) { dt(); const p = _.loaded; _.loaded = (x, N) => { this.#e.stt.isDestroy || p(x, N), _t(); }; } - this.#i(s, _); + this.#o(s, _); } static #t = {}; static init(t, e, s, o, r) { - f.#t = {}, st = t, h = e, k = s, nt = o, H = r; + f.#t = {}, st = t, h = e, k = s, nt = o, W = r; } static setEvtMng(t) { G = t; @@ -1105,17 +1105,13 @@ class f { h.setVal_Nochk("save", s + "volume", u), h.setVal_Nochk("save", i + "volume", o), h.setVal_Nochk("save", s + "fn", a), h.setVal_Nochk("save", i + "fn", r), t in f.#t != e in f.#t && (t in f.#t ? (delete f.#t[t], f.#t[e] = r) : (delete f.#t[e], f.#t[t] = a), h.setVal_Nochk("save", "const.sn.loopPlaying", JSON.stringify(f.#t))), h.flush(); } static #s = 999e3; - static generate(t) { - const { buf: e = v, fn: s = "" } = t; - return (H[e] = new f(t, e, s)).#n; - } #e; - #n; - #o = () => { - A.volumeAll = Number(h.getVal("sys:sn.sound.global_volume", 1)), this.#o = () => { + needLoad; + #n = () => { + A.volumeAll = Number(h.getVal("sys:sn.sound.global_volume", 1)), this.#n = () => { }; }; - #i(t, e) { + #o(t, e) { const s = st.searchPath(t, yt.SOUND); if (!s.endsWith(".bin")) { e.url = s, T.from(e); @@ -1332,7 +1328,7 @@ class C { } class Tt { constructor(t, e, s, o, r) { - this.val = s, e.volume = (i) => this.#e(i), e.fadebgm = (i) => this.#c(i), e.fadeoutbgm = (i) => this.#o(i), e.fadeoutse = (i) => this.#i(i), e.fadese = (i) => this.#r(i), e.playbgm = (i) => this.#h(i), e.playse = (i) => this.#l(i), e.stop_allse = () => this.#u(), e.stopbgm = (i) => this.#_(i), e.stopse = (i) => this.#a(i), e.wb = (i) => this.#y(i), e.wf = (i) => this.#p(i), e.stopfadese = (i) => this.#f(i), e.wl = (i) => this.#m(i), e.ws = (i) => this.#d(i), e.xchgbuf = (i) => this.#b(i), s.setVal_Nochk("save", "const.sn.loopPlaying", "{}"), s.setVal_Nochk("tmp", "const.sn.sound.codecs", JSON.stringify(Lt.supported)), f.init(t, s, o, r, this.#t), A.disableAutoPause = !0; + this.val = s, e.volume = (i) => this.#e(i), e.fadebgm = (i) => this.#l(i), e.fadeoutbgm = (i) => this.#o(i), e.fadeoutse = (i) => this.#d(i), e.fadese = (i) => this.#i(i), e.playbgm = (i) => this.#c(i), e.playse = (i) => this.#a(i), e.stop_allse = () => this.#r(), e.stopbgm = (i) => this.#_(i), e.stopse = (i) => this.#u(i), e.wb = (i) => this.#y(i), e.wf = (i) => this.#h(i), e.stopfadese = (i) => this.#p(i), e.wl = (i) => this.#m(i), e.ws = (i) => this.#f(i), e.xchgbuf = (i) => this.#b(i), s.setVal_Nochk("save", "const.sn.loopPlaying", "{}"), s.setVal_Nochk("tmp", "const.sn.sound.codecs", JSON.stringify(Lt.supported)), f.init(t, s, o, r, this.#t), A.disableAutoPause = !0; } #t = {}; #s; @@ -1345,7 +1341,7 @@ class Tt { //MARK: 音量設定(独自拡張) #e(t) { const { buf: e = v } = t, s = "const.sn.sound." + e + ".volume", o = this.#n(t, 1); - return Number(this.val.getVal("sys:" + s)) === o ? !1 : (this.val.setVal_Nochk("sys", s, o), this.val.flush(), t.time = 0, t.volume = Number(this.val.getVal("save:" + s)), this.#r(t)); + return Number(this.val.getVal("sys:" + s)) === o ? !1 : (this.val.setVal_Nochk("sys", s, o), this.val.flush(), t.time = 0, t.volume = Number(this.val.getVal("save:" + s)), this.#i(t)); } #n(t, e) { const s = E(t, "volume", e); @@ -1353,68 +1349,68 @@ class Tt { } //MARK: BGM/効果音のフェードアウト(loadから使うのでマクロ化禁止) #o(t) { - return t.volume = 0, this.#c(t); + return t.volume = 0, this.#l(t); } //MARK: 効果音のフェードアウト(loadから使うのでマクロ化禁止) - #i(t) { - return t.volume = 0, this.#r(t); + #d(t) { + return t.volume = 0, this.#i(t); } //MARK: BGMのフェード(loadから使うのでマクロ化禁止) - #c(t) { - return t.buf = F, this.#r(t); + #l(t) { + return t.buf = F, this.#i(t); } //MARK: 効果音のフェード - #r(t) { + #i(t) { const { buf: e = v } = t; - return this.#f(t), this.#t[e]?.fade(t), !1; + return this.#p(t), this.#t[e]?.fade(t), !1; } //MARK: BGM の演奏 - #h(t) { - return t.buf = F, t.canskip = !1, L(t, "loop", !0), this.#l(t); + #c(t) { + return t.buf = F, t.canskip = !1, L(t, "loop", !0), this.#a(t); } //MARK: 効果音の再生 - #l(t) { + #a(t) { const { buf: e = v, fn: s } = t; - if (this.#a({ buf: e }), !s) throw `fnは必須です buf:${e}`; - return L(t, "canskip", !0) && this.#s.isSkipping ? !1 : f.generate(t); + if (this.#u({ buf: e }), !s) throw `fnは必須です buf:${e}`; + return L(t, "canskip", !0) && this.#s.isSkipping ? !1 : (this.#t[e] = new f(t, e, s)).needLoad; } clearCache() { A.removeAll(); } //MARK: 全効果音再生の停止 - #u() { - for (const t of Object.keys(this.#t)) this.#a({ buf: t }); + #r() { + for (const t of Object.keys(this.#t)) this.#u({ buf: t }); return this.#t = {}, A.stopAll(), !1; } //MARK: BGM 演奏の停止(loadから使うのでマクロ化禁止) #_(t) { - return t.buf = F, this.#a(t); + return t.buf = F, this.#u(t); } //MARK: 効果音再生の停止 - #a(t) { + #u(t) { const { buf: e = v } = t; return this.#t[e]?.stopse(t), !1; } //MARK: BGM フェードの終了待ち #y(t) { - return t.buf = F, this.#p(t); + return t.buf = F, this.#h(t); } //MARK: 効果音フェードの終了待ち - #p(t) { + #h(t) { const { buf: e = v } = t; return this.#t[e]?.wf(t); } //MARK: 音声フェードの停止 - #f(t) { + #p(t) { const { buf: e = v } = t; return this.#t[e]?.stopfadese(t), !1; } //MARK: BGM 再生の終了待ち #m(t) { - return t.buf = F, this.#d(t); + return t.buf = F, this.#f(t); } //MARK: 効果音再生の終了待ち - #d(t) { + #f(t) { const { buf: e = v } = t; return this.#t[e]?.ws(t); } @@ -1429,10 +1425,10 @@ class Tt { playLoopFromSaveObj(t) { const e = String(this.val.getVal("save:const.sn.loopPlaying", "{}")); if (e === "{}") - return this.#u(), this.clearCache(), []; + return this.#r(), this.clearCache(), []; const s = JSON.parse(e); if (t) - this.#u(), this.clearCache(); + this.#r(), this.clearCache(); else for (const [o, r] of Object.entries(this.#t)) o in s || r?.stopse({ buf: o }); return Object.entries(s).map(([o, r]) => new Promise((i) => { @@ -1453,11 +1449,11 @@ class Tt { fnc: i // loaded }; - l.buf === F ? this.#h(l) : this.#l(l); + l.buf === F ? this.#c(l) : this.#a(l); })); } destroy() { - this.#u(), this.clearCache(); + this.#r(), this.clearCache(); } } export { diff --git a/dist/SoundMng.js.map b/dist/SoundMng.js.map index 267dfe7d..0093dd1e 100644 --- a/dist/SoundMng.js.map +++ b/dist/SoundMng.js.map @@ -1 +1 @@ -{"version":3,"file":"SoundMng.js","sources":["../node_modules/@pixi/sound/dist/pixi-sound.esm.mjs","../src/sn/SndBuf.ts","../src/sn/SoundMng.ts"],"sourcesContent":["/*!\n * @pixi/sound - v4.4.1\n * https://github.com/pixijs/pixi-sound\n * Compiled Tue, 15 Aug 2023 19:22:13 UTC\n *\n * @pixi/sound is licensed under the MIT license.\n * http://www.opensource.org/licenses/mit-license\n */\nimport{LoaderResource as t,Loader as e}from\"@pixi/loaders\";import*as n from\"@pixi/core\";import{BaseTexture as o}from\"@pixi/core\";import{EventEmitter as i}from\"@pixi/utils\";import{Ticker as r}from\"@pixi/ticker\";var s;function u(){return s}var a=function(t,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function c(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Class extends value \"+String(e)+\" is not a constructor or null\");function n(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var l=function(){return(l=Object.assign||function(t){for(var e,n=1,o=arguments.length;n-1?t.sound=u().add(t.name,{loaded:e,preload:!0,url:t.url,source:t.data}):e()},e.extension=\"loader\",e}(),b=0,g=function(t){function e(e){var n=t.call(this)||this;return n.id=b++,n.init(e),n}return c(e,t),e.prototype.set=function(t,e){if(void 0===this[t])throw new Error(\"Property with name \".concat(t,\" does not exist.\"));switch(t){case\"speed\":this.speed=e;break;case\"volume\":this.volume=e;break;case\"paused\":this.paused=e;break;case\"loop\":this.loop=e;break;case\"muted\":this.muted=e}return this},Object.defineProperty(e.prototype,\"progress\",{get:function(){return this._source.currentTime/this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"paused\",{get:function(){return this._paused},set:function(t){this._paused=t,this.refreshPaused()},enumerable:!1,configurable:!0}),e.prototype._onPlay=function(){this._playing=!0},e.prototype._onPause=function(){this._playing=!1},e.prototype.init=function(t){this._playing=!1,this._duration=t.source.duration;var e=this._source=t.source.cloneNode(!1);e.src=t.parent.url,e.onplay=this._onPlay.bind(this),e.onpause=this._onPause.bind(this),t.context.on(\"refresh\",this.refresh,this),t.context.on(\"refreshPaused\",this.refreshPaused,this),this._media=t},e.prototype._internalStop=function(){this._source&&this._playing&&(this._source.onended=null,this._source.pause())},e.prototype.stop=function(){this._internalStop(),this._source&&this.emit(\"stop\")},Object.defineProperty(e.prototype,\"speed\",{get:function(){return this._speed},set:function(t){this._speed=t,this.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"volume\",{get:function(){return this._volume},set:function(t){this._volume=t,this.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"loop\",{get:function(){return this._loop},set:function(t){this._loop=t,this.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"muted\",{get:function(){return this._muted},set:function(t){this._muted=t,this.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"filters\",{get:function(){return null},set:function(t){},enumerable:!1,configurable:!0}),e.prototype.refresh=function(){var t=this._media.context,e=this._media.parent;this._source.loop=this._loop||e.loop;var n=t.volume*(t.muted?0:1),o=e.volume*(e.muted?0:1),i=this._volume*(this._muted?0:1);this._source.volume=i*n*o,this._source.playbackRate=this._speed*t.speed*e.speed},e.prototype.refreshPaused=function(){var t=this._media.context,e=this._media.parent,n=this._paused||e.paused||t.paused;n!==this._pausedReal&&(this._pausedReal=n,n?(this._internalStop(),this.emit(\"paused\")):(this.emit(\"resumed\"),this.play({start:this._source.currentTime,end:this._end,volume:this._volume,speed:this._speed,loop:this._loop})),this.emit(\"pause\",n))},e.prototype.play=function(t){var n=this,o=t.start,i=t.end,s=t.speed,u=t.loop,a=t.volume,c=t.muted;this._speed=s,this._volume=a,this._loop=!!u,this._muted=c,this.refresh(),this.loop&&null!==i&&(this.loop=!1),this._start=o,this._end=i||this._duration,this._start=Math.max(0,this._start-e.PADDING),this._end=Math.min(this._end+e.PADDING,this._duration),this._source.onloadedmetadata=function(){n._source&&(n._source.currentTime=o,n._source.onloadedmetadata=null,n.emit(\"progress\",o,n._duration),r.shared.add(n._onUpdate,n))},this._source.onended=this._onComplete.bind(this),this._source.play(),this.emit(\"start\")},e.prototype._onUpdate=function(){this.emit(\"progress\",this.progress,this._duration),this._source.currentTime>=this._end&&!this._source.loop&&this._onComplete()},e.prototype._onComplete=function(){r.shared.remove(this._onUpdate,this),this._internalStop(),this.emit(\"progress\",1,this._duration),this.emit(\"end\",this)},e.prototype.destroy=function(){r.shared.remove(this._onUpdate,this),this.removeAllListeners();var t=this._source;t&&(t.onended=null,t.onplay=null,t.onpause=null,this._internalStop()),this._source=null,this._speed=1,this._volume=1,this._loop=!1,this._end=null,this._start=0,this._duration=0,this._playing=!1,this._pausedReal=!1,this._paused=!1,this._muted=!1,this._media&&(this._media.context.off(\"refresh\",this.refresh,this),this._media.context.off(\"refreshPaused\",this.refreshPaused,this),this._media=null)},e.prototype.toString=function(){return\"[HTMLAudioInstance id=\".concat(this.id,\"]\")},e.PADDING=.1,e}(i),v=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.init=function(t){this.parent=t,this._source=t.options.source||new Audio,t.url&&(this._source.src=t.url)},e.prototype.create=function(){return new g(this)},Object.defineProperty(e.prototype,\"isPlayable\",{get:function(){return!!this._source&&4===this._source.readyState},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"duration\",{get:function(){return this._source.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"context\",{get:function(){return this.parent.context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"filters\",{get:function(){return null},set:function(t){},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){this.removeAllListeners(),this.parent=null,this._source&&(this._source.src=\"\",this._source.load(),this._source=null)},Object.defineProperty(e.prototype,\"source\",{get:function(){return this._source},enumerable:!1,configurable:!0}),e.prototype.load=function(t){var e=this._source,n=this.parent;if(4!==e.readyState)if(n.url){e.src=n.url;var o=function(){s(),n.isLoaded=!0;var e=n.autoPlayStart();t&&t(null,n,e)},i=function(){s(),t&&t(new Error(\"Sound loading has been aborted\"))},r=function(){s();var n=\"Failed to load audio element (code: \".concat(e.error.code,\")\");t&&t(new Error(n))},s=function(){e.removeEventListener(\"canplaythrough\",o),e.removeEventListener(\"load\",o),e.removeEventListener(\"abort\",i),e.removeEventListener(\"error\",r)};e.addEventListener(\"canplaythrough\",o,!1),e.addEventListener(\"load\",o,!1),e.addEventListener(\"abort\",i,!1),e.addEventListener(\"error\",r,!1),e.load()}else t(new Error(\"sound.url or sound.source must be set\"));else{n.isLoaded=!0;var u=n.autoPlayStart();t&&setTimeout((function(){t(null,n,u)}),0)}},e}(i),P=function(){function t(t,e){this.parent=t,Object.assign(this,e),this.duration=this.end-this.start}return t.prototype.play=function(t){return this.parent.play({complete:t,speed:this.speed||this.parent.speed,end:this.end,start:this.start,loop:this.loop})},t.prototype.destroy=function(){this.parent=null},t}(),x=function(){function t(){}return t.setParamValue=function(t,e){if(t.setValueAtTime){var n=u().context;t.setValueAtTime(e,n.audioContext.currentTime)}else t.value=e;return e},t}(),O=0,j=function(t){function e(e){var n=t.call(this)||this;return n.id=O++,n._media=null,n._paused=!1,n._muted=!1,n._elapsed=0,n.init(e),n}return c(e,t),e.prototype.set=function(t,e){if(void 0===this[t])throw new Error(\"Property with name \".concat(t,\" does not exist.\"));switch(t){case\"speed\":this.speed=e;break;case\"volume\":this.volume=e;break;case\"muted\":this.muted=e;break;case\"loop\":this.loop=e;break;case\"paused\":this.paused=e}return this},e.prototype.stop=function(){this._source&&(this._internalStop(),this.emit(\"stop\"))},Object.defineProperty(e.prototype,\"speed\",{get:function(){return this._speed},set:function(t){this._speed=t,this.refresh(),this._update(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"volume\",{get:function(){return this._volume},set:function(t){this._volume=t,this.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"muted\",{get:function(){return this._muted},set:function(t){this._muted=t,this.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"loop\",{get:function(){return this._loop},set:function(t){this._loop=t,this.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"filters\",{get:function(){return this._filters},set:function(t){var e;this._filters&&(null===(e=this._filters)||void 0===e||e.filter((function(t){return t})).forEach((function(t){return t.disconnect()})),this._filters=null,this._source.connect(this._gain)),this._filters=(null==t?void 0:t.length)?t.slice(0):null,this.refresh()},enumerable:!1,configurable:!0}),e.prototype.refresh=function(){if(this._source){var t=this._media.context,e=this._media.parent;this._source.loop=this._loop||e.loop;var n=t.volume*(t.muted?0:1),o=e.volume*(e.muted?0:1),i=this._volume*(this._muted?0:1);x.setParamValue(this._gain.gain,i*o*n),x.setParamValue(this._source.playbackRate,this._speed*e.speed*t.speed),this.applyFilters()}},e.prototype.applyFilters=function(){var t;if(null===(t=this._filters)||void 0===t?void 0:t.length){this._source.disconnect();var e=this._source;this._filters.forEach((function(t){e.connect(t.destination),e=t})),e.connect(this._gain)}},e.prototype.refreshPaused=function(){var t=this._media.context,e=this._media.parent,n=this._paused||e.paused||t.paused;n!==this._pausedReal&&(this._pausedReal=n,n?(this._internalStop(),this.emit(\"paused\")):(this.emit(\"resumed\"),this.play({start:this._elapsed%this._duration,end:this._end,speed:this._speed,loop:this._loop,volume:this._volume})),this.emit(\"pause\",n))},e.prototype.play=function(t){var e=t.start,n=t.end,o=t.speed,i=t.loop,r=t.volume,s=t.muted,u=t.filters;this._paused=!1;var a=this._media.nodes.cloneBufferSource(),c=a.source,l=a.gain;this._source=c,this._gain=l,this._speed=o,this._volume=r,this._loop=!!i,this._muted=s,this._filters=u,this.refresh();var p=this._source.buffer.duration;this._duration=p,this._end=n,this._lastUpdate=this._now(),this._elapsed=e,this._source.onended=this._onComplete.bind(this),this._loop?(this._source.loopEnd=n,this._source.loopStart=e,this._source.start(0,e)):n?this._source.start(0,e,n-e):this._source.start(0,e),this.emit(\"start\"),this._update(!0),this.enableTicker(!0)},e.prototype.enableTicker=function(t){r.shared.remove(this._updateListener,this),t&&r.shared.add(this._updateListener,this)},Object.defineProperty(e.prototype,\"progress\",{get:function(){return this._progress},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"paused\",{get:function(){return this._paused},set:function(t){this._paused=t,this.refreshPaused()},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){var t;this.removeAllListeners(),this._internalStop(),this._gain&&(this._gain.disconnect(),this._gain=null),this._media&&(this._media.context.events.off(\"refresh\",this.refresh,this),this._media.context.events.off(\"refreshPaused\",this.refreshPaused,this),this._media=null),null===(t=this._filters)||void 0===t||t.forEach((function(t){return t.disconnect()})),this._filters=null,this._end=null,this._speed=1,this._volume=1,this._loop=!1,this._elapsed=0,this._duration=0,this._paused=!1,this._muted=!1,this._pausedReal=!1},e.prototype.toString=function(){return\"[WebAudioInstance id=\".concat(this.id,\"]\")},e.prototype._now=function(){return this._media.context.audioContext.currentTime},e.prototype._updateListener=function(){this._update()},e.prototype._update=function(t){if(void 0===t&&(t=!1),this._source){var e=this._now(),n=e-this._lastUpdate;if(n>0||t){var o=this._source.playbackRate.value;this._elapsed+=n*o,this._lastUpdate=e;var i=this._duration,r=void 0;if(this._source.loopStart){var s=this._source.loopEnd-this._source.loopStart;r=(this._source.loopStart+this._elapsed%s)/i}else r=this._elapsed%i/i;this._progress=r,this.emit(\"progress\",this._progress,i)}}},e.prototype.init=function(t){this._media=t,t.context.events.on(\"refresh\",this.refresh,this),t.context.events.on(\"refreshPaused\",this.refreshPaused,this)},e.prototype._internalStop=function(){if(this._source){this.enableTicker(!1),this._source.onended=null,this._source.stop(0),this._source.disconnect();try{this._source.buffer=null}catch(t){}this._source=null}},e.prototype._onComplete=function(){if(this._source){this.enableTicker(!1),this._source.onended=null,this._source.disconnect();try{this._source.buffer=null}catch(t){}}this._source=null,this._progress=1,this.emit(\"progress\",1,this._duration),this.emit(\"end\",this)},e}(i),w=function(){function t(t,e){this._output=e,this._input=t}return Object.defineProperty(t.prototype,\"destination\",{get:function(){return this._input},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"filters\",{get:function(){return this._filters},set:function(t){var e=this;if(this._filters&&(this._filters.forEach((function(t){t&&t.disconnect()})),this._filters=null,this._input.connect(this._output)),t&&t.length){this._filters=t.slice(0),this._input.disconnect();var n=null;t.forEach((function(t){null===n?e._input.connect(t.destination):n.connect(t.destination),n=t})),n.connect(this._output)}},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){this.filters=null,this._input=null,this._output=null},t}(),A=function(t){function e(e){var n=this,o=e.audioContext,i=o.createBufferSource(),r=o.createGain(),s=o.createAnalyser();return i.connect(s),s.connect(r),r.connect(e.destination),(n=t.call(this,s,r)||this).context=e,n.bufferSource=i,n.gain=r,n.analyser=s,n}return c(e,t),Object.defineProperty(e.prototype,\"script\",{get:function(){return this._script||(this._script=this.context.audioContext.createScriptProcessor(e.BUFFER_SIZE),this._script.connect(this.context.destination)),this._script},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.bufferSource.disconnect(),this._script&&this._script.disconnect(),this.gain.disconnect(),this.analyser.disconnect(),this.bufferSource=null,this._script=null,this.gain=null,this.analyser=null,this.context=null},e.prototype.cloneBufferSource=function(){var t=this.bufferSource,e=this.context.audioContext.createBufferSource();e.buffer=t.buffer,x.setParamValue(e.playbackRate,t.playbackRate.value),e.loop=t.loop;var n=this.context.audioContext.createGain();return e.connect(n),n.connect(this.destination),{source:e,gain:n}},Object.defineProperty(e.prototype,\"bufferSize\",{get:function(){return this.script.bufferSize},enumerable:!1,configurable:!0}),e.BUFFER_SIZE=0,e}(w),F=function(){function t(){}return t.prototype.init=function(t){this.parent=t,this._nodes=new A(this.context),this._source=this._nodes.bufferSource,this.source=t.options.source},t.prototype.destroy=function(){this.parent=null,this._nodes.destroy(),this._nodes=null;try{this._source.buffer=null}catch(t){}this._source=null,this.source=null},t.prototype.create=function(){return new j(this)},Object.defineProperty(t.prototype,\"context\",{get:function(){return this.parent.context},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"isPlayable\",{get:function(){return!!this._source&&!!this._source.buffer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"filters\",{get:function(){return this._nodes.filters},set:function(t){this._nodes.filters=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"duration\",{get:function(){return this._source.buffer.duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"buffer\",{get:function(){return this._source.buffer},set:function(t){this._source.buffer=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"nodes\",{get:function(){return this._nodes},enumerable:!1,configurable:!0}),t.prototype.load=function(t){this.source?this._decode(this.source,t):this.parent.url?this._loadUrl(t):t&&t(new Error(\"sound.url or sound.source must be set\"))},t.prototype._loadUrl=function(t){var e=this,n=new XMLHttpRequest,o=this.parent.url;n.open(\"GET\",o,!0),n.responseType=\"arraybuffer\",n.onload=function(){e.source=n.response,e._decode(n.response,t)},n.send()},t.prototype._decode=function(t,e){var n=this,o=function(t,o){if(t)e&&e(t);else{n.parent.isLoaded=!0,n.buffer=o;var i=n.parent.autoPlayStart();e&&e(null,n.parent,i)}};t instanceof AudioBuffer?o(null,t):this.parent.context.decode(t,o)},t}(),E=function(){function t(t,e){this.media=t,this.options=e,this._instances=[],this._sprites={},this.media.init(this);var n=e.complete;this._autoPlayOptions=n?{complete:n}:null,this.isLoaded=!1,this.isPlaying=!1,this.autoPlay=e.autoPlay,this.singleInstance=e.singleInstance,this.preload=e.preload||this.autoPlay,this.url=e.url,this.speed=e.speed,this.volume=e.volume,this.loop=e.loop,e.sprites&&this.addSprites(e.sprites),this.preload&&this._preload(e.loaded)}return t.from=function(e){var n={};return\"string\"==typeof e?n.url=e:e instanceof ArrayBuffer||e instanceof AudioBuffer||e instanceof HTMLAudioElement?n.source=e:n=e,(n=l({autoPlay:!1,singleInstance:!1,url:null,source:null,preload:!1,volume:1,speed:1,complete:null,loaded:null,loop:!1},n)).url&&(n.url=_(n.url)),Object.freeze(n),new t(u().useLegacy?new v:new F,n)},Object.defineProperty(t.prototype,\"context\",{get:function(){return u().context},enumerable:!1,configurable:!0}),t.prototype.pause=function(){return this.isPlaying=!1,this.paused=!0,this},t.prototype.resume=function(){return this.isPlaying=this._instances.length>0,this.paused=!1,this},Object.defineProperty(t.prototype,\"paused\",{get:function(){return this._paused},set:function(t){this._paused=t,this.refreshPaused()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"speed\",{get:function(){return this._speed},set:function(t){this._speed=t,this.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"filters\",{get:function(){return this.media.filters},set:function(t){this.media.filters=t},enumerable:!1,configurable:!0}),t.prototype.addSprites=function(t,e){if(\"object\"==typeof t){var n={};for(var o in t)n[o]=this.addSprites(o,t[o]);return n}var i=new P(this,e);return this._sprites[t]=i,i},t.prototype.destroy=function(){this._removeInstances(),this.removeSprites(),this.media.destroy(),this.media=null,this._sprites=null,this._instances=null},t.prototype.removeSprites=function(t){if(t){var e=this._sprites[t];void 0!==e&&(e.destroy(),delete this._sprites[t])}else for(var n in this._sprites)this.removeSprites(n);return this},Object.defineProperty(t.prototype,\"isPlayable\",{get:function(){return this.isLoaded&&this.media&&this.media.isPlayable},enumerable:!1,configurable:!0}),t.prototype.stop=function(){if(!this.isPlayable)return this.autoPlay=!1,this._autoPlayOptions=null,this;this.isPlaying=!1;for(var t=this._instances.length-1;t>=0;t--)this._instances[t].stop();return this},t.prototype.play=function(t,e){var n,o=this;\"string\"==typeof t?n={sprite:r=t,loop:this.loop,complete:e}:\"function\"==typeof t?(n={}).complete=t:n=t;if((n=l({complete:null,loaded:null,sprite:null,end:null,start:0,volume:1,speed:1,muted:!1,loop:!1},n||{})).sprite){var i=n.sprite,r=this._sprites[i];n.start=r.start+(n.start||0),n.end=r.end,n.speed=r.speed||1,n.loop=r.loop||n.loop,delete n.sprite}if(n.offset&&(n.start=n.offset),!this.isLoaded)return new Promise((function(t,e){o.autoPlay=!0,o._autoPlayOptions=n,o._preload((function(o,i,r){o?e(o):(n.loaded&&n.loaded(o,i,r),t(r))}))}));(this.singleInstance||n.singleInstance)&&this._removeInstances();var s=this._createInstance();return this._instances.push(s),this.isPlaying=!0,s.once(\"end\",(function(){n.complete&&n.complete(o),o._onComplete(s)})),s.once(\"stop\",(function(){o._onComplete(s)})),s.play(n),s},t.prototype.refresh=function(){for(var t=this._instances.length,e=0;e=0;t--)this._poolInstance(this._instances[t]);this._instances.length=0},t.prototype._onComplete=function(t){if(this._instances){var e=this._instances.indexOf(t);e>-1&&this._instances.splice(e,1),this.isPlaying=this._instances.length>0}this._poolInstance(t)},t.prototype._createInstance=function(){if(t._pool.length>0){var e=t._pool.pop();return e.init(this.media),e}return this.media.create()},t.prototype._poolInstance=function(e){e.destroy(),t._pool.indexOf(e)<0&&t._pool.push(e)},t._pool=[],t}(),C=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.speed=1,e.muted=!1,e.volume=1,e.paused=!1,e}return c(e,t),e.prototype.refresh=function(){this.emit(\"refresh\")},e.prototype.refreshPaused=function(){this.emit(\"refreshPaused\")},Object.defineProperty(e.prototype,\"filters\",{get:function(){return null},set:function(t){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"audioContext\",{get:function(){return null},enumerable:!1,configurable:!0}),e.prototype.toggleMute=function(){return this.muted=!this.muted,this.refresh(),this.muted},e.prototype.togglePause=function(){return this.paused=!this.paused,this.refreshPaused(),this.paused},e.prototype.destroy=function(){this.removeAllListeners()},e}(i),L=function(t){function e(){var n=t.call(this,null,null)||this;n.autoPause=!0;var o=window,r=new e.AudioContext,s=r.createDynamicsCompressor(),u=r.createAnalyser();return u.connect(s),s.connect(r.destination),n._input=u,n._output=r.destination,n._ctx=r,n._offlineCtx=new e.OfflineAudioContext(1,2,o.OfflineAudioContext?Math.max(8e3,Math.min(96e3,r.sampleRate)):44100),n.compressor=s,n.analyser=u,n.events=new i,n.volume=1,n.speed=1,n.muted=!1,n.paused=!1,n._locked=\"suspended\"===r.state&&(\"ontouchstart\"in globalThis||\"onclick\"in globalThis),n._locked&&(n._unlock(),n._unlock=n._unlock.bind(n),document.addEventListener(\"mousedown\",n._unlock,!0),document.addEventListener(\"touchstart\",n._unlock,!0),document.addEventListener(\"touchend\",n._unlock,!0)),n.onFocus=n.onFocus.bind(n),n.onBlur=n.onBlur.bind(n),globalThis.addEventListener(\"focus\",n.onFocus),globalThis.addEventListener(\"blur\",n.onBlur),n}return c(e,t),e.prototype.onFocus=function(){if(this.autoPause){var t=this._ctx.state;\"suspended\"!==t&&\"interrupted\"!==t&&this._locked||(this.paused=this._pausedOnBlur,this.refreshPaused())}},e.prototype.onBlur=function(){this.autoPause&&(this._locked||(this._pausedOnBlur=this._paused,this.paused=!0,this.refreshPaused()))},e.prototype._unlock=function(){this._locked&&(this.playEmptySound(),\"running\"===this._ctx.state&&(document.removeEventListener(\"mousedown\",this._unlock,!0),document.removeEventListener(\"touchend\",this._unlock,!0),document.removeEventListener(\"touchstart\",this._unlock,!0),this._locked=!1))},e.prototype.playEmptySound=function(){var t=this._ctx.createBufferSource();t.buffer=this._ctx.createBuffer(1,1,22050),t.connect(this._ctx.destination),t.start(0,0,0),\"suspended\"===t.context.state&&t.context.resume()},Object.defineProperty(e,\"AudioContext\",{get:function(){var t=window;return t.AudioContext||t.webkitAudioContext||null},enumerable:!1,configurable:!0}),Object.defineProperty(e,\"OfflineAudioContext\",{get:function(){var t=window;return t.OfflineAudioContext||t.webkitOfflineAudioContext||null},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){t.prototype.destroy.call(this);var e=this._ctx;void 0!==e.close&&e.close(),globalThis.removeEventListener(\"focus\",this.onFocus),globalThis.removeEventListener(\"blur\",this.onBlur),this.events.removeAllListeners(),this.analyser.disconnect(),this.compressor.disconnect(),this.analyser=null,this.compressor=null,this.events=null,this._offlineCtx=null,this._ctx=null},Object.defineProperty(e.prototype,\"audioContext\",{get:function(){return this._ctx},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"offlineContext\",{get:function(){return this._offlineCtx},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"paused\",{get:function(){return this._paused},set:function(t){t&&\"running\"===this._ctx.state?this._ctx.suspend():t||\"suspended\"!==this._ctx.state||this._ctx.resume(),this._paused=t},enumerable:!1,configurable:!0}),e.prototype.refresh=function(){this.events.emit(\"refresh\")},e.prototype.refreshPaused=function(){this.events.emit(\"refreshPaused\")},e.prototype.toggleMute=function(){return this.muted=!this.muted,this.refresh(),this.muted},e.prototype.togglePause=function(){return this.paused=!this.paused,this.refreshPaused(),this._paused},e.prototype.decode=function(t,e){var n=function(t){e(new Error((null==t?void 0:t.message)||\"Unable to decode file\"))},o=this._offlineCtx.decodeAudioData(t,(function(t){e(null,t)}),n);o&&o.catch(n)},e}(w),S=function(){function t(){this.init()}return t.prototype.init=function(){return this.supported&&(this._webAudioContext=new L),this._htmlAudioContext=new C,this._sounds={},this.useLegacy=!this.supported,this},Object.defineProperty(t.prototype,\"context\",{get:function(){return this._context},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"filtersAll\",{get:function(){return this.useLegacy?[]:this._context.filters},set:function(t){this.useLegacy||(this._context.filters=t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"supported\",{get:function(){return null!==L.AudioContext},enumerable:!1,configurable:!0}),t.prototype.add=function(t,e){if(\"object\"==typeof t){var n={};for(var o in t){var i=this._getOptions(t[o],e);n[o]=this.add(o,i)}return n}if(e instanceof E)return this._sounds[t]=e,e;var r=this._getOptions(e),s=E.from(r);return this._sounds[t]=s,s},t.prototype._getOptions=function(t,e){var n;return n=\"string\"==typeof t?{url:t}:t instanceof ArrayBuffer||t instanceof AudioBuffer||t instanceof HTMLAudioElement?{source:t}:t,n=l(l({},n),e||{})},Object.defineProperty(t.prototype,\"useLegacy\",{get:function(){return this._useLegacy},set:function(t){m.setLegacy(t),this._useLegacy=t,this._context=!t&&this.supported?this._webAudioContext:this._htmlAudioContext},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"disableAutoPause\",{get:function(){return!this._webAudioContext.autoPause},set:function(t){this._webAudioContext.autoPause=!t},enumerable:!1,configurable:!0}),t.prototype.remove=function(t){return this.exists(t,!0),this._sounds[t].destroy(),delete this._sounds[t],this},Object.defineProperty(t.prototype,\"volumeAll\",{get:function(){return this._context.volume},set:function(t){this._context.volume=t,this._context.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"speedAll\",{get:function(){return this._context.speed},set:function(t){this._context.speed=t,this._context.refresh()},enumerable:!1,configurable:!0}),t.prototype.togglePauseAll=function(){return this._context.togglePause()},t.prototype.pauseAll=function(){return this._context.paused=!0,this._context.refreshPaused(),this},t.prototype.resumeAll=function(){return this._context.paused=!1,this._context.refreshPaused(),this},t.prototype.toggleMuteAll=function(){return this._context.toggleMute()},t.prototype.muteAll=function(){return this._context.muted=!0,this._context.refresh(),this},t.prototype.unmuteAll=function(){return this._context.muted=!1,this._context.refresh(),this},t.prototype.removeAll=function(){for(var t in this._sounds)this._sounds[t].destroy(),delete this._sounds[t];return this},t.prototype.stopAll=function(){for(var t in this._sounds)this._sounds[t].stop();return this},t.prototype.exists=function(t,e){return void 0===e&&(e=!1),!!this._sounds[t]},t.prototype.find=function(t){return this.exists(t,!0),this._sounds[t]},t.prototype.play=function(t,e){return this.find(t).play(e)},t.prototype.stop=function(t){return this.find(t).stop()},t.prototype.pause=function(t){return this.find(t).pause()},t.prototype.resume=function(t){return this.find(t).resume()},t.prototype.volume=function(t,e){var n=this.find(t);return void 0!==e&&(n.volume=e),n.volume},t.prototype.speed=function(t,e){var n=this.find(t);return void 0!==e&&(n.speed=e),n.speed},t.prototype.duration=function(t){return this.find(t).duration},t.prototype.close=function(){return this.removeAll(),this._sounds=null,this._webAudioContext&&(this._webAudioContext.destroy(),this._webAudioContext=null),this._htmlAudioContext&&(this._htmlAudioContext.destroy(),this._htmlAudioContext=null),this._context=null,this},t}(),k={__proto__:null,HTMLAudioMedia:v,HTMLAudioInstance:g,HTMLAudioContext:C},M=function(){function t(t,e){this.init(t,e)}return t.prototype.init=function(t,e){this.destination=t,this.source=e||t},t.prototype.connect=function(t){this.source.connect(t)},t.prototype.disconnect=function(){this.source.disconnect()},t.prototype.destroy=function(){this.disconnect(),this.destination=null,this.source=null},t}(),T={__proto__:null,Filter:M,EqualizerFilter:function(t){function e(n,o,i,r,s,a,c,l,p,h){void 0===n&&(n=0),void 0===o&&(o=0),void 0===i&&(i=0),void 0===r&&(r=0),void 0===s&&(s=0),void 0===a&&(a=0),void 0===c&&(c=0),void 0===l&&(l=0),void 0===p&&(p=0),void 0===h&&(h=0);var f=this;if(!u().useLegacy){var d=[{f:e.F32,type:\"lowshelf\",gain:n},{f:e.F64,type:\"peaking\",gain:o},{f:e.F125,type:\"peaking\",gain:i},{f:e.F250,type:\"peaking\",gain:r},{f:e.F500,type:\"peaking\",gain:s},{f:e.F1K,type:\"peaking\",gain:a},{f:e.F2K,type:\"peaking\",gain:c},{f:e.F4K,type:\"peaking\",gain:l},{f:e.F8K,type:\"peaking\",gain:p},{f:e.F16K,type:\"highshelf\",gain:h}].map((function(t){var e=u().context.audioContext.createBiquadFilter();return e.type=t.type,x.setParamValue(e.Q,1),e.frequency.value=t.f,x.setParamValue(e.gain,t.gain),e}));(f=t.call(this,d[0],d[d.length-1])||this).bands=d,f.bandsMap={};for(var _=0;_0&&f.bands[_-1].connect(y),f.bandsMap[y.frequency.value]=y}return f}f=t.call(this,null)||this}return c(e,t),e.prototype.setGain=function(t,e){if(void 0===e&&(e=0),!this.bandsMap[t])throw new Error(\"No band found for frequency \".concat(t));x.setParamValue(this.bandsMap[t].gain,e)},e.prototype.getGain=function(t){if(!this.bandsMap[t])throw new Error(\"No band found for frequency \".concat(t));return this.bandsMap[t].gain.value},Object.defineProperty(e.prototype,\"f32\",{get:function(){return this.getGain(e.F32)},set:function(t){this.setGain(e.F32,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"f64\",{get:function(){return this.getGain(e.F64)},set:function(t){this.setGain(e.F64,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"f125\",{get:function(){return this.getGain(e.F125)},set:function(t){this.setGain(e.F125,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"f250\",{get:function(){return this.getGain(e.F250)},set:function(t){this.setGain(e.F250,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"f500\",{get:function(){return this.getGain(e.F500)},set:function(t){this.setGain(e.F500,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"f1k\",{get:function(){return this.getGain(e.F1K)},set:function(t){this.setGain(e.F1K,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"f2k\",{get:function(){return this.getGain(e.F2K)},set:function(t){this.setGain(e.F2K,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"f4k\",{get:function(){return this.getGain(e.F4K)},set:function(t){this.setGain(e.F4K,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"f8k\",{get:function(){return this.getGain(e.F8K)},set:function(t){this.setGain(e.F8K,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"f16k\",{get:function(){return this.getGain(e.F16K)},set:function(t){this.setGain(e.F16K,t)},enumerable:!1,configurable:!0}),e.prototype.reset=function(){this.bands.forEach((function(t){x.setParamValue(t.gain,0)}))},e.prototype.destroy=function(){this.bands.forEach((function(t){t.disconnect()})),this.bands=null,this.bandsMap=null},e.F32=32,e.F64=64,e.F125=125,e.F250=250,e.F500=500,e.F1K=1e3,e.F2K=2e3,e.F4K=4e3,e.F8K=8e3,e.F16K=16e3,e}(M),DistortionFilter:function(t){function e(e){void 0===e&&(e=0);var n=this;if(!u().useLegacy){var o=u().context.audioContext.createWaveShaper();return(n=t.call(this,o)||this)._distortion=o,n.amount=e,n}n=t.call(this,null)||this}return c(e,t),Object.defineProperty(e.prototype,\"amount\",{get:function(){return this._amount},set:function(t){this._amount=t;for(var e,n=1e3*t,o=44100,i=new Float32Array(o),r=Math.PI/180,s=0;sf&&(f=_)}s.fillRect(p,(1+h)*c,1,Math.max(1,(f-h)*c))}return i},resolveUrl:_,sineTone:function(t,e){void 0===t&&(t=200),void 0===e&&(e=1);var n=E.from({singleInstance:!0});if(!(n.media instanceof F))return n;for(var o=n.media,i=n.context.audioContext.createBuffer(1,48e3*e,48e3),r=i.getChannelData(0),s=0;s snd.volume = vol;\n\t\tthis.tw = ()=> new Tween(snd);\n\t\tthis.onPlayEnd = ()=> {this.stt.onPlayEnd(this.buf); this.#onStop()};\n\t\tthis.stop = ()=> {snd.stop(); this.#onStop()};\n\t\tthis.destroy = ()=> snd.destroy();\n\n\t\tswitch (this.buf) {\t\t// セリフ再生中はBGM音量を絞る\n\t\t\tcase BUF_VOICE:\n\t\t\t\tconst v = Number(val.getVal('sys:sn.sound.BGM.vol_mul_talking') ?? 1);\t\t// 歴史的経緯で ??\n\t\t\t\tif (v === 1) break;\n\n\t\t\t\tSndInf.#vol_mul_talking = v;\n\t\t\t\tconst b = hSndBuf[BUF_BGM];\n\t\t\t\tif (b) b.setVol(this.volume * SndInf.#vol_mul_talking);\n\t\t\t\tbreak;\n\n\t\t\tcase BUF_BGM:\n\t\t\t\tsnd.volume = this.volume * SndInf.#vol_mul_talking;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\t\t#onStop = ()=> {\n\t\t\tthis.#onStop = ()=> {};\n\t\t\tif (SndInf.#vol_mul_talking === 1 || this.buf !== BUF_VOICE) return;\n\n\t\t\t// ボリュームを戻す\n\t\t\tSndInf.#vol_mul_talking = 1;\n\t\t\tconst b = hSndBuf[BUF_BGM];\n\t\t\tif (b) b.setVol(this.volume * SndInf.#vol_mul_talking);\n\t\t}\n\n\tsetVol(_vol: number) {}\n\ttw(): Tween | undefined {return undefined}\n\tonPlayEnd() {}\n\tstop() {}\n\tdestroy() {}\n}\n\n\nlet cfg\t: Config;\nlet val\t: IVariable;\nlet main: IMain;\nlet sys\t: SysBase;\nlet hSndBuf\t: HSndBuf;\n\nlet evtMng\t: IEvtMng;\n\nexport interface HSndBuf {[buf: string]: SndBuf}\nexport\tconst\tBUF_BGM\t\t= 'BGM';\nexport\tconst\tBUF_SE\t\t= 'SE';\n\t\tconst\tBUF_VOICE\t= 'VOICE';\n\n\nexport class SndBuf {\n\tstatic\t#hLP\t: {[buf: string]: string}\t= {};\n\tstatic\tinit($cfg: Config, $val: IVariable, $main: IMain, $sys: SysBase, $hSndBuf: HSndBuf) {\n\t\tSndBuf.#hLP = {};\n\t\tcfg\t= $cfg;\n\t\tval\t= $val;\n\t\tmain= $main;\n\t\tsys\t= $sys;\n\t\thSndBuf\t= $hSndBuf;\n\t}\n\tstatic\tsetEvtMng($evtMng: IEvtMng) {evtMng = $evtMng}\n\tstatic\tdelLoopPlay(buf: string): void {\n\t\tdelete SndBuf.#hLP[buf];\n\t\tconst vn = 'const.sn.sound.'+ buf +'.';\n\t\tval.setVal_Nochk('save', vn +'fn', '');\n\t\tval.setVal_Nochk('save', 'const.sn.loopPlaying', JSON.stringify(SndBuf.#hLP));\n\t\tval.flush();\n\t}\n\tstatic\tgetVol(hArg: HArg, def: number): number {\n\t\tconst vol = argChk_Num(hArg, 'volume', def);\n\t\tif (vol < 0) return 0;\n\t\tif (vol > 1) return 1;\n\t\treturn vol;\n\t}\n\tstatic\txchgbuf({buf: buf1 = BUF_SE, buf2 = BUF_SE}: HArg) {\n\t\tif (buf1 === buf2) throw `[xchgbuf] buf:${buf1} が同じ値です`;\n\n\t\tconst n1 = 'const.sn.sound.'+ buf1 +'.';\n\t\tconst v1 = Number(val.getVal('save:'+ n1 +'volume'));\n\t\tconst f1 = String(val.getVal('save:'+ n1 +'fn'));\n\t\tconst n2 = 'const.sn.sound.'+ buf2 +'.';\n\t\tconst v2 = Number(val.getVal('save:'+ n2 +'volume'));\n\t\tconst f2 = String(val.getVal('save:'+ n2 +'fn'));\n\t\tval.setVal_Nochk('save', n1 +'volume', v2);\n\t\tval.setVal_Nochk('save', n2 +'volume', v1);\n\t\tval.setVal_Nochk('save', n1 +'fn', f2);\n\t\tval.setVal_Nochk('save', n2 +'fn', f1);\n\n\t\tif (buf1 in SndBuf.#hLP !== buf2 in SndBuf.#hLP) {\t// 演算子の優先順位確認済\n\t\t\tif (buf1 in SndBuf.#hLP)\n\t\t\t\t\t{delete SndBuf.#hLP[buf1]; SndBuf.#hLP[buf2] = f1}\n\t\t\telse\t{delete SndBuf.#hLP[buf2]; SndBuf.#hLP[buf1] = f2}\n\t\t\tval.setVal_Nochk('save', 'const.sn.loopPlaying', JSON.stringify(SndBuf.#hLP));\n\t\t}\n\t\tval.flush();\n\t}\n\n\n\tstatic\treadonly\t#MAX_END_MS\t= 999000;\n\tstatic\tgenerate(hArg: HArg): boolean {\n\t\tconst {buf = BUF_SE, fn = ''} = hArg;\n\t\tconst sb = hSndBuf[buf] = new SndBuf(hArg, buf, fn);\n\t\treturn sb.#init_wait;\n\t}\n\n\n\treadonly #si\t\t: SndInf;\n\treadonly #init_wait;\n\n\n\tprivate\tconstructor(\n\t\treadonly hArg\t: HArg,\n\t\treadonly buf\t: string,\n\t\treadonly fn\t\t: string,\n\t) {\n\t\tconst start_ms = argChk_Num(hArg, 'start_ms', 0);\n\t\tconst end_ms = argChk_Num(hArg, 'end_ms', SndBuf.#MAX_END_MS);\n\t\tconst ret_ms = argChk_Num(hArg, 'ret_ms', 0);\n\t\tconst pan = argChk_Num(hArg, 'pan', 0);\n\t\tconst speed = argChk_Num(hArg, 'speed', 1);\n\n\t\tif (start_ms < 0) throw `[playse] start_ms:${start_ms} が負の値です`;\n\t\tif (ret_ms < 0) throw `[playse] ret_ms:${ret_ms} が負の値です`;\n\t\tif (0 < end_ms) {\n\t\t\tif (end_ms <= start_ms) throw `[playse] start_ms:${start_ms} >= end_ms:${end_ms} は異常値です`;\n\t\t\tif (end_ms <= ret_ms) throw `[playse] ret_ms:${ret_ms} >= end_ms:${end_ms} は異常値です`;\n\t\t}\n\n\t\t// この辺で属性を増減したら、loadFromSaveObj()にも反映する\n\t\tconst vn = 'const.sn.sound.'+ buf +'.';\n\t\tval.setVal_Nochk('save', vn +'fn', fn);\n\t\tconst savevol = SndBuf.getVol(hArg, 1);\n\t\tval.setVal_Nochk('save', vn +'volume', savevol);// 目標音量(save:)\n\t\tconst volume = savevol * Number(val.getVal('sys:'+ vn +'volume', 1));\n\n\t\tconst loop = argChk_Boolean(hArg, 'loop', false);\n\t\tif (loop) {\n\t\t\tSndBuf.#hLP[buf] = fn;\n\t\t\tval.setVal_Nochk('save', 'const.sn.loopPlaying', JSON.stringify(SndBuf.#hLP));\n\t\t}\n\t\telse SndBuf.delLoopPlay(buf);\n\t\tval.setVal_Nochk('save', vn +'start_ms', start_ms);\n\t\tval.setVal_Nochk('save', vn +'end_ms', end_ms);\n\t\tval.setVal_Nochk('save', vn +'ret_ms', ret_ms);\n\t\tval.setVal_Nochk('tmp', vn +'playing', true);\n\t\tval.flush();\n\n\t\tconst snd = sound.find(fn);\t// キャッシュにあるか\n\t\tthis.#si = new SndInf(\n\t\t\tfn,\n\t\t\tbuf,\n\t\t\tstart_ms,\n\t\t\tend_ms,\n\t\t\tret_ms,\n\t\t\tvolume,\n\t\t\tpan,\n\t\t\tsnd,\n\t\t);\n\t\t// @pixi/sound用基本パラメータ\n\t\tconst o: Options = {\n\t\t\tloop,\n\t\t\tspeed,\n\t\t\tvolume,\n\t\t\tloaded\t: (e, s2)=> {\n\t\t\t\tif (this.#si.stt.isDestroy) return;\n\t\t\t\tif (e) {main.errScript(`ロード失敗です SndBuf fn:${fn} ${e}`, false); return}\n\t\t\t\tif (! s2) return;\n\n\t\t\t\tthis.#si.addSnd(s2);\n\t\t\t\tif (pan !== 0) s2.filters = [new filters.StereoFilter(pan)];\n\t\t\t//\tif (! o.loop) sound.add(fn, snd);\t// 手動キャッシュすると単発連打で無音に\n\t\t\t\thArg.fnc?.();\n\t\t\t},\n\t\t};\n\n\t\t// start_ms・end_ms機能→@pixi/sound準備\n\t\tlet sp_nm = '';\n\t\tif (0 < start_ms || end_ms < SndBuf.#MAX_END_MS) {\n\t\t\tsp_nm = `${fn};${start_ms};${end_ms};${ret_ms}`;\n\t\t\tconst os = (o.sprites ??= {})[sp_nm] = {\n\t\t\t\tstart\t: start_ms /1000,\n\t\t\t\tend\t\t: end_ms /1000,\n\t\t\t};\n\t\t\to.preload = true;\t\t// loaded発生用、トラブルの元なので使用を控えたい\n\t\t\tconst old = o.loaded!;\n\t\t\to.loaded = (e, s0)=> {\n\t\t\t\tif (this.#si.stt.isDestroy) return;\n\n\t\t\t\told(e, s0);\n\t\t\t\tconst s2 = s0!;\n\t\t\t\tconst d = s2.duration;\n\t\t\t\tif (os.end < 0) {\t// 負の値は末尾から\n\t\t\t\t\tos.end += d;\n\t\t\t\t\ts2.removeSprites(sp_nm);\n\t\t\t\t\ts2.addSprites(sp_nm, os);\n\t\t\t\t}\n\t\t\t\tif (os.end <= os.start) main.errScript(`[playse] end_ms:${end_ms}(${os.end *1000}) >= start_ms:${start_ms} は異常値です`);\n\t\t\t\tif (os.end *1000 <= ret_ms) main.errScript(`[playse] end_ms:${end_ms}(${os.end *1000}) <= ret_ms:${ret_ms} は異常値です`);\n\t\t\t\tif (d <= os.start) main.errScript(`[playse] 音声ファイル再生時間:${d *1000} <= start_ms:${start_ms} は異常値です`);\n\t\t\t\tif (end_ms !== SndBuf.#MAX_END_MS && d <= os.end) main.errScript(`[playse] 音声ファイル再生時間:${d *1000} <= end_ms:${end_ms} は異常値です`);\n\n\t\t\t\ts2.play(sp_nm, snd=> o.complete?.(snd));\n\t\t\t\t\t// 流れ的にはすぐ下の「ループなし/あり」を呼ぶ\n\t\t\t};\n\t\t}\n\t\telse o.autoPlay = true;\n\n\t\t// ループなし ... 再生完了イベント\n\t\tif (! loop) o.complete = ()=> {\n\t\t\tstop2var(this.#si, buf);\n\t\t\tthis.#si.onPlayEnd();\n\t\t};\n\t\t// ループあり ... ret_ms処理\n\t\telse if (ret_ms !== 0) {\n\t\t\to.loop = false;\t// 一周目はループなしとする\n\t\t\to.complete = async snd=> {\n\t\t\t\tconst d = snd.duration;\n\t\t\t\tconst start\t= ret_ms /1000;\n\t\t\t\tconst end\t= end_ms /1000;\n\t\t\t\tif (d <= start) main.errScript(`[playse] 音声ファイル再生時間:${d *1000} <= ret_ms:${ret_ms} は異常値です`);\n\n\t\t\t\tawait snd.play({\t// 一周目はループなし、なのでキャッシュされてる\n\t\t\t\t\t...o,\n\t\t\t\t\tstart,\n\t\t\t\t\tend\t\t: (end < 0) ?end +d :end,// 負の値は末尾から\n\t\t\t\t//\tspeed,\t\t// 重複\n\t\t\t\t\tloop\t: true,\n\t\t\t\t//\tvolume,\t\t// 重複\n\t\t\t\t//-\tmuted?: boolean;\n\t\t\t\t\tfilters\t: pan !== 0 ?[new filters.StereoFilter(pan)] :[],\n\t\t\t\t//-\tcomplete?: CompleteCallback;\n\t\t\t\t//-\tloaded?: LoadedCallback;\n\t\t\t\t//-\tsingleInstance?: boolean;\n\t\t\t\t});\n\t\t\t\t//不要 this.#sb.snd = snd;\t// this.#sb.snd === snd (true)\n\t\t\t};\n\t\t}\n\n\t\tthis.#initVol();\n\t\tif (snd) {\n\t\t\tsnd.volume = volume;\t// 再生のたびに音量を戻す\n\t\t\tif (sp_nm) this.#playseSub(fn, o);\n\t\t\telse if (snd.isPlayable) {\n\t\t\t\tconst ab = snd.options.source;\n\t\t\t\tif (! (ab instanceof ArrayBuffer)\n\t\t\t\t\t|| ab.byteLength === 0) snd.play(o);\n\t\t\t\telse this.#si.addSnd(Sound.from({\n\t\t\t\t\t...o,\n\t\t\t\t\turl\t\t: snd.options.url,\n\t\t\t\t\tsource\t: ab,\n\t\t\t\t}));\n\t\t\t\tif (pan !== 0) snd.filters = [new filters.StereoFilter(pan)];\n\t\t\t}\n\t\t\tthis.#init_wait = false;\n\t\t\treturn;\n\t\t}\n\n\t\tconst join = this.#init_wait = argChk_Boolean(hArg, 'join', true);\n\t\tif (join) {\n\t\t\tdisableEvent();\n\t\t\tconst old = o.loaded!;\n\t\t\to.loaded = (e, s2)=> {\n\t\t\t\tif (! this.#si.stt.isDestroy) old(e, s2);\n\t\t\t\tenableEvent();\n\t\t\t};\n\t\t}\n\t\tthis.#playseSub(fn, o);\n\t}\n\t#initVol = ()=> {\n\t\tsound.volumeAll = Number(val.getVal('sys:sn.sound.global_volume', 1));\n\t\tthis.#initVol = ()=> {};\n\t};\n\t#playseSub(fn: string, o: Options) {\n\t\tconst src = cfg.searchPath(fn, SEARCH_PATH_ARG_EXT.SOUND);\n\t\tif (! src.endsWith('.bin')) {o.url = src; Sound.from(o); return}\n\n\t\t(new Loader).add({name: fn, url: src, xhrType: LoaderResource.XHR_RESPONSE_TYPE.BUFFER,})\n\t\t.use(async (res, next)=> {\n\t\t\ttry {\n\t\t\t\tres.data = await sys.decAB(res.data);\n\t\t\t} catch (e) {\n\t\t\t\tmain.errScript(`Sound ロード失敗ですc fn:${res.name} ${e}`, false);\n\t\t\t}\n\t\t\tnext();\n\t\t})\n\t\t.load((_ldr, hRes)=> {\t// このあと o.loaded() もコールされる\n\t\t\to.source = hRes[fn]?.data;\n\t\t\tSound.from(o);\n\t\t});\n\t}\n\n\n\tsetVol(vol: number) {this.#si.setVol(vol)}\n\n\tws =(hArg: HArg)=> this.#si.stt.ws(this.#si, hArg);\n\tstopse({buf = BUF_SE}: HArg) {\n\t\tstop2var(this.#si, buf);\n\t\tthis.#si.stt.stopse(this.#si);\n\t}\n\n\tfade =(hArg: HArg)=> this.#si.stt.fade(this.#si, hArg);\n\twf =(hArg: HArg)=> this.#si.stt.wf(this.#si, hArg);\n\tstopfadese =(hArg: HArg)=> this.#si.stt.stopfadese(this.#si, hArg);\n\n}\n\n\n// =================================================\nfunction stop2var({loop}: SndInf, buf: string) {\n\tif (loop) {SndBuf.delLoopPlay(buf); return}\n\n\tconst vn = 'const.sn.sound.'+ buf +'.';\n\tval.setVal_Nochk('tmp', vn +'playing', false);\n\tval.flush();\n}\n\n\nfunction stopfadese(tw: Tween) {tw.stop().end()}\t// stop()とend()は別\n\n// =================================================\n\n\ninterface ISndState {\n\tonLoad(si: SndInf)\t: void;\n\tstopse(si: SndInf)\t: void;\n\tws(si: SndInf, hArg: HArg): boolean;\n\tonPlayEnd(buf: string)\t: void;\n\tfade(si: SndInf, hArg: HArg): void;\n\twf(si: SndInf, hArg: HArg): boolean;\n\tcompFade(buf: string)\t: void;\n\tstopfadese(si: SndInf, hArg: HArg): void;\n\tisDestroy\t: boolean;\n}\n\nclass SsLoading implements ISndState {\n\tonLoad(si: SndInf)\t{si.stt = new SsPlaying}\n\tstopse(si: SndInf)\t{si.stt = new SsStop(si, false)}\n\tws =()=> false;\n\tonPlayEnd() {}\t\t// ok\n\tfade() {}\t\t\t// ok\n\twf =()=> false;\t\t// ok\n\tcompFade() {}\t\t// ok\n\tstopfadese() {}\t\t// ok\n\treadonly\tisDestroy\t= false;\n}\n\nclass SsPlaying implements ISndState {\n\tonLoad() {}\t\t\t// ok\n\tstopse(si: SndInf)\t{si.stt = new SsStop(si)}\n\tws(si: SndInf, hArg: HArg) {\n\t\tif (si.loop) return false;\n\n\t\tconst {buf = BUF_SE} = hArg;\n\t\tconst stop = argChk_Boolean(hArg, 'stop', true);\n\t\targChk_Boolean(hArg, 'canskip', false);\t// waitEvent() のデフォルトと違うので先行上書き\n\t\tif (evtMng.waitEvent('buf:'+ buf, hArg, ()=> {\t// 順番固定\n\t\t\tstop2var(si, buf);\n\t\t\tsi.onPlayEnd();\t// まず一回やる\n\t\t\tif (stop) si.stt.stopse(si); else si.stt.onPlayEnd = ()=> {};\n\t\t\t\t// else後は SsWaitingStop か SsStop の想定\n\t\t})) {\n\t\t\tsi.stt = new SsWaitingStop;\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\tonPlayEnd() {}\t\t// ok\n\tfade(si: SndInf, hArg: HArg) {\n\t\tconst {buf = BUF_SE} = hArg;\n\n\t\tconst vn = 'const.sn.sound.'+ buf +'.';\n\t\tconst bnV = vn +'volume';\n\t\tconst savevol = SndBuf.getVol(hArg, NaN);\n\t\tval.setVal_Nochk('save', bnV, savevol);\t// 目標音量(save:)\n\t\tconst vol = savevol * Number(val.getVal('sys:'+ bnV, 1))\n\t\tconst stop = argChk_Boolean(hArg, 'stop', (savevol === 0));\n\t\t\t// this.getVol() により savevol = hArg.volume\n\t\tif (stop) SndBuf.delLoopPlay(buf);\t// fade中reloadなど、できるだけ早く情報更新か\n\t\tval.flush();\n\n\t\tconst time = argChk_Num(hArg, 'time', NaN);\n\t\tconst delay = argChk_Num(hArg, 'delay', 0);\n\t\tif ((time === 0 && delay === 0) || evtMng.isSkipping) {\n\t\t\tsi.setVol(vol);\n\t\t\tsi.stt = stop ? new SsStop(si) : new SsPlaying;\n\t\t\treturn;\n\t\t}\n\n//console.log('fadese start from:%f to:%f', sb.snd.volume, vol);\n\t\tconst tw = si.tw();\n\t\tif (! tw) return;\n\t\tCmnTween.setTwProp(tw, hArg)\n\t\t.to({volume: vol}, time)\n\t\t.onComplete(()=> {\n\t\t\tremove(tw);\n\t\t\tsi.stt.compFade(buf);\n\t\t\tsi.stt = stop ? new SsStop(si) : new SsPlaying;\n\t\t})\n\t\t.start();\n\n\t\tsi.stt = new SsFade(tw);\n\t}\n\twf =()=> false;\t\t// ok\n\tcompFade() {}\t\t// ok\n\tstopfadese() {}\t\t// ok\n\treadonly\tisDestroy\t= false;\n}\n\nclass SsWaitingStop implements ISndState {\n\tonLoad() {}\t\t\t// ok\n\tstopse(si: SndInf)\t{si.stt = new SsStop(si)}\n\tws =()=> false;\t\t// ok\n\tonPlayEnd(buf: string)\t{evtMng.breakEvent('buf:'+ buf)}\n\tfade() {}\t\t\t// ok\n\twf =()=> false;\t\t// ok\n\tcompFade() {}\t\t// ok\n\tstopfadese() {}\t\t// ok\n\treadonly\tisDestroy\t= false;\n}\n\nclass SsFade implements ISndState {\n\tconstructor(readonly tw: Tween) {}\n\tonLoad() {}\t\t\t// ok\n\tstopse(si: SndInf)\t{stopfadese(this.tw); si.stt = new SsStop(si)}\t// 順番厳守\n\tws =()=> false;\t\t// ok ?\n\tonPlayEnd() {}\t\t// ok\n\tfade() {}\t\t\t// ok\n\twf(si: SndInf, hArg: HArg) {\n\t\tconst {buf = BUF_SE} = hArg;\n\t\targChk_Boolean(hArg, 'canskip', false);\t// waitEvent() のデフォルトと違うので先行上書き\n\t\tif (evtMng.waitEvent('buf:'+ buf, hArg, ()=> stopfadese(this.tw))) {\n\t\t\tsi.stt = new SsWaitingFade(this.tw);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\tcompFade() {}\t\t// ok\n\tstopfadese =()=> stopfadese(this.tw);\n\treadonly\tisDestroy\t= false;\n}\n\nclass SsWaitingFade implements ISndState {\n\tconstructor(readonly tw: Tween) {}\n\tonLoad() {}\t\t\t// ok\n\tstopse(si: SndInf)\t{stopfadese(this.tw); si.stt = new SsStop(si)}\n\tws =()=> false;\t\t// ok\n\tonPlayEnd() {}\t\t// ok\n\tfade() {}\t\t\t// ok\n\twf =()=> false;\t\t// ok\n\tcompFade(buf: string) {evtMng.breakEvent('buf:'+ buf)}\n\tstopfadese =()=> stopfadese(this.tw);\n\treadonly\tisDestroy\t= false;\n}\n\nclass SsStop implements ISndState {\n\tconstructor(readonly si: SndInf, readonly stop = true) {\n\t\tif (! stop) return;\n\n\t\tsi.stop();\n\t\tif (! si.loop) return;\t// destroy がないと再生が残るケースが。効果音だと破棄が激しいのでループモノ(BGM)だけにする\n\n\t\tsi.destroy();\n\t\tsi.destroy = ()=> {};\t// 再度コール時エラー対策\n\t}\n\tonLoad() {}\t\t\t// ok\n\tstopse() {}\t\t\t// ok\n\tws =()=> false;\t\t// ok\n\tonPlayEnd() {}\t\t// ok\n\tfade() {}\t\t\t// ok\n\twf =()=> false;\t\t// ok\n\tcompFade() {}\t\t// ok\n\tstopfadese() {}\t\t// ok\n\treadonly\tisDestroy\t= true;\n}\n","/* ***** BEGIN LICENSE BLOCK *****\n\tCopyright (c) 2018-2024 Famibee (famibee.blog38.fc2.com)\n\n\tThis software is released under the MIT License.\n\thttp://opensource.org/licenses/mit-license.php\n** ***** END LICENSE BLOCK ***** */\n\nimport {IEvtMng, argChk_Boolean, argChk_Num} from './CmnLib';\nimport {IHTag, HArg} from './Grammar';\nimport {IVariable, IMain, INoticeChgVolume} from './CmnInterface';\nimport {Config} from './Config';\nimport {SysBase} from './SysBase';\nimport {BUF_BGM, BUF_SE, HSndBuf, SndBuf} from './SndBuf';\n\nimport {sound, utils} from '@pixi/sound';\n\n\nexport class SoundMng {\n\t#hSndBuf\t: HSndBuf\t= {};\n\n\tconstructor(cfg: Config, hTag: IHTag, readonly val: IVariable, main: IMain, sys: SysBase) {\n\t\thTag.volume\t\t= o=> this.#volume(o);\t\t// 音量設定(独自拡張)\n\t\thTag.fadebgm\t= o=> this.#fadebgm(o);\t\t// BGMのフェード\n\t\thTag.fadeoutbgm\t= o=> this.#fadeoutbgm(o);\t// BGMのフェードアウト\n\t\thTag.fadeoutse\t= o=> this.#fadeoutse(o);\t// 効果音のフェードアウト\n\t\thTag.fadese\t\t= o=> this.#fadese(o);\t\t// 効果音のフェード\n\t\thTag.playbgm\t= o=> this.#playbgm(o);\t\t// BGM の演奏\n\t\thTag.playse\t\t= o=> this.#playse(o);\t\t// 効果音の再生\n\t\thTag.stop_allse\t= ()=> this.#stop_allse();\t// 全効果音再生の停止\n\t\thTag.stopbgm\t= o=> this.#stopbgm(o);\t\t// BGM 演奏の停止\n\t\thTag.stopse\t\t= o=> this.#stopse(o);\t\t// 効果音再生の停止\n\t\thTag.wb\t\t\t= o=> this.#wb(o);\t\t\t// BGM フェードの終了待ち\n\t\thTag.wf\t\t\t= o=> this.#wf(o);\t\t\t// 効果音フェードの終了待ち\n\t\thTag.stopfadese\t= o=> this.#stopfadese(o);\t// 音声フェードの停止\n\t\thTag.wl\t\t\t= o=> this.#wl(o);\t\t\t// BGM 再生の終了待ち\n\t\thTag.ws\t\t\t= o=> this.#ws(o);\t\t\t// 効果音再生の終了待ち\n\t\thTag.xchgbuf\t= o=> this.#xchgbuf(o);\t\t// 再生トラックの交換\n\n\t\tval.setVal_Nochk('save', 'const.sn.loopPlaying', '{}');\n\n\t\tval.setVal_Nochk('tmp', 'const.sn.sound.codecs', JSON.stringify(utils.supported));\n\n\t\tSndBuf.init(cfg, val, main, sys, this.#hSndBuf);\n\t\tsound.disableAutoPause = true;\n\t}\n\n\t#evtMng\t: IEvtMng;\n\tsetEvtMng(evtMng: IEvtMng) {this.#evtMng = evtMng; SndBuf.setEvtMng(evtMng)}\n\tsetNoticeChgVolume(setGlbVol: INoticeChgVolume, setMovVol: INoticeChgVolume) {\n\t\tthis.val.defValTrg('sys:sn.sound.global_volume', (_name: string, val: any)=> setGlbVol(sound.volumeAll = Number(val)));\n\t\tthis.val.defValTrg('sys:sn.sound.movie_volume', (_name: string, val: any)=> setMovVol(Number(val)));\n\n\t\t// 起動時初期値セット\n\t\tthis.val.setVal_Nochk('sys', 'sn.sound.global_volume', this.val.getVal('sys:sn.sound.global_volume', 1));\n\t\tthis.val.setVal_Nochk('sys', 'sn.sound.movie_volume', this.val.getVal('sys:sn.sound.movie_volume', 1));\n\t}\n\n\t//MARK: 音量設定(独自拡張)\n\t#volume(hArg: HArg) {\n\t\tconst {buf = BUF_SE} = hArg;\n\t\tconst vnV = 'const.sn.sound.'+ buf +'.volume';\n\t\tconst arg_vol = this.#getVol(hArg, 1);\n\t\tif (Number(this.val.getVal('sys:'+ vnV)) === arg_vol) return false;\n\n\t\tthis.val.setVal_Nochk('sys', vnV, arg_vol)\t// 基準音量(sys:)\n\t\tthis.val.flush();\t// fadese()内で必ずしも呼ばれないので\n\n\t\t// 再生中音声の一時的音量も変更\n\t\thArg.time = 0;\n\t\thArg.volume = Number(this.val.getVal('save:'+ vnV));\t// 目標音量(save:)\n\t\treturn this.#fadese(hArg);\n\t}\n\t#getVol(hArg: HArg, def: number) {\n\t\tconst vol = argChk_Num(hArg, 'volume', def);\n\t\tif (vol < 0) return 0;\n\t\tif (vol > 1) return 1;\n\t\treturn vol;\n\t}\n\n\t//MARK: BGM/効果音のフェードアウト(loadから使うのでマクロ化禁止)\n\t#fadeoutbgm(hArg: HArg) {hArg.volume = 0; return this.#fadebgm(hArg)}\n\t//MARK: 効果音のフェードアウト(loadから使うのでマクロ化禁止)\n\t#fadeoutse(hArg: HArg) {hArg.volume = 0; return this.#fadese(hArg)}\n\t//MARK: BGMのフェード(loadから使うのでマクロ化禁止)\n\t#fadebgm(hArg: HArg) {hArg.buf = BUF_BGM; return this.#fadese(hArg)}\n\t//MARK: 効果音のフェード\n\t#fadese(hArg: HArg) {\n\t\tconst {buf = BUF_SE} = hArg;\n\t\tthis.#stopfadese(hArg);\n\t\tthis.#hSndBuf[buf]?.fade(hArg);\n\n\t\treturn false;\n\t}\n\n\t//MARK: BGM の演奏\n\t#playbgm(hArg: HArg) {\n\t\thArg.buf = BUF_BGM;\n\t\thArg.canskip = false;\n\t\targChk_Boolean(hArg, 'loop', true);\n\t\treturn this.#playse(hArg);\n\t}\n\n\t//MARK: 効果音の再生\n\t#playse(hArg: HArg) {\n\t\tconst {buf = BUF_SE, fn} = hArg;\n\t\tthis.#stopse({buf});\n\t\tif (! fn) throw `fnは必須です buf:${buf}`;\n\n\t\t// isSkipKeyDown()は此処のみとする。タイミングによって変わる\n\t\tif (argChk_Boolean(hArg, 'canskip', true) && this.#evtMng.isSkipping) return false;\n\n\t\treturn SndBuf.generate(hArg);\n\t}\n\n\tclearCache() {sound.removeAll()}\n\n\t//MARK: 全効果音再生の停止\n\t#stop_allse() {\n\t\tfor (const buf of Object.keys(this.#hSndBuf)) this.#stopse({buf});\n\t\tthis.#hSndBuf = {};\n\n\t\tsound.stopAll();\t// 念のため\n\n\t\treturn false;\n\t}\n\t//MARK: BGM 演奏の停止(loadから使うのでマクロ化禁止)\n\t#stopbgm(hArg: HArg) {hArg.buf = BUF_BGM; return this.#stopse(hArg)}\n\t//MARK: 効果音再生の停止\n\t#stopse(hArg: HArg) {\n\t\tconst {buf = BUF_SE} = hArg;\n\t\tthis.#hSndBuf[buf]?.stopse(hArg);\n\n\t\treturn false;\n\t}\n\n\t//MARK: BGM フェードの終了待ち\n\t#wb(hArg: HArg) {hArg.buf = BUF_BGM; return this.#wf(hArg)}\n\n\t//MARK: 効果音フェードの終了待ち\n\t#wf(hArg: HArg) {\n\t\tconst {buf = BUF_SE} = hArg;\n\t\treturn this.#hSndBuf[buf]?.wf(hArg) as boolean;\n\t}\n\n\t//MARK: 音声フェードの停止\n\t#stopfadese(hArg: HArg) {\n\t\tconst {buf = BUF_SE} = hArg;\n\t\tthis.#hSndBuf[buf]?.stopfadese(hArg);\n\n\t\treturn false;\n\t}\n\n\t//MARK: BGM 再生の終了待ち\n\t#wl(hArg: HArg) {hArg.buf = BUF_BGM; return this.#ws(hArg)}\n\t//MARK: 効果音再生の終了待ち\n\t#ws(hArg: HArg) {\n\t\tconst {buf = BUF_SE} = hArg;\n\t\treturn this.#hSndBuf[buf]?.ws(hArg) as boolean;\n\t}\n\n\t//MARK: 再生トラックの交換\n\t#xchgbuf(hArg: HArg) {\n\t\tconst {buf: buf1 = BUF_SE, buf2 = BUF_SE} = hArg;\n\t\tif (buf1 === buf2) return false;\n\n\t\tconst a = this.#hSndBuf[buf1];\t// 分割代入の変数交換だと noUncheckedIndexedAccess エラーになるので\n\t\tconst b = this.#hSndBuf[buf2];\n\t\tif (a) this.#hSndBuf[buf2] = a; else delete this.#hSndBuf[buf2];\n\t\tif (b) this.#hSndBuf[buf1] = b; else delete this.#hSndBuf[buf1];\n\n\t\tSndBuf.xchgbuf(hArg);\n\n\t\treturn false;\n\t}\n\n\t//MARK: しおりの読込(BGM状態復元)\n\tplayLoopFromSaveObj(all_stop_and_play: boolean): Promise[] {\n\t\tconst lp = String(this.val.getVal('save:const.sn.loopPlaying', '{}'));\n\t\tif (lp === '{}') {this.#stop_allse(); this.clearCache(); return []}\n/*\n\t\t\t\t\t(Now)#hSndBuf\n\t\t\t\t\tstop\tplay\n\thSaveLP\tstop\t-\t\tstop\t\t--[1]\n\t(to)\tplay\tplay\tstop/play\t--[2]\n\t\t\teq play\tplay\t-\t\t\t--[2]\n*/\n\t\tconst hSaveLP: {[buf: string]: string} = JSON.parse(lp);\n\t\tif (all_stop_and_play) {this.#stop_allse(); this.clearCache()}\n\t\telse for (const [buf, sb] of Object.entries(this.#hSndBuf)) {\n\t\t\t// [1] #hSndBuf(再生中)だが hSaveLP(再生予定) にない buf -> stop\n\t\t\tif (! (buf in hSaveLP)) sb?.stopse({buf});\n\t\t}\n\n\t\t// [2] hSaveLP(再生予定)を再生。だが#hSndBuf(再生中)の状況で処理変更\n\t\treturn Object.entries(hSaveLP).map(([buf, fn])=> new Promise(re=> {\n\t\t\tconst sb = this.#hSndBuf[buf]\n\t\t\tif (! all_stop_and_play && sb) {\n\t\t\t\tif (sb.fn === fn) {re(); return}\n\t\t\t\t//sb.stopse({buf});\t// 再生中 fn !== 再生予定 fn なら stop\n\t\t\t\t\t// #playbgm()、#playse() 内で stop するので省略\n\t\t\t}\n\n\t\t\tconst vm = 'save:const.sn.sound.'+ buf +'.';\n\t\t\tconst hArg = {\n\t\t\t\tfn,\n\t\t\t\tbuf,\n\t\t\t\tjoin\t: false,\n\t\t\t\tloop\t: true,\n\t\t\t\tvolume\t: Number(this.val.getVal(vm +'volume')),\n\t\t\t\tstart_ms: Number(this.val.getVal(vm +'start_ms')),\n\t\t\t\tend_ms\t: Number(this.val.getVal(vm +'end_ms')),\n\t\t\t\tret_ms\t: Number(this.val.getVal(vm +'ret_ms')),\n\t\t\t\tfnc\t\t: re,\t// loaded\n\t\t\t};\n\t\t\tif (hArg.buf === BUF_BGM) this.#playbgm(hArg);\n\t\t\telse this.#playse(hArg);\n\t\t}));\n\t}\n\n\tdestroy() {this.#stop_allse(); this.clearCache()}\n\n}\n"],"names":["s","u","a","t","e","n","c","l","o","i","p","h","f","r","d","_","y","m","b","g","v","P","x","O","j","w","A","F","E","C","L","S","M","T","G","I","R","n.extensions","SndInf","fn","buf","start_ms","end_ms","ret_ms","volume","pan","snd","SsPlaying","SsLoading","#vol_mul_talking","filters","vol","Tween","#onStop","BUF_VOICE","val","hSndBuf","BUF_BGM","_vol","cfg","main","sys","evtMng","BUF_SE","SndBuf","hArg","argChk_Num","#MAX_END_MS","speed","vn","savevol","loop","argChk_Boolean","#hLP","sound","#si","s2","sp_nm","os","old","s0","start","end","stop2var","#initVol","#playseSub","ab","Sound","#init_wait","disableEvent","enableEvent","$cfg","$val","$main","$sys","$hSndBuf","$evtMng","def","buf1","buf2","n1","v1","f1","n2","v2","f2","src","SEARCH_PATH_ARG_EXT","Loader","LoaderResource","res","next","_ldr","hRes","stopfadese","tw","si","SsStop","stop","SsWaitingStop","bnV","time","delay","CmnTween","remove","SsFade","SsWaitingFade","SoundMng","hTag","#volume","#fadebgm","#fadeoutbgm","#fadeoutse","#fadese","#playbgm","#playse","#stop_allse","#stopbgm","#stopse","#wb","#wf","#stopfadese","#wl","#ws","#xchgbuf","utils","#hSndBuf","#evtMng","setGlbVol","setMovVol","_name","vnV","arg_vol","#getVol","all_stop_and_play","lp","hSaveLP","sb","re","vm"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQkN,IAAIA;AAAE,SAASC,IAAG;AAAC,SAAOD;AAAC;AAAC,IAAIE,KAAE,SAASC,GAAEC,GAAE;AAAC,UAAOF,KAAE,OAAO,kBAAgB,EAAC,WAAU,CAAE,EAAA,aAAY,SAAO,SAASC,GAAEC,GAAE;AAAC,IAAAD,EAAE,YAAUC;AAAA,EAAC,KAAG,SAASD,GAAEC,GAAE;AAAC,aAAQC,KAAKD,EAAE,QAAO,UAAU,eAAe,KAAKA,GAAEC,CAAC,MAAIF,EAAEE,CAAC,IAAED,EAAEC,CAAC;AAAA,EAAE,GAAGF,GAAEC,CAAC;AAAC;AAAE,SAASE,EAAEH,GAAEC,GAAE;AAAC,MAAe,OAAOA,KAAnB,cAA6BA,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AExD,MAAO1G,KAAOoH,QAAc,OAAO,EAAC,KAAApH,GAAI;AAIzC,WAAO,OAAO,QAAQoH,CAAO,EAAE,IAAI,CAAC,CAACpH,GAAKD,CAAE,MAAK,IAAI,QAAQ,CAAKuH,MAAA;AAC3D,YAAAD,IAAK,KAAKX,GAAS1G,CAAG;AACxB,UAAA,CAAEkH,KAAqBG,KACtBA,EAAG,OAAOtH,GAAI;AAAI,QAAAuH,EAAA;AAAG;AAAA,MAAA;AAKpB,YAAAC,IAAK,yBAAwBvH,IAAK,KAClCyB,IAAO;AAAA,QACZ,IAAA1B;AAAA,QACA,KAAAC;AAAA,QACA,MAAO;AAAA,QACP,MAAO;AAAA,QACP,QAAS,OAAO,KAAK,IAAI,OAAOuH,IAAI,QAAQ,CAAC;AAAA,QAC7C,UAAU,OAAO,KAAK,IAAI,OAAOA,IAAI,UAAU,CAAC;AAAA,QAChD,QAAS,OAAO,KAAK,IAAI,OAAOA,IAAI,QAAQ,CAAC;AAAA,QAC7C,QAAS,OAAO,KAAK,IAAI,OAAOA,IAAI,QAAQ,CAAC;AAAA,QAC7C,KAAOD;AAAA;AAAA,MACR;AACA,MAAI7F,EAAK,QAAQR,IAAS,KAAK6E,GAASrE,CAAI,IACvC,KAAKsE,GAAQtE,CAAI;AAAA,IAAA,CACtB,CAAC;AAAA,EAAA;AAAA,EAGH,UAAU;AAAC,SAAKuE,GAAY,GAAG,KAAK,WAAW;AAAA,EAAA;AAEhD;","x_google_ignoreList":[0]} \ No newline at end of file +{"version":3,"file":"SoundMng.js","sources":["../node_modules/@pixi/sound/dist/pixi-sound.esm.mjs","../src/sn/SndBuf.ts","../src/sn/SoundMng.ts"],"sourcesContent":["/*!\n * @pixi/sound - v4.4.1\n * https://github.com/pixijs/pixi-sound\n * Compiled Tue, 15 Aug 2023 19:22:13 UTC\n *\n * @pixi/sound is licensed under the MIT license.\n * http://www.opensource.org/licenses/mit-license\n */\nimport{LoaderResource as t,Loader as e}from\"@pixi/loaders\";import*as n from\"@pixi/core\";import{BaseTexture as o}from\"@pixi/core\";import{EventEmitter as i}from\"@pixi/utils\";import{Ticker as r}from\"@pixi/ticker\";var s;function u(){return s}var a=function(t,e){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function c(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Class extends value \"+String(e)+\" is not a constructor or null\");function n(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var l=function(){return(l=Object.assign||function(t){for(var e,n=1,o=arguments.length;n-1?t.sound=u().add(t.name,{loaded:e,preload:!0,url:t.url,source:t.data}):e()},e.extension=\"loader\",e}(),b=0,g=function(t){function e(e){var n=t.call(this)||this;return n.id=b++,n.init(e),n}return c(e,t),e.prototype.set=function(t,e){if(void 0===this[t])throw new Error(\"Property with name \".concat(t,\" does not exist.\"));switch(t){case\"speed\":this.speed=e;break;case\"volume\":this.volume=e;break;case\"paused\":this.paused=e;break;case\"loop\":this.loop=e;break;case\"muted\":this.muted=e}return this},Object.defineProperty(e.prototype,\"progress\",{get:function(){return this._source.currentTime/this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"paused\",{get:function(){return this._paused},set:function(t){this._paused=t,this.refreshPaused()},enumerable:!1,configurable:!0}),e.prototype._onPlay=function(){this._playing=!0},e.prototype._onPause=function(){this._playing=!1},e.prototype.init=function(t){this._playing=!1,this._duration=t.source.duration;var e=this._source=t.source.cloneNode(!1);e.src=t.parent.url,e.onplay=this._onPlay.bind(this),e.onpause=this._onPause.bind(this),t.context.on(\"refresh\",this.refresh,this),t.context.on(\"refreshPaused\",this.refreshPaused,this),this._media=t},e.prototype._internalStop=function(){this._source&&this._playing&&(this._source.onended=null,this._source.pause())},e.prototype.stop=function(){this._internalStop(),this._source&&this.emit(\"stop\")},Object.defineProperty(e.prototype,\"speed\",{get:function(){return this._speed},set:function(t){this._speed=t,this.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"volume\",{get:function(){return this._volume},set:function(t){this._volume=t,this.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"loop\",{get:function(){return this._loop},set:function(t){this._loop=t,this.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"muted\",{get:function(){return this._muted},set:function(t){this._muted=t,this.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"filters\",{get:function(){return null},set:function(t){},enumerable:!1,configurable:!0}),e.prototype.refresh=function(){var t=this._media.context,e=this._media.parent;this._source.loop=this._loop||e.loop;var n=t.volume*(t.muted?0:1),o=e.volume*(e.muted?0:1),i=this._volume*(this._muted?0:1);this._source.volume=i*n*o,this._source.playbackRate=this._speed*t.speed*e.speed},e.prototype.refreshPaused=function(){var t=this._media.context,e=this._media.parent,n=this._paused||e.paused||t.paused;n!==this._pausedReal&&(this._pausedReal=n,n?(this._internalStop(),this.emit(\"paused\")):(this.emit(\"resumed\"),this.play({start:this._source.currentTime,end:this._end,volume:this._volume,speed:this._speed,loop:this._loop})),this.emit(\"pause\",n))},e.prototype.play=function(t){var n=this,o=t.start,i=t.end,s=t.speed,u=t.loop,a=t.volume,c=t.muted;this._speed=s,this._volume=a,this._loop=!!u,this._muted=c,this.refresh(),this.loop&&null!==i&&(this.loop=!1),this._start=o,this._end=i||this._duration,this._start=Math.max(0,this._start-e.PADDING),this._end=Math.min(this._end+e.PADDING,this._duration),this._source.onloadedmetadata=function(){n._source&&(n._source.currentTime=o,n._source.onloadedmetadata=null,n.emit(\"progress\",o,n._duration),r.shared.add(n._onUpdate,n))},this._source.onended=this._onComplete.bind(this),this._source.play(),this.emit(\"start\")},e.prototype._onUpdate=function(){this.emit(\"progress\",this.progress,this._duration),this._source.currentTime>=this._end&&!this._source.loop&&this._onComplete()},e.prototype._onComplete=function(){r.shared.remove(this._onUpdate,this),this._internalStop(),this.emit(\"progress\",1,this._duration),this.emit(\"end\",this)},e.prototype.destroy=function(){r.shared.remove(this._onUpdate,this),this.removeAllListeners();var t=this._source;t&&(t.onended=null,t.onplay=null,t.onpause=null,this._internalStop()),this._source=null,this._speed=1,this._volume=1,this._loop=!1,this._end=null,this._start=0,this._duration=0,this._playing=!1,this._pausedReal=!1,this._paused=!1,this._muted=!1,this._media&&(this._media.context.off(\"refresh\",this.refresh,this),this._media.context.off(\"refreshPaused\",this.refreshPaused,this),this._media=null)},e.prototype.toString=function(){return\"[HTMLAudioInstance id=\".concat(this.id,\"]\")},e.PADDING=.1,e}(i),v=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.init=function(t){this.parent=t,this._source=t.options.source||new Audio,t.url&&(this._source.src=t.url)},e.prototype.create=function(){return new g(this)},Object.defineProperty(e.prototype,\"isPlayable\",{get:function(){return!!this._source&&4===this._source.readyState},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"duration\",{get:function(){return this._source.duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"context\",{get:function(){return this.parent.context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"filters\",{get:function(){return null},set:function(t){},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){this.removeAllListeners(),this.parent=null,this._source&&(this._source.src=\"\",this._source.load(),this._source=null)},Object.defineProperty(e.prototype,\"source\",{get:function(){return this._source},enumerable:!1,configurable:!0}),e.prototype.load=function(t){var e=this._source,n=this.parent;if(4!==e.readyState)if(n.url){e.src=n.url;var o=function(){s(),n.isLoaded=!0;var e=n.autoPlayStart();t&&t(null,n,e)},i=function(){s(),t&&t(new Error(\"Sound loading has been aborted\"))},r=function(){s();var n=\"Failed to load audio element (code: \".concat(e.error.code,\")\");t&&t(new Error(n))},s=function(){e.removeEventListener(\"canplaythrough\",o),e.removeEventListener(\"load\",o),e.removeEventListener(\"abort\",i),e.removeEventListener(\"error\",r)};e.addEventListener(\"canplaythrough\",o,!1),e.addEventListener(\"load\",o,!1),e.addEventListener(\"abort\",i,!1),e.addEventListener(\"error\",r,!1),e.load()}else t(new Error(\"sound.url or sound.source must be set\"));else{n.isLoaded=!0;var u=n.autoPlayStart();t&&setTimeout((function(){t(null,n,u)}),0)}},e}(i),P=function(){function t(t,e){this.parent=t,Object.assign(this,e),this.duration=this.end-this.start}return t.prototype.play=function(t){return this.parent.play({complete:t,speed:this.speed||this.parent.speed,end:this.end,start:this.start,loop:this.loop})},t.prototype.destroy=function(){this.parent=null},t}(),x=function(){function t(){}return t.setParamValue=function(t,e){if(t.setValueAtTime){var n=u().context;t.setValueAtTime(e,n.audioContext.currentTime)}else t.value=e;return e},t}(),O=0,j=function(t){function e(e){var n=t.call(this)||this;return n.id=O++,n._media=null,n._paused=!1,n._muted=!1,n._elapsed=0,n.init(e),n}return c(e,t),e.prototype.set=function(t,e){if(void 0===this[t])throw new Error(\"Property with name \".concat(t,\" does not exist.\"));switch(t){case\"speed\":this.speed=e;break;case\"volume\":this.volume=e;break;case\"muted\":this.muted=e;break;case\"loop\":this.loop=e;break;case\"paused\":this.paused=e}return this},e.prototype.stop=function(){this._source&&(this._internalStop(),this.emit(\"stop\"))},Object.defineProperty(e.prototype,\"speed\",{get:function(){return this._speed},set:function(t){this._speed=t,this.refresh(),this._update(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"volume\",{get:function(){return this._volume},set:function(t){this._volume=t,this.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"muted\",{get:function(){return this._muted},set:function(t){this._muted=t,this.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"loop\",{get:function(){return this._loop},set:function(t){this._loop=t,this.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"filters\",{get:function(){return this._filters},set:function(t){var e;this._filters&&(null===(e=this._filters)||void 0===e||e.filter((function(t){return t})).forEach((function(t){return t.disconnect()})),this._filters=null,this._source.connect(this._gain)),this._filters=(null==t?void 0:t.length)?t.slice(0):null,this.refresh()},enumerable:!1,configurable:!0}),e.prototype.refresh=function(){if(this._source){var t=this._media.context,e=this._media.parent;this._source.loop=this._loop||e.loop;var n=t.volume*(t.muted?0:1),o=e.volume*(e.muted?0:1),i=this._volume*(this._muted?0:1);x.setParamValue(this._gain.gain,i*o*n),x.setParamValue(this._source.playbackRate,this._speed*e.speed*t.speed),this.applyFilters()}},e.prototype.applyFilters=function(){var t;if(null===(t=this._filters)||void 0===t?void 0:t.length){this._source.disconnect();var e=this._source;this._filters.forEach((function(t){e.connect(t.destination),e=t})),e.connect(this._gain)}},e.prototype.refreshPaused=function(){var t=this._media.context,e=this._media.parent,n=this._paused||e.paused||t.paused;n!==this._pausedReal&&(this._pausedReal=n,n?(this._internalStop(),this.emit(\"paused\")):(this.emit(\"resumed\"),this.play({start:this._elapsed%this._duration,end:this._end,speed:this._speed,loop:this._loop,volume:this._volume})),this.emit(\"pause\",n))},e.prototype.play=function(t){var e=t.start,n=t.end,o=t.speed,i=t.loop,r=t.volume,s=t.muted,u=t.filters;this._paused=!1;var a=this._media.nodes.cloneBufferSource(),c=a.source,l=a.gain;this._source=c,this._gain=l,this._speed=o,this._volume=r,this._loop=!!i,this._muted=s,this._filters=u,this.refresh();var p=this._source.buffer.duration;this._duration=p,this._end=n,this._lastUpdate=this._now(),this._elapsed=e,this._source.onended=this._onComplete.bind(this),this._loop?(this._source.loopEnd=n,this._source.loopStart=e,this._source.start(0,e)):n?this._source.start(0,e,n-e):this._source.start(0,e),this.emit(\"start\"),this._update(!0),this.enableTicker(!0)},e.prototype.enableTicker=function(t){r.shared.remove(this._updateListener,this),t&&r.shared.add(this._updateListener,this)},Object.defineProperty(e.prototype,\"progress\",{get:function(){return this._progress},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"paused\",{get:function(){return this._paused},set:function(t){this._paused=t,this.refreshPaused()},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){var t;this.removeAllListeners(),this._internalStop(),this._gain&&(this._gain.disconnect(),this._gain=null),this._media&&(this._media.context.events.off(\"refresh\",this.refresh,this),this._media.context.events.off(\"refreshPaused\",this.refreshPaused,this),this._media=null),null===(t=this._filters)||void 0===t||t.forEach((function(t){return t.disconnect()})),this._filters=null,this._end=null,this._speed=1,this._volume=1,this._loop=!1,this._elapsed=0,this._duration=0,this._paused=!1,this._muted=!1,this._pausedReal=!1},e.prototype.toString=function(){return\"[WebAudioInstance id=\".concat(this.id,\"]\")},e.prototype._now=function(){return this._media.context.audioContext.currentTime},e.prototype._updateListener=function(){this._update()},e.prototype._update=function(t){if(void 0===t&&(t=!1),this._source){var e=this._now(),n=e-this._lastUpdate;if(n>0||t){var o=this._source.playbackRate.value;this._elapsed+=n*o,this._lastUpdate=e;var i=this._duration,r=void 0;if(this._source.loopStart){var s=this._source.loopEnd-this._source.loopStart;r=(this._source.loopStart+this._elapsed%s)/i}else r=this._elapsed%i/i;this._progress=r,this.emit(\"progress\",this._progress,i)}}},e.prototype.init=function(t){this._media=t,t.context.events.on(\"refresh\",this.refresh,this),t.context.events.on(\"refreshPaused\",this.refreshPaused,this)},e.prototype._internalStop=function(){if(this._source){this.enableTicker(!1),this._source.onended=null,this._source.stop(0),this._source.disconnect();try{this._source.buffer=null}catch(t){}this._source=null}},e.prototype._onComplete=function(){if(this._source){this.enableTicker(!1),this._source.onended=null,this._source.disconnect();try{this._source.buffer=null}catch(t){}}this._source=null,this._progress=1,this.emit(\"progress\",1,this._duration),this.emit(\"end\",this)},e}(i),w=function(){function t(t,e){this._output=e,this._input=t}return Object.defineProperty(t.prototype,\"destination\",{get:function(){return this._input},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"filters\",{get:function(){return this._filters},set:function(t){var e=this;if(this._filters&&(this._filters.forEach((function(t){t&&t.disconnect()})),this._filters=null,this._input.connect(this._output)),t&&t.length){this._filters=t.slice(0),this._input.disconnect();var n=null;t.forEach((function(t){null===n?e._input.connect(t.destination):n.connect(t.destination),n=t})),n.connect(this._output)}},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){this.filters=null,this._input=null,this._output=null},t}(),A=function(t){function e(e){var n=this,o=e.audioContext,i=o.createBufferSource(),r=o.createGain(),s=o.createAnalyser();return i.connect(s),s.connect(r),r.connect(e.destination),(n=t.call(this,s,r)||this).context=e,n.bufferSource=i,n.gain=r,n.analyser=s,n}return c(e,t),Object.defineProperty(e.prototype,\"script\",{get:function(){return this._script||(this._script=this.context.audioContext.createScriptProcessor(e.BUFFER_SIZE),this._script.connect(this.context.destination)),this._script},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.bufferSource.disconnect(),this._script&&this._script.disconnect(),this.gain.disconnect(),this.analyser.disconnect(),this.bufferSource=null,this._script=null,this.gain=null,this.analyser=null,this.context=null},e.prototype.cloneBufferSource=function(){var t=this.bufferSource,e=this.context.audioContext.createBufferSource();e.buffer=t.buffer,x.setParamValue(e.playbackRate,t.playbackRate.value),e.loop=t.loop;var n=this.context.audioContext.createGain();return e.connect(n),n.connect(this.destination),{source:e,gain:n}},Object.defineProperty(e.prototype,\"bufferSize\",{get:function(){return this.script.bufferSize},enumerable:!1,configurable:!0}),e.BUFFER_SIZE=0,e}(w),F=function(){function t(){}return t.prototype.init=function(t){this.parent=t,this._nodes=new A(this.context),this._source=this._nodes.bufferSource,this.source=t.options.source},t.prototype.destroy=function(){this.parent=null,this._nodes.destroy(),this._nodes=null;try{this._source.buffer=null}catch(t){}this._source=null,this.source=null},t.prototype.create=function(){return new j(this)},Object.defineProperty(t.prototype,\"context\",{get:function(){return this.parent.context},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"isPlayable\",{get:function(){return!!this._source&&!!this._source.buffer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"filters\",{get:function(){return this._nodes.filters},set:function(t){this._nodes.filters=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"duration\",{get:function(){return this._source.buffer.duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"buffer\",{get:function(){return this._source.buffer},set:function(t){this._source.buffer=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"nodes\",{get:function(){return this._nodes},enumerable:!1,configurable:!0}),t.prototype.load=function(t){this.source?this._decode(this.source,t):this.parent.url?this._loadUrl(t):t&&t(new Error(\"sound.url or sound.source must be set\"))},t.prototype._loadUrl=function(t){var e=this,n=new XMLHttpRequest,o=this.parent.url;n.open(\"GET\",o,!0),n.responseType=\"arraybuffer\",n.onload=function(){e.source=n.response,e._decode(n.response,t)},n.send()},t.prototype._decode=function(t,e){var n=this,o=function(t,o){if(t)e&&e(t);else{n.parent.isLoaded=!0,n.buffer=o;var i=n.parent.autoPlayStart();e&&e(null,n.parent,i)}};t instanceof AudioBuffer?o(null,t):this.parent.context.decode(t,o)},t}(),E=function(){function t(t,e){this.media=t,this.options=e,this._instances=[],this._sprites={},this.media.init(this);var n=e.complete;this._autoPlayOptions=n?{complete:n}:null,this.isLoaded=!1,this.isPlaying=!1,this.autoPlay=e.autoPlay,this.singleInstance=e.singleInstance,this.preload=e.preload||this.autoPlay,this.url=e.url,this.speed=e.speed,this.volume=e.volume,this.loop=e.loop,e.sprites&&this.addSprites(e.sprites),this.preload&&this._preload(e.loaded)}return t.from=function(e){var n={};return\"string\"==typeof e?n.url=e:e instanceof ArrayBuffer||e instanceof AudioBuffer||e instanceof HTMLAudioElement?n.source=e:n=e,(n=l({autoPlay:!1,singleInstance:!1,url:null,source:null,preload:!1,volume:1,speed:1,complete:null,loaded:null,loop:!1},n)).url&&(n.url=_(n.url)),Object.freeze(n),new t(u().useLegacy?new v:new F,n)},Object.defineProperty(t.prototype,\"context\",{get:function(){return u().context},enumerable:!1,configurable:!0}),t.prototype.pause=function(){return this.isPlaying=!1,this.paused=!0,this},t.prototype.resume=function(){return this.isPlaying=this._instances.length>0,this.paused=!1,this},Object.defineProperty(t.prototype,\"paused\",{get:function(){return this._paused},set:function(t){this._paused=t,this.refreshPaused()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"speed\",{get:function(){return this._speed},set:function(t){this._speed=t,this.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"filters\",{get:function(){return this.media.filters},set:function(t){this.media.filters=t},enumerable:!1,configurable:!0}),t.prototype.addSprites=function(t,e){if(\"object\"==typeof t){var n={};for(var o in t)n[o]=this.addSprites(o,t[o]);return n}var i=new P(this,e);return this._sprites[t]=i,i},t.prototype.destroy=function(){this._removeInstances(),this.removeSprites(),this.media.destroy(),this.media=null,this._sprites=null,this._instances=null},t.prototype.removeSprites=function(t){if(t){var e=this._sprites[t];void 0!==e&&(e.destroy(),delete this._sprites[t])}else for(var n in this._sprites)this.removeSprites(n);return this},Object.defineProperty(t.prototype,\"isPlayable\",{get:function(){return this.isLoaded&&this.media&&this.media.isPlayable},enumerable:!1,configurable:!0}),t.prototype.stop=function(){if(!this.isPlayable)return this.autoPlay=!1,this._autoPlayOptions=null,this;this.isPlaying=!1;for(var t=this._instances.length-1;t>=0;t--)this._instances[t].stop();return this},t.prototype.play=function(t,e){var n,o=this;\"string\"==typeof t?n={sprite:r=t,loop:this.loop,complete:e}:\"function\"==typeof t?(n={}).complete=t:n=t;if((n=l({complete:null,loaded:null,sprite:null,end:null,start:0,volume:1,speed:1,muted:!1,loop:!1},n||{})).sprite){var i=n.sprite,r=this._sprites[i];n.start=r.start+(n.start||0),n.end=r.end,n.speed=r.speed||1,n.loop=r.loop||n.loop,delete n.sprite}if(n.offset&&(n.start=n.offset),!this.isLoaded)return new Promise((function(t,e){o.autoPlay=!0,o._autoPlayOptions=n,o._preload((function(o,i,r){o?e(o):(n.loaded&&n.loaded(o,i,r),t(r))}))}));(this.singleInstance||n.singleInstance)&&this._removeInstances();var s=this._createInstance();return this._instances.push(s),this.isPlaying=!0,s.once(\"end\",(function(){n.complete&&n.complete(o),o._onComplete(s)})),s.once(\"stop\",(function(){o._onComplete(s)})),s.play(n),s},t.prototype.refresh=function(){for(var t=this._instances.length,e=0;e=0;t--)this._poolInstance(this._instances[t]);this._instances.length=0},t.prototype._onComplete=function(t){if(this._instances){var e=this._instances.indexOf(t);e>-1&&this._instances.splice(e,1),this.isPlaying=this._instances.length>0}this._poolInstance(t)},t.prototype._createInstance=function(){if(t._pool.length>0){var e=t._pool.pop();return e.init(this.media),e}return this.media.create()},t.prototype._poolInstance=function(e){e.destroy(),t._pool.indexOf(e)<0&&t._pool.push(e)},t._pool=[],t}(),C=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.speed=1,e.muted=!1,e.volume=1,e.paused=!1,e}return c(e,t),e.prototype.refresh=function(){this.emit(\"refresh\")},e.prototype.refreshPaused=function(){this.emit(\"refreshPaused\")},Object.defineProperty(e.prototype,\"filters\",{get:function(){return null},set:function(t){},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"audioContext\",{get:function(){return null},enumerable:!1,configurable:!0}),e.prototype.toggleMute=function(){return this.muted=!this.muted,this.refresh(),this.muted},e.prototype.togglePause=function(){return this.paused=!this.paused,this.refreshPaused(),this.paused},e.prototype.destroy=function(){this.removeAllListeners()},e}(i),L=function(t){function e(){var n=t.call(this,null,null)||this;n.autoPause=!0;var o=window,r=new e.AudioContext,s=r.createDynamicsCompressor(),u=r.createAnalyser();return u.connect(s),s.connect(r.destination),n._input=u,n._output=r.destination,n._ctx=r,n._offlineCtx=new e.OfflineAudioContext(1,2,o.OfflineAudioContext?Math.max(8e3,Math.min(96e3,r.sampleRate)):44100),n.compressor=s,n.analyser=u,n.events=new i,n.volume=1,n.speed=1,n.muted=!1,n.paused=!1,n._locked=\"suspended\"===r.state&&(\"ontouchstart\"in globalThis||\"onclick\"in globalThis),n._locked&&(n._unlock(),n._unlock=n._unlock.bind(n),document.addEventListener(\"mousedown\",n._unlock,!0),document.addEventListener(\"touchstart\",n._unlock,!0),document.addEventListener(\"touchend\",n._unlock,!0)),n.onFocus=n.onFocus.bind(n),n.onBlur=n.onBlur.bind(n),globalThis.addEventListener(\"focus\",n.onFocus),globalThis.addEventListener(\"blur\",n.onBlur),n}return c(e,t),e.prototype.onFocus=function(){if(this.autoPause){var t=this._ctx.state;\"suspended\"!==t&&\"interrupted\"!==t&&this._locked||(this.paused=this._pausedOnBlur,this.refreshPaused())}},e.prototype.onBlur=function(){this.autoPause&&(this._locked||(this._pausedOnBlur=this._paused,this.paused=!0,this.refreshPaused()))},e.prototype._unlock=function(){this._locked&&(this.playEmptySound(),\"running\"===this._ctx.state&&(document.removeEventListener(\"mousedown\",this._unlock,!0),document.removeEventListener(\"touchend\",this._unlock,!0),document.removeEventListener(\"touchstart\",this._unlock,!0),this._locked=!1))},e.prototype.playEmptySound=function(){var t=this._ctx.createBufferSource();t.buffer=this._ctx.createBuffer(1,1,22050),t.connect(this._ctx.destination),t.start(0,0,0),\"suspended\"===t.context.state&&t.context.resume()},Object.defineProperty(e,\"AudioContext\",{get:function(){var t=window;return t.AudioContext||t.webkitAudioContext||null},enumerable:!1,configurable:!0}),Object.defineProperty(e,\"OfflineAudioContext\",{get:function(){var t=window;return t.OfflineAudioContext||t.webkitOfflineAudioContext||null},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){t.prototype.destroy.call(this);var e=this._ctx;void 0!==e.close&&e.close(),globalThis.removeEventListener(\"focus\",this.onFocus),globalThis.removeEventListener(\"blur\",this.onBlur),this.events.removeAllListeners(),this.analyser.disconnect(),this.compressor.disconnect(),this.analyser=null,this.compressor=null,this.events=null,this._offlineCtx=null,this._ctx=null},Object.defineProperty(e.prototype,\"audioContext\",{get:function(){return this._ctx},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"offlineContext\",{get:function(){return this._offlineCtx},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"paused\",{get:function(){return this._paused},set:function(t){t&&\"running\"===this._ctx.state?this._ctx.suspend():t||\"suspended\"!==this._ctx.state||this._ctx.resume(),this._paused=t},enumerable:!1,configurable:!0}),e.prototype.refresh=function(){this.events.emit(\"refresh\")},e.prototype.refreshPaused=function(){this.events.emit(\"refreshPaused\")},e.prototype.toggleMute=function(){return this.muted=!this.muted,this.refresh(),this.muted},e.prototype.togglePause=function(){return this.paused=!this.paused,this.refreshPaused(),this._paused},e.prototype.decode=function(t,e){var n=function(t){e(new Error((null==t?void 0:t.message)||\"Unable to decode file\"))},o=this._offlineCtx.decodeAudioData(t,(function(t){e(null,t)}),n);o&&o.catch(n)},e}(w),S=function(){function t(){this.init()}return t.prototype.init=function(){return this.supported&&(this._webAudioContext=new L),this._htmlAudioContext=new C,this._sounds={},this.useLegacy=!this.supported,this},Object.defineProperty(t.prototype,\"context\",{get:function(){return this._context},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"filtersAll\",{get:function(){return this.useLegacy?[]:this._context.filters},set:function(t){this.useLegacy||(this._context.filters=t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"supported\",{get:function(){return null!==L.AudioContext},enumerable:!1,configurable:!0}),t.prototype.add=function(t,e){if(\"object\"==typeof t){var n={};for(var o in t){var i=this._getOptions(t[o],e);n[o]=this.add(o,i)}return n}if(e instanceof E)return this._sounds[t]=e,e;var r=this._getOptions(e),s=E.from(r);return this._sounds[t]=s,s},t.prototype._getOptions=function(t,e){var n;return n=\"string\"==typeof t?{url:t}:t instanceof ArrayBuffer||t instanceof AudioBuffer||t instanceof HTMLAudioElement?{source:t}:t,n=l(l({},n),e||{})},Object.defineProperty(t.prototype,\"useLegacy\",{get:function(){return this._useLegacy},set:function(t){m.setLegacy(t),this._useLegacy=t,this._context=!t&&this.supported?this._webAudioContext:this._htmlAudioContext},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"disableAutoPause\",{get:function(){return!this._webAudioContext.autoPause},set:function(t){this._webAudioContext.autoPause=!t},enumerable:!1,configurable:!0}),t.prototype.remove=function(t){return this.exists(t,!0),this._sounds[t].destroy(),delete this._sounds[t],this},Object.defineProperty(t.prototype,\"volumeAll\",{get:function(){return this._context.volume},set:function(t){this._context.volume=t,this._context.refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,\"speedAll\",{get:function(){return this._context.speed},set:function(t){this._context.speed=t,this._context.refresh()},enumerable:!1,configurable:!0}),t.prototype.togglePauseAll=function(){return this._context.togglePause()},t.prototype.pauseAll=function(){return this._context.paused=!0,this._context.refreshPaused(),this},t.prototype.resumeAll=function(){return this._context.paused=!1,this._context.refreshPaused(),this},t.prototype.toggleMuteAll=function(){return this._context.toggleMute()},t.prototype.muteAll=function(){return this._context.muted=!0,this._context.refresh(),this},t.prototype.unmuteAll=function(){return this._context.muted=!1,this._context.refresh(),this},t.prototype.removeAll=function(){for(var t in this._sounds)this._sounds[t].destroy(),delete this._sounds[t];return this},t.prototype.stopAll=function(){for(var t in this._sounds)this._sounds[t].stop();return this},t.prototype.exists=function(t,e){return void 0===e&&(e=!1),!!this._sounds[t]},t.prototype.find=function(t){return this.exists(t,!0),this._sounds[t]},t.prototype.play=function(t,e){return this.find(t).play(e)},t.prototype.stop=function(t){return this.find(t).stop()},t.prototype.pause=function(t){return this.find(t).pause()},t.prototype.resume=function(t){return this.find(t).resume()},t.prototype.volume=function(t,e){var n=this.find(t);return void 0!==e&&(n.volume=e),n.volume},t.prototype.speed=function(t,e){var n=this.find(t);return void 0!==e&&(n.speed=e),n.speed},t.prototype.duration=function(t){return this.find(t).duration},t.prototype.close=function(){return this.removeAll(),this._sounds=null,this._webAudioContext&&(this._webAudioContext.destroy(),this._webAudioContext=null),this._htmlAudioContext&&(this._htmlAudioContext.destroy(),this._htmlAudioContext=null),this._context=null,this},t}(),k={__proto__:null,HTMLAudioMedia:v,HTMLAudioInstance:g,HTMLAudioContext:C},M=function(){function t(t,e){this.init(t,e)}return t.prototype.init=function(t,e){this.destination=t,this.source=e||t},t.prototype.connect=function(t){this.source.connect(t)},t.prototype.disconnect=function(){this.source.disconnect()},t.prototype.destroy=function(){this.disconnect(),this.destination=null,this.source=null},t}(),T={__proto__:null,Filter:M,EqualizerFilter:function(t){function e(n,o,i,r,s,a,c,l,p,h){void 0===n&&(n=0),void 0===o&&(o=0),void 0===i&&(i=0),void 0===r&&(r=0),void 0===s&&(s=0),void 0===a&&(a=0),void 0===c&&(c=0),void 0===l&&(l=0),void 0===p&&(p=0),void 0===h&&(h=0);var f=this;if(!u().useLegacy){var d=[{f:e.F32,type:\"lowshelf\",gain:n},{f:e.F64,type:\"peaking\",gain:o},{f:e.F125,type:\"peaking\",gain:i},{f:e.F250,type:\"peaking\",gain:r},{f:e.F500,type:\"peaking\",gain:s},{f:e.F1K,type:\"peaking\",gain:a},{f:e.F2K,type:\"peaking\",gain:c},{f:e.F4K,type:\"peaking\",gain:l},{f:e.F8K,type:\"peaking\",gain:p},{f:e.F16K,type:\"highshelf\",gain:h}].map((function(t){var e=u().context.audioContext.createBiquadFilter();return e.type=t.type,x.setParamValue(e.Q,1),e.frequency.value=t.f,x.setParamValue(e.gain,t.gain),e}));(f=t.call(this,d[0],d[d.length-1])||this).bands=d,f.bandsMap={};for(var _=0;_0&&f.bands[_-1].connect(y),f.bandsMap[y.frequency.value]=y}return f}f=t.call(this,null)||this}return c(e,t),e.prototype.setGain=function(t,e){if(void 0===e&&(e=0),!this.bandsMap[t])throw new Error(\"No band found for frequency \".concat(t));x.setParamValue(this.bandsMap[t].gain,e)},e.prototype.getGain=function(t){if(!this.bandsMap[t])throw new Error(\"No band found for frequency \".concat(t));return this.bandsMap[t].gain.value},Object.defineProperty(e.prototype,\"f32\",{get:function(){return this.getGain(e.F32)},set:function(t){this.setGain(e.F32,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"f64\",{get:function(){return this.getGain(e.F64)},set:function(t){this.setGain(e.F64,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"f125\",{get:function(){return this.getGain(e.F125)},set:function(t){this.setGain(e.F125,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"f250\",{get:function(){return this.getGain(e.F250)},set:function(t){this.setGain(e.F250,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"f500\",{get:function(){return this.getGain(e.F500)},set:function(t){this.setGain(e.F500,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"f1k\",{get:function(){return this.getGain(e.F1K)},set:function(t){this.setGain(e.F1K,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"f2k\",{get:function(){return this.getGain(e.F2K)},set:function(t){this.setGain(e.F2K,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"f4k\",{get:function(){return this.getGain(e.F4K)},set:function(t){this.setGain(e.F4K,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"f8k\",{get:function(){return this.getGain(e.F8K)},set:function(t){this.setGain(e.F8K,t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,\"f16k\",{get:function(){return this.getGain(e.F16K)},set:function(t){this.setGain(e.F16K,t)},enumerable:!1,configurable:!0}),e.prototype.reset=function(){this.bands.forEach((function(t){x.setParamValue(t.gain,0)}))},e.prototype.destroy=function(){this.bands.forEach((function(t){t.disconnect()})),this.bands=null,this.bandsMap=null},e.F32=32,e.F64=64,e.F125=125,e.F250=250,e.F500=500,e.F1K=1e3,e.F2K=2e3,e.F4K=4e3,e.F8K=8e3,e.F16K=16e3,e}(M),DistortionFilter:function(t){function e(e){void 0===e&&(e=0);var n=this;if(!u().useLegacy){var o=u().context.audioContext.createWaveShaper();return(n=t.call(this,o)||this)._distortion=o,n.amount=e,n}n=t.call(this,null)||this}return c(e,t),Object.defineProperty(e.prototype,\"amount\",{get:function(){return this._amount},set:function(t){this._amount=t;for(var e,n=1e3*t,o=44100,i=new Float32Array(o),r=Math.PI/180,s=0;sf&&(f=_)}s.fillRect(p,(1+h)*c,1,Math.max(1,(f-h)*c))}return i},resolveUrl:_,sineTone:function(t,e){void 0===t&&(t=200),void 0===e&&(e=1);var n=E.from({singleInstance:!0});if(!(n.media instanceof F))return n;for(var o=n.media,i=n.context.audioContext.createBuffer(1,48e3*e,48e3),r=i.getChannelData(0),s=0;s snd.volume = vol;\n\t\tthis.tw = ()=> new Tween(snd);\n\t\tthis.onPlayEnd = ()=> {this.stt.onPlayEnd(this.buf); this.#onStop()};\n\t\tthis.stop = ()=> {snd.stop(); this.#onStop()};\n\t\tthis.destroy = ()=> snd.destroy();\n\n\t\tswitch (this.buf) {\t\t// セリフ再生中はBGM音量を絞る\n\t\t\tcase BUF_VOICE:\n\t\t\t\tconst v = Number(val.getVal('sys:sn.sound.BGM.vol_mul_talking') ?? 1);\t\t// 歴史的経緯で ??\n\t\t\t\tif (v === 1) break;\n\n\t\t\t\tSndInf.#vol_mul_talking = v;\n\t\t\t\tconst b = hSndBuf[BUF_BGM];\n\t\t\t\tif (b) b.setVol(this.volume * SndInf.#vol_mul_talking);\n\t\t\t\tbreak;\n\n\t\t\tcase BUF_BGM:\n\t\t\t\tsnd.volume = this.volume * SndInf.#vol_mul_talking;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\t\t#onStop = ()=> {\n\t\t\tthis.#onStop = ()=> {};\n\t\t\tif (SndInf.#vol_mul_talking === 1 || this.buf !== BUF_VOICE) return;\n\n\t\t\t// ボリュームを戻す\n\t\t\tSndInf.#vol_mul_talking = 1;\n\t\t\tconst b = hSndBuf[BUF_BGM];\n\t\t\tif (b) b.setVol(this.volume * SndInf.#vol_mul_talking);\n\t\t}\n\n\tsetVol(_vol: number) {}\n\ttw(): Tween | undefined {return undefined}\n\tonPlayEnd() {}\n\tstop() {}\n\tdestroy() {}\n}\n\n\nlet cfg\t: Config;\nlet val\t: IVariable;\nlet main: IMain;\nlet sys\t: SysBase;\nlet hSndBuf\t: HSndBuf;\n\nlet evtMng\t: IEvtMng;\n\nexport interface HSndBuf {[buf: string]: SndBuf}\nexport\tconst\tBUF_BGM\t\t= 'BGM';\nexport\tconst\tBUF_SE\t\t= 'SE';\n\t\tconst\tBUF_VOICE\t= 'VOICE';\n\n\nexport class SndBuf {\n\tstatic\t#hLP\t: {[buf: string]: string}\t= {};\n\tstatic\tinit($cfg: Config, $val: IVariable, $main: IMain, $sys: SysBase, $hSndBuf: HSndBuf) {\n\t\tSndBuf.#hLP = {};\n\t\tcfg\t= $cfg;\n\t\tval\t= $val;\n\t\tmain= $main;\n\t\tsys\t= $sys;\n\t\thSndBuf\t= $hSndBuf;\n\t}\n\tstatic\tsetEvtMng($evtMng: IEvtMng) {evtMng = $evtMng}\n\tstatic\tdelLoopPlay(buf: string): void {\n\t\tdelete SndBuf.#hLP[buf];\n\t\tconst vn = 'const.sn.sound.'+ buf +'.';\n\t\tval.setVal_Nochk('save', vn +'fn', '');\n\t\tval.setVal_Nochk('save', 'const.sn.loopPlaying', JSON.stringify(SndBuf.#hLP));\n\t\tval.flush();\n\t}\n\tstatic\tgetVol(hArg: HArg, def: number): number {\n\t\tconst vol = argChk_Num(hArg, 'volume', def);\n\t\tif (vol < 0) return 0;\n\t\tif (vol > 1) return 1;\n\t\treturn vol;\n\t}\n\tstatic\txchgbuf({buf: buf1 = BUF_SE, buf2 = BUF_SE}: HArg) {\n\t\tif (buf1 === buf2) throw `[xchgbuf] buf:${buf1} が同じ値です`;\n\n\t\tconst n1 = 'const.sn.sound.'+ buf1 +'.';\n\t\tconst v1 = Number(val.getVal('save:'+ n1 +'volume'));\n\t\tconst f1 = String(val.getVal('save:'+ n1 +'fn'));\n\t\tconst n2 = 'const.sn.sound.'+ buf2 +'.';\n\t\tconst v2 = Number(val.getVal('save:'+ n2 +'volume'));\n\t\tconst f2 = String(val.getVal('save:'+ n2 +'fn'));\n\t\tval.setVal_Nochk('save', n1 +'volume', v2);\n\t\tval.setVal_Nochk('save', n2 +'volume', v1);\n\t\tval.setVal_Nochk('save', n1 +'fn', f2);\n\t\tval.setVal_Nochk('save', n2 +'fn', f1);\n\n\t\tif (buf1 in SndBuf.#hLP !== buf2 in SndBuf.#hLP) {\t// 演算子の優先順位確認済\n\t\t\tif (buf1 in SndBuf.#hLP)\n\t\t\t\t\t{delete SndBuf.#hLP[buf1]; SndBuf.#hLP[buf2] = f1}\n\t\t\telse\t{delete SndBuf.#hLP[buf2]; SndBuf.#hLP[buf1] = f2}\n\t\t\tval.setVal_Nochk('save', 'const.sn.loopPlaying', JSON.stringify(SndBuf.#hLP));\n\t\t}\n\t\tval.flush();\n\t}\n\n\n\tstatic\treadonly\t#MAX_END_MS\t= 999000;\n\n\n\treadonly #si\t\t: SndInf;\n\treadonly needLoad;\n\n\n\tconstructor(\n\t\treadonly hArg\t: HArg,\n\t\treadonly buf\t: string,\n\t\treadonly fn\t\t: string,\n\t) {\n\t\tconst start_ms = argChk_Num(hArg, 'start_ms', 0);\n\t\tconst end_ms = argChk_Num(hArg, 'end_ms', SndBuf.#MAX_END_MS);\n\t\tconst ret_ms = argChk_Num(hArg, 'ret_ms', 0);\n\t\tconst pan = argChk_Num(hArg, 'pan', 0);\n\t\tconst speed = argChk_Num(hArg, 'speed', 1);\n\n\t\tif (start_ms < 0) throw `[playse] start_ms:${start_ms} が負の値です`;\n\t\tif (ret_ms < 0) throw `[playse] ret_ms:${ret_ms} が負の値です`;\n\t\tif (0 < end_ms) {\n\t\t\tif (end_ms <= start_ms) throw `[playse] start_ms:${start_ms} >= end_ms:${end_ms} は異常値です`;\n\t\t\tif (end_ms <= ret_ms) throw `[playse] ret_ms:${ret_ms} >= end_ms:${end_ms} は異常値です`;\n\t\t}\n\n\t\t// この辺で属性を増減したら、loadFromSaveObj()にも反映する\n\t\tconst vn = 'const.sn.sound.'+ buf +'.';\n\t\tval.setVal_Nochk('save', vn +'fn', fn);\n\t\tconst savevol = SndBuf.getVol(hArg, 1);\n\t\tval.setVal_Nochk('save', vn +'volume', savevol);// 目標音量(save:)\n\t\tconst volume = savevol * Number(val.getVal('sys:'+ vn +'volume', 1));\n\n\t\tconst loop = argChk_Boolean(hArg, 'loop', false);\n\t\tif (loop) {\n\t\t\tSndBuf.#hLP[buf] = fn;\n\t\t\tval.setVal_Nochk('save', 'const.sn.loopPlaying', JSON.stringify(SndBuf.#hLP));\n\t\t}\n\t\telse SndBuf.delLoopPlay(buf);\n\t\tval.setVal_Nochk('save', vn +'start_ms', start_ms);\n\t\tval.setVal_Nochk('save', vn +'end_ms', end_ms);\n\t\tval.setVal_Nochk('save', vn +'ret_ms', ret_ms);\n\t\tval.setVal_Nochk('tmp', vn +'playing', true);\n\t\tval.flush();\n\n\t\tconst snd = sound.find(fn);\t// キャッシュにあるか\n\t\tthis.#si = new SndInf(\n\t\t\tfn,\n\t\t\tbuf,\n\t\t\tstart_ms,\n\t\t\tend_ms,\n\t\t\tret_ms,\n\t\t\tvolume,\n\t\t\tpan,\n\t\t\tsnd,\n\t\t);\n\t\t// @pixi/sound用基本パラメータ\n\t\tconst o: Options = {\n\t\t\tloop,\n\t\t\tspeed,\n\t\t\tvolume,\n\t\t\tloaded\t: (e, s2)=> {\n\t\t\t\tif (this.#si.stt.isDestroy) return;\n\t\t\t\tif (e) {main.errScript(`ロード失敗です SndBuf fn:${fn} ${e}`, false); return}\n\t\t\t\tif (! s2) return;\n\n\t\t\t\tthis.#si.addSnd(s2);\n\t\t\t\tif (pan !== 0) s2.filters = [new filters.StereoFilter(pan)];\n\t\t\t//\tif (! o.loop) sound.add(fn, snd);\t// 手動キャッシュすると単発連打で無音に\n\t\t\t\thArg.fnc?.();\n\t\t\t},\n\t\t};\n\n\t\t// start_ms・end_ms機能→@pixi/sound準備\n\t\tlet sp_nm = '';\n\t\tif (0 < start_ms || end_ms < SndBuf.#MAX_END_MS) {\n\t\t\tsp_nm = `${fn};${start_ms};${end_ms};${ret_ms}`;\n\t\t\tconst os = (o.sprites ??= {})[sp_nm] = {\n\t\t\t\tstart\t: start_ms /1000,\n\t\t\t\tend\t\t: end_ms /1000,\n\t\t\t};\n\t\t\to.preload = true;\t\t// loaded発生用、トラブルの元なので使用を控えたい\n\t\t\tconst old = o.loaded!;\n\t\t\to.loaded = (e, s0)=> {\n\t\t\t\tif (this.#si.stt.isDestroy) return;\n\n\t\t\t\told(e, s0);\n\t\t\t\tconst s2 = s0!;\n\t\t\t\tconst d = s2.duration;\n\t\t\t\tif (os.end < 0) {\t// 負の値は末尾から\n\t\t\t\t\tos.end += d;\n\t\t\t\t\ts2.removeSprites(sp_nm);\n\t\t\t\t\ts2.addSprites(sp_nm, os);\n\t\t\t\t}\n\t\t\t\tif (os.end <= os.start) main.errScript(`[playse] end_ms:${end_ms}(${os.end *1000}) >= start_ms:${start_ms} は異常値です`);\n\t\t\t\tif (os.end *1000 <= ret_ms) main.errScript(`[playse] end_ms:${end_ms}(${os.end *1000}) <= ret_ms:${ret_ms} は異常値です`);\n\t\t\t\tif (d <= os.start) main.errScript(`[playse] 音声ファイル再生時間:${d *1000} <= start_ms:${start_ms} は異常値です`);\n\t\t\t\tif (end_ms !== SndBuf.#MAX_END_MS && d <= os.end) main.errScript(`[playse] 音声ファイル再生時間:${d *1000} <= end_ms:${end_ms} は異常値です`);\n\n\t\t\t\ts2.play(sp_nm, snd=> o.complete?.(snd));\n\t\t\t\t\t// 流れ的にはすぐ下の「ループなし/あり」を呼ぶ\n\t\t\t};\n\t\t}\n\t\telse o.autoPlay = true;\n\n\t\t// ループなし ... 再生完了イベント\n\t\tif (! loop) o.complete = ()=> {\n\t\t\tstop2var(this.#si, buf);\n\t\t\tthis.#si.onPlayEnd();\n\t\t};\n\t\t// ループあり ... ret_ms処理\n\t\telse if (ret_ms !== 0) {\n\t\t\to.loop = false;\t// 一周目はループなしとする\n\t\t\to.complete = async snd=> {\n\t\t\t\tconst d = snd.duration;\n\t\t\t\tconst start\t= ret_ms /1000;\n\t\t\t\tconst end\t= end_ms /1000;\n\t\t\t\tif (d <= start) main.errScript(`[playse] 音声ファイル再生時間:${d *1000} <= ret_ms:${ret_ms} は異常値です`);\n\n\t\t\t\tawait snd.play({\t// 一周目はループなし、なのでキャッシュされてる\n\t\t\t\t\t...o,\n\t\t\t\t\tstart,\n\t\t\t\t\tend\t\t: (end < 0) ?end +d :end,// 負の値は末尾から\n\t\t\t\t//\tspeed,\t\t// 重複\n\t\t\t\t\tloop\t: true,\n\t\t\t\t//\tvolume,\t\t// 重複\n\t\t\t\t//-\tmuted?: boolean;\n\t\t\t\t\tfilters\t: pan !== 0 ?[new filters.StereoFilter(pan)] :[],\n\t\t\t\t//-\tcomplete?: CompleteCallback;\n\t\t\t\t//-\tloaded?: LoadedCallback;\n\t\t\t\t//-\tsingleInstance?: boolean;\n\t\t\t\t});\n\t\t\t\t//不要 this.#sb.snd = snd;\t// this.#sb.snd === snd (true)\n\t\t\t};\n\t\t}\n\n\t\tthis.#initVol();\n\t\tif (snd) {\n\t\t\tsnd.volume = volume;\t// 再生のたびに音量を戻す\n\t\t\tif (sp_nm) this.#playseSub(fn, o);\n\t\t\telse if (snd.isPlayable) {\n\t\t\t\tconst ab = snd.options.source;\n\t\t\t\tif (! (ab instanceof ArrayBuffer)\n\t\t\t\t\t|| ab.byteLength === 0) snd.play(o);\n\t\t\t\telse this.#si.addSnd(Sound.from({\n\t\t\t\t\t...o,\n\t\t\t\t\turl\t\t: snd.options.url,\n\t\t\t\t\tsource\t: ab,\n\t\t\t\t}));\n\t\t\t\tif (pan !== 0) snd.filters = [new filters.StereoFilter(pan)];\n\t\t\t}\n\t\t\tthis.needLoad = false;\n\t\t\treturn;\n\t\t}\n\n\t\tconst join = this.needLoad = argChk_Boolean(hArg, 'join', true);\n\t\tif (join) {\n\t\t\tdisableEvent();\n\t\t\tconst old = o.loaded!;\n\t\t\to.loaded = (e, s2)=> {\n\t\t\t\tif (! this.#si.stt.isDestroy) old(e, s2);\n\t\t\t\tenableEvent();\n\t\t\t};\n\t\t}\n\t\tthis.#playseSub(fn, o);\n\t}\n\t#initVol = ()=> {\n\t\tsound.volumeAll = Number(val.getVal('sys:sn.sound.global_volume', 1));\n\t\tthis.#initVol = ()=> {};\n\t};\n\t#playseSub(fn: string, o: Options) {\n\t\tconst src = cfg.searchPath(fn, SEARCH_PATH_ARG_EXT.SOUND);\n\t\tif (! src.endsWith('.bin')) {o.url = src; Sound.from(o); return}\n\n\t\t(new Loader).add({name: fn, url: src, xhrType: LoaderResource.XHR_RESPONSE_TYPE.BUFFER,})\n\t\t.use(async (res, next)=> {\n\t\t\ttry {\n\t\t\t\tres.data = await sys.decAB(res.data);\n\t\t\t} catch (e) {\n\t\t\t\tmain.errScript(`Sound ロード失敗ですc fn:${res.name} ${e}`, false);\n\t\t\t}\n\t\t\tnext();\n\t\t})\n\t\t.load((_ldr, hRes)=> {\t// このあと o.loaded() もコールされる\n\t\t\to.source = hRes[fn]?.data;\n\t\t\tSound.from(o);\n\t\t});\n\t}\n\n\n\tsetVol(vol: number) {this.#si.setVol(vol)}\n\n\tws =(hArg: HArg)=> this.#si.stt.ws(this.#si, hArg);\n\tstopse({buf = BUF_SE}: HArg) {\n\t\tstop2var(this.#si, buf);\n\t\tthis.#si.stt.stopse(this.#si);\n\t}\n\n\tfade =(hArg: HArg)=> this.#si.stt.fade(this.#si, hArg);\n\twf =(hArg: HArg)=> this.#si.stt.wf(this.#si, hArg);\n\tstopfadese =(hArg: HArg)=> this.#si.stt.stopfadese(this.#si, hArg);\n\n}\n\n\n// =================================================\nfunction stop2var({loop}: SndInf, buf: string) {\n\tif (loop) {SndBuf.delLoopPlay(buf); return}\n\n\tconst vn = 'const.sn.sound.'+ buf +'.';\n\tval.setVal_Nochk('tmp', vn +'playing', false);\n\tval.flush();\n}\n\n\nfunction stopfadese(tw: Tween) {tw.stop().end()}\t// stop()とend()は別\n\n// =================================================\n\n\ninterface ISndState {\n\tonLoad(si: SndInf)\t: void;\n\tstopse(si: SndInf)\t: void;\n\tws(si: SndInf, hArg: HArg): boolean;\n\tonPlayEnd(buf: string)\t: void;\n\tfade(si: SndInf, hArg: HArg): void;\n\twf(si: SndInf, hArg: HArg): boolean;\n\tcompFade(buf: string)\t: void;\n\tstopfadese(si: SndInf, hArg: HArg): void;\n\tisDestroy\t: boolean;\n}\n\nclass SsLoading implements ISndState {\n\tonLoad(si: SndInf)\t{si.stt = new SsPlaying}\n\tstopse(si: SndInf)\t{si.stt = new SsStop(si, false)}\n\tws =()=> false;\n\tonPlayEnd() {}\t\t// ok\n\tfade() {}\t\t\t// ok\n\twf =()=> false;\t\t// ok\n\tcompFade() {}\t\t// ok\n\tstopfadese() {}\t\t// ok\n\treadonly\tisDestroy\t= false;\n}\n\nclass SsPlaying implements ISndState {\n\tonLoad() {}\t\t\t// ok\n\tstopse(si: SndInf)\t{si.stt = new SsStop(si)}\n\tws(si: SndInf, hArg: HArg) {\n\t\tif (si.loop) return false;\n\n\t\tconst {buf = BUF_SE} = hArg;\n\t\tconst stop = argChk_Boolean(hArg, 'stop', true);\n\t\targChk_Boolean(hArg, 'canskip', false);\t// waitEvent() のデフォルトと違うので先行上書き\n\t\tif (evtMng.waitEvent('buf:'+ buf, hArg, ()=> {\t// 順番固定\n\t\t\tstop2var(si, buf);\n\t\t\tsi.onPlayEnd();\t// まず一回やる\n\t\t\tif (stop) si.stt.stopse(si); else si.stt.onPlayEnd = ()=> {};\n\t\t\t\t// else後は SsWaitingStop か SsStop の想定\n\t\t})) {\n\t\t\tsi.stt = new SsWaitingStop;\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\tonPlayEnd() {}\t\t// ok\n\tfade(si: SndInf, hArg: HArg) {\n\t\tconst {buf = BUF_SE} = hArg;\n\n\t\tconst vn = 'const.sn.sound.'+ buf +'.';\n\t\tconst bnV = vn +'volume';\n\t\tconst savevol = SndBuf.getVol(hArg, NaN);\n\t\tval.setVal_Nochk('save', bnV, savevol);\t// 目標音量(save:)\n\t\tconst vol = savevol * Number(val.getVal('sys:'+ bnV, 1))\n\t\tconst stop = argChk_Boolean(hArg, 'stop', (savevol === 0));\n\t\t\t// this.getVol() により savevol = hArg.volume\n\t\tif (stop) SndBuf.delLoopPlay(buf);\t// fade中reloadなど、できるだけ早く情報更新か\n\t\tval.flush();\n\n\t\tconst time = argChk_Num(hArg, 'time', NaN);\n\t\tconst delay = argChk_Num(hArg, 'delay', 0);\n\t\tif ((time === 0 && delay === 0) || evtMng.isSkipping) {\n\t\t\tsi.setVol(vol);\n\t\t\tsi.stt = stop ? new SsStop(si) : new SsPlaying;\n\t\t\treturn;\n\t\t}\n\n//console.log('fadese start from:%f to:%f', sb.snd.volume, vol);\n\t\tconst tw = si.tw();\n\t\tif (! tw) return;\n\t\tCmnTween.setTwProp(tw, hArg)\n\t\t.to({volume: vol}, time)\n\t\t.onComplete(()=> {\n\t\t\tremove(tw);\n\t\t\tsi.stt.compFade(buf);\n\t\t\tsi.stt = stop ? new SsStop(si) : new SsPlaying;\n\t\t})\n\t\t.start();\n\n\t\tsi.stt = new SsFade(tw);\n\t}\n\twf =()=> false;\t\t// ok\n\tcompFade() {}\t\t// ok\n\tstopfadese() {}\t\t// ok\n\treadonly\tisDestroy\t= false;\n}\n\nclass SsWaitingStop implements ISndState {\n\tonLoad() {}\t\t\t// ok\n\tstopse(si: SndInf)\t{si.stt = new SsStop(si)}\n\tws =()=> false;\t\t// ok\n\tonPlayEnd(buf: string)\t{evtMng.breakEvent('buf:'+ buf)}\n\tfade() {}\t\t\t// ok\n\twf =()=> false;\t\t// ok\n\tcompFade() {}\t\t// ok\n\tstopfadese() {}\t\t// ok\n\treadonly\tisDestroy\t= false;\n}\n\nclass SsFade implements ISndState {\n\tconstructor(readonly tw: Tween) {}\n\tonLoad() {}\t\t\t// ok\n\tstopse(si: SndInf)\t{stopfadese(this.tw); si.stt = new SsStop(si)}\t// 順番厳守\n\tws =()=> false;\t\t// ok ?\n\tonPlayEnd() {}\t\t// ok\n\tfade() {}\t\t\t// ok\n\twf(si: SndInf, hArg: HArg) {\n\t\tconst {buf = BUF_SE} = hArg;\n\t\targChk_Boolean(hArg, 'canskip', false);\t// waitEvent() のデフォルトと違うので先行上書き\n\t\tif (evtMng.waitEvent('buf:'+ buf, hArg, ()=> stopfadese(this.tw))) {\n\t\t\tsi.stt = new SsWaitingFade(this.tw);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\tcompFade() {}\t\t// ok\n\tstopfadese =()=> stopfadese(this.tw);\n\treadonly\tisDestroy\t= false;\n}\n\nclass SsWaitingFade implements ISndState {\n\tconstructor(readonly tw: Tween) {}\n\tonLoad() {}\t\t\t// ok\n\tstopse(si: SndInf)\t{stopfadese(this.tw); si.stt = new SsStop(si)}\n\tws =()=> false;\t\t// ok\n\tonPlayEnd() {}\t\t// ok\n\tfade() {}\t\t\t// ok\n\twf =()=> false;\t\t// ok\n\tcompFade(buf: string) {evtMng.breakEvent('buf:'+ buf)}\n\tstopfadese =()=> stopfadese(this.tw);\n\treadonly\tisDestroy\t= false;\n}\n\nclass SsStop implements ISndState {\n\tconstructor(readonly si: SndInf, readonly stop = true) {\n\t\tif (! stop) return;\n\n\t\tsi.stop();\n\t\tif (! si.loop) return;\t// destroy がないと再生が残るケースが。効果音だと破棄が激しいのでループモノ(BGM)だけにする\n\n\t\tsi.destroy();\n\t\tsi.destroy = ()=> {};\t// 再度コール時エラー対策\n\t}\n\tonLoad() {}\t\t\t// ok\n\tstopse() {}\t\t\t// ok\n\tws =()=> false;\t\t// ok\n\tonPlayEnd() {}\t\t// ok\n\tfade() {}\t\t\t// ok\n\twf =()=> false;\t\t// ok\n\tcompFade() {}\t\t// ok\n\tstopfadese() {}\t\t// ok\n\treadonly\tisDestroy\t= true;\n}\n","/* ***** BEGIN LICENSE BLOCK *****\n\tCopyright (c) 2018-2024 Famibee (famibee.blog38.fc2.com)\n\n\tThis software is released under the MIT License.\n\thttp://opensource.org/licenses/mit-license.php\n** ***** END LICENSE BLOCK ***** */\n\nimport {IEvtMng, argChk_Boolean, argChk_Num} from './CmnLib';\nimport {IHTag, HArg} from './Grammar';\nimport {IVariable, IMain, INoticeChgVolume} from './CmnInterface';\nimport {Config} from './Config';\nimport {SysBase} from './SysBase';\nimport {BUF_BGM, BUF_SE, HSndBuf, SndBuf} from './SndBuf';\n\nimport {sound, utils} from '@pixi/sound';\n\n\nexport class SoundMng {\n\t#hSndBuf\t: HSndBuf\t= {};\n\n\tconstructor(cfg: Config, hTag: IHTag, readonly val: IVariable, main: IMain, sys: SysBase) {\n\t\thTag.volume\t\t= o=> this.#volume(o);\t\t// 音量設定(独自拡張)\n\t\thTag.fadebgm\t= o=> this.#fadebgm(o);\t\t// BGMのフェード\n\t\thTag.fadeoutbgm\t= o=> this.#fadeoutbgm(o);\t// BGMのフェードアウト\n\t\thTag.fadeoutse\t= o=> this.#fadeoutse(o);\t// 効果音のフェードアウト\n\t\thTag.fadese\t\t= o=> this.#fadese(o);\t\t// 効果音のフェード\n\t\thTag.playbgm\t= o=> this.#playbgm(o);\t\t// BGM の演奏\n\t\thTag.playse\t\t= o=> this.#playse(o);\t\t// 効果音の再生\n\t\thTag.stop_allse\t= ()=> this.#stop_allse();\t// 全効果音再生の停止\n\t\thTag.stopbgm\t= o=> this.#stopbgm(o);\t\t// BGM 演奏の停止\n\t\thTag.stopse\t\t= o=> this.#stopse(o);\t\t// 効果音再生の停止\n\t\thTag.wb\t\t\t= o=> this.#wb(o);\t\t\t// BGM フェードの終了待ち\n\t\thTag.wf\t\t\t= o=> this.#wf(o);\t\t\t// 効果音フェードの終了待ち\n\t\thTag.stopfadese\t= o=> this.#stopfadese(o);\t// 音声フェードの停止\n\t\thTag.wl\t\t\t= o=> this.#wl(o);\t\t\t// BGM 再生の終了待ち\n\t\thTag.ws\t\t\t= o=> this.#ws(o);\t\t\t// 効果音再生の終了待ち\n\t\thTag.xchgbuf\t= o=> this.#xchgbuf(o);\t\t// 再生トラックの交換\n\n\t\tval.setVal_Nochk('save', 'const.sn.loopPlaying', '{}');\n\n\t\tval.setVal_Nochk('tmp', 'const.sn.sound.codecs', JSON.stringify(utils.supported));\n\n\t\tSndBuf.init(cfg, val, main, sys, this.#hSndBuf);\n\t\tsound.disableAutoPause = true;\n\t}\n\n\t#evtMng\t: IEvtMng;\n\tsetEvtMng(evtMng: IEvtMng) {this.#evtMng = evtMng; SndBuf.setEvtMng(evtMng)}\n\tsetNoticeChgVolume(setGlbVol: INoticeChgVolume, setMovVol: INoticeChgVolume) {\n\t\tthis.val.defValTrg('sys:sn.sound.global_volume', (_name: string, val: any)=> setGlbVol(sound.volumeAll = Number(val)));\n\t\tthis.val.defValTrg('sys:sn.sound.movie_volume', (_name: string, val: any)=> setMovVol(Number(val)));\n\n\t\t// 起動時初期値セット\n\t\tthis.val.setVal_Nochk('sys', 'sn.sound.global_volume', this.val.getVal('sys:sn.sound.global_volume', 1));\n\t\tthis.val.setVal_Nochk('sys', 'sn.sound.movie_volume', this.val.getVal('sys:sn.sound.movie_volume', 1));\n\t}\n\n\t//MARK: 音量設定(独自拡張)\n\t#volume(hArg: HArg) {\n\t\tconst {buf = BUF_SE} = hArg;\n\t\tconst vnV = 'const.sn.sound.'+ buf +'.volume';\n\t\tconst arg_vol = this.#getVol(hArg, 1);\n\t\tif (Number(this.val.getVal('sys:'+ vnV)) === arg_vol) return false;\n\n\t\tthis.val.setVal_Nochk('sys', vnV, arg_vol)\t// 基準音量(sys:)\n\t\tthis.val.flush();\t// fadese()内で必ずしも呼ばれないので\n\n\t\t// 再生中音声の一時的音量も変更\n\t\thArg.time = 0;\n\t\thArg.volume = Number(this.val.getVal('save:'+ vnV));\t// 目標音量(save:)\n\t\treturn this.#fadese(hArg);\n\t}\n\t#getVol(hArg: HArg, def: number) {\n\t\tconst vol = argChk_Num(hArg, 'volume', def);\n\t\tif (vol < 0) return 0;\n\t\tif (vol > 1) return 1;\n\t\treturn vol;\n\t}\n\n\t//MARK: BGM/効果音のフェードアウト(loadから使うのでマクロ化禁止)\n\t#fadeoutbgm(hArg: HArg) {hArg.volume = 0; return this.#fadebgm(hArg)}\n\t//MARK: 効果音のフェードアウト(loadから使うのでマクロ化禁止)\n\t#fadeoutse(hArg: HArg) {hArg.volume = 0; return this.#fadese(hArg)}\n\t//MARK: BGMのフェード(loadから使うのでマクロ化禁止)\n\t#fadebgm(hArg: HArg) {hArg.buf = BUF_BGM; return this.#fadese(hArg)}\n\t//MARK: 効果音のフェード\n\t#fadese(hArg: HArg) {\n\t\tconst {buf = BUF_SE} = hArg;\n\t\tthis.#stopfadese(hArg);\n\t\tthis.#hSndBuf[buf]?.fade(hArg);\n\n\t\treturn false;\n\t}\n\n\t//MARK: BGM の演奏\n\t#playbgm(hArg: HArg) {\n\t\thArg.buf = BUF_BGM;\n\t\thArg.canskip = false;\n\t\targChk_Boolean(hArg, 'loop', true);\n\t\treturn this.#playse(hArg);\n\t}\n\n\t//MARK: 効果音の再生\n\t#playse(hArg: HArg) {\n\t\tconst {buf = BUF_SE, fn} = hArg;\n\t\tthis.#stopse({buf});\n\t\tif (! fn) throw `fnは必須です buf:${buf}`;\n\n\t\t// isSkipKeyDown()は此処のみとする。タイミングによって変わる\n\t\tif (argChk_Boolean(hArg, 'canskip', true) && this.#evtMng.isSkipping) return false;\n\n\t\tconst sb = this.#hSndBuf[buf] = new SndBuf(hArg, buf, fn);\n\t\treturn sb.needLoad;\n\t}\n\n\tclearCache() {sound.removeAll()}\n\n\t//MARK: 全効果音再生の停止\n\t#stop_allse() {\n\t\tfor (const buf of Object.keys(this.#hSndBuf)) this.#stopse({buf});\n\t\tthis.#hSndBuf = {};\n\n\t\tsound.stopAll();\t// 念のため\n\n\t\treturn false;\n\t}\n\t//MARK: BGM 演奏の停止(loadから使うのでマクロ化禁止)\n\t#stopbgm(hArg: HArg) {hArg.buf = BUF_BGM; return this.#stopse(hArg)}\n\t//MARK: 効果音再生の停止\n\t#stopse(hArg: HArg) {\n\t\tconst {buf = BUF_SE} = hArg;\n\t\tthis.#hSndBuf[buf]?.stopse(hArg);\n\n\t\treturn false;\n\t}\n\n\t//MARK: BGM フェードの終了待ち\n\t#wb(hArg: HArg) {hArg.buf = BUF_BGM; return this.#wf(hArg)}\n\n\t//MARK: 効果音フェードの終了待ち\n\t#wf(hArg: HArg) {\n\t\tconst {buf = BUF_SE} = hArg;\n\t\treturn this.#hSndBuf[buf]?.wf(hArg) as boolean;\n\t}\n\n\t//MARK: 音声フェードの停止\n\t#stopfadese(hArg: HArg) {\n\t\tconst {buf = BUF_SE} = hArg;\n\t\tthis.#hSndBuf[buf]?.stopfadese(hArg);\n\n\t\treturn false;\n\t}\n\n\t//MARK: BGM 再生の終了待ち\n\t#wl(hArg: HArg) {hArg.buf = BUF_BGM; return this.#ws(hArg)}\n\t//MARK: 効果音再生の終了待ち\n\t#ws(hArg: HArg) {\n\t\tconst {buf = BUF_SE} = hArg;\n\t\treturn this.#hSndBuf[buf]?.ws(hArg) as boolean;\n\t}\n\n\t//MARK: 再生トラックの交換\n\t#xchgbuf(hArg: HArg) {\n\t\tconst {buf: buf1 = BUF_SE, buf2 = BUF_SE} = hArg;\n\t\tif (buf1 === buf2) return false;\n\n\t\tconst a = this.#hSndBuf[buf1];\t// 分割代入の変数交換だと noUncheckedIndexedAccess エラーになるので\n\t\tconst b = this.#hSndBuf[buf2];\n\t\tif (a) this.#hSndBuf[buf2] = a; else delete this.#hSndBuf[buf2];\n\t\tif (b) this.#hSndBuf[buf1] = b; else delete this.#hSndBuf[buf1];\n\n\t\tSndBuf.xchgbuf(hArg);\n\n\t\treturn false;\n\t}\n\n\t//MARK: しおりの読込(BGM状態復元)\n\tplayLoopFromSaveObj(all_stop_and_play: boolean): Promise[] {\n\t\tconst lp = String(this.val.getVal('save:const.sn.loopPlaying', '{}'));\n\t\tif (lp === '{}') {this.#stop_allse(); this.clearCache(); return []}\n/*\n\t\t\t\t\t(Now)#hSndBuf\n\t\t\t\t\tstop\tplay\n\thSaveLP\tstop\t-\t\tstop\t\t--[1]\n\t(to)\tplay\tplay\tstop/play\t--[2]\n\t\t\teq play\tplay\t-\t\t\t--[2]\n*/\n\t\tconst hSaveLP: {[buf: string]: string} = JSON.parse(lp);\n\t\tif (all_stop_and_play) {this.#stop_allse(); this.clearCache()}\n\t\telse for (const [buf, sb] of Object.entries(this.#hSndBuf)) {\n\t\t\t// [1] #hSndBuf(再生中)だが hSaveLP(再生予定) にない buf -> stop\n\t\t\tif (! (buf in hSaveLP)) sb?.stopse({buf});\n\t\t}\n\n\t\t// [2] hSaveLP(再生予定)を再生。だが#hSndBuf(再生中)の状況で処理変更\n\t\treturn Object.entries(hSaveLP).map(([buf, fn])=> new Promise(re=> {\n\t\t\tconst sb = this.#hSndBuf[buf]\n\t\t\tif (! all_stop_and_play && sb) {\n\t\t\t\tif (sb.fn === fn) {re(); return}\n\t\t\t\t//sb.stopse({buf});\t// 再生中 fn !== 再生予定 fn なら stop\n\t\t\t\t\t// #playbgm()、#playse() 内で stop するので省略\n\t\t\t}\n\n\t\t\tconst vm = 'save:const.sn.sound.'+ buf +'.';\n\t\t\tconst hArg = {\n\t\t\t\tfn,\n\t\t\t\tbuf,\n\t\t\t\tjoin\t: false,\n\t\t\t\tloop\t: true,\n\t\t\t\tvolume\t: Number(this.val.getVal(vm +'volume')),\n\t\t\t\tstart_ms: Number(this.val.getVal(vm +'start_ms')),\n\t\t\t\tend_ms\t: Number(this.val.getVal(vm +'end_ms')),\n\t\t\t\tret_ms\t: Number(this.val.getVal(vm +'ret_ms')),\n\t\t\t\tfnc\t\t: re,\t// loaded\n\t\t\t};\n\t\t\tif (hArg.buf === BUF_BGM) this.#playbgm(hArg);\n\t\t\telse this.#playse(hArg);\n\t\t}));\n\t}\n\n\tdestroy() {this.#stop_allse(); this.clearCache()}\n\n}\n"],"names":["s","u","a","t","e","n","c","l","o","i","p","h","f","r","d","_","y","m","b","g","v","P","x","O","j","w","A","F","E","C","L","S","M","T","G","I","R","n.extensions","SndInf","fn","buf","start_ms","end_ms","ret_ms","volume","pan","snd","SsPlaying","SsLoading","#vol_mul_talking","filters","vol","Tween","#onStop","BUF_VOICE","val","hSndBuf","BUF_BGM","_vol","cfg","main","sys","evtMng","BUF_SE","SndBuf","hArg","argChk_Num","#MAX_END_MS","speed","vn","savevol","loop","argChk_Boolean","#hLP","sound","#si","s2","sp_nm","os","old","s0","start","end","stop2var","#initVol","#playseSub","ab","Sound","disableEvent","enableEvent","$cfg","$val","$main","$sys","$hSndBuf","$evtMng","def","buf1","buf2","n1","v1","f1","n2","v2","f2","src","SEARCH_PATH_ARG_EXT","Loader","LoaderResource","res","next","_ldr","hRes","stopfadese","tw","si","SsStop","stop","SsWaitingStop","bnV","time","delay","CmnTween","remove","SsFade","SsWaitingFade","SoundMng","hTag","#volume","#fadebgm","#fadeoutbgm","#fadeoutse","#fadese","#playbgm","#playse","#stop_allse","#stopbgm","#stopse","#wb","#wf","#stopfadese","#wl","#ws","#xchgbuf","utils","#hSndBuf","#evtMng","setGlbVol","setMovVol","_name","vnV","arg_vol","#getVol","all_stop_and_play","lp","hSaveLP","sb","re","vm"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQkN,IAAIA;AAAE,SAASC,IAAG;AAAC,SAAOD;AAAC;AAAC,IAAIE,KAAE,SAASC,GAAEC,GAAE;AAAC,UAAOF,KAAE,OAAO,kBAAgB,EAAC,WAAU,CAAE,EAAA,aAAY,SAAO,SAASC,GAAEC,GAAE;AAAC,IAAAD,EAAE,YAAUC;AAAA,EAAC,KAAG,SAASD,GAAEC,GAAE;AAAC,aAAQC,KAAKD,EAAE,QAAO,UAAU,eAAe,KAAKA,GAAEC,CAAC,MAAIF,EAAEE,CAAC,IAAED,EAAEC,CAAC;AAAA,EAAE,GAAGF,GAAEC,CAAC;AAAC;AAAE,SAASE,EAAEH,GAAEC,GAAE;AAAC,MAAe,OAAOA,KAAnB,cAA6BA,MAAP,KAAS,OAAM,IAAI,UAAU,yBAAuB,OAAOA,CAAC,IAAE,+BAA+B;AAAE,WAASC,IAAG;AAAC,SAAK,cAAYF;AAAA,EAAC;AAAC,EAAAD,GAAEC,GAAEC,CAAC,GAAED,EAAE,YAAiBC,MAAP,OAAS,OAAO,OAAOA,CAAC,KAAGC,EAAE,YAAUD,EAAE,WAAU,IAAIC;AAAE;AAAC,IAAIE,IAAE,WAAU;AAAC,UAAOA,IAAE,OAAO,UAAQ,SAASJ,GAAE;AAA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AQ,CAAC;AAAA,QAC7C,UAAU,OAAO,KAAK,IAAI,OAAOA,IAAI,UAAU,CAAC;AAAA,QAChD,QAAS,OAAO,KAAK,IAAI,OAAOA,IAAI,QAAQ,CAAC;AAAA,QAC7C,QAAS,OAAO,KAAK,IAAI,OAAOA,IAAI,QAAQ,CAAC;AAAA,QAC7C,KAAOD;AAAA;AAAA,MACR;AACA,MAAI5F,EAAK,QAAQR,IAAS,KAAK4E,GAASpE,CAAI,IACvC,KAAKqE,GAAQrE,CAAI;AAAA,IAAA,CACtB,CAAC;AAAA,EAAA;AAAA,EAGH,UAAU;AAAC,SAAKsE,GAAY,GAAG,KAAK,WAAW;AAAA,EAAA;AAEhD;","x_google_ignoreList":[0]} \ No newline at end of file diff --git a/dist/sn/SndBuf.d.ts b/dist/sn/SndBuf.d.ts index 9a6c8165..43af9e39 100644 --- a/dist/sn/SndBuf.d.ts +++ b/dist/sn/SndBuf.d.ts @@ -18,8 +18,8 @@ export declare class SndBuf { static delLoopPlay(buf: string): void; static getVol(hArg: HArg, def: number): number; static xchgbuf({ buf: buf1, buf2 }: HArg): void; - static generate(hArg: HArg): boolean; - private constructor(); + readonly needLoad: boolean; + constructor(hArg: HArg, buf: string, fn: string); setVol(vol: number): void; ws: (hArg: HArg) => boolean; stopse({ buf }: HArg): void; diff --git a/dist/sn/SndBuf.d.ts.map b/dist/sn/SndBuf.d.ts.map index 3dbc588c..10ee6555 100644 --- a/dist/sn/SndBuf.d.ts.map +++ b/dist/sn/SndBuf.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"SndBuf.d.ts","sourceRoot":"","sources":["../../src/sn/SndBuf.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,OAAO,EAA6B,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAC,SAAS,EAAE,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,OAAO,EAAC,MAAM,WAA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"} \ No newline at end of file diff --git a/dist/sn/SoundMng.d.ts.map b/dist/sn/SoundMng.d.ts.map index edce10f7..26c04b45 100644 --- a/dist/sn/SoundMng.d.ts.map +++ b/dist/sn/SoundMng.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"SoundMng.d.ts","sourceRoot":"","sources":["../../src/sn/SoundMng.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,OAAO,EAA6B,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAC,KAAK,EAAO,MAAM,WAAW,CAAC;AACtC,OAAO,EAAC,SAAS,EAAE,KAAK,EAAE,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAMlC,qBAAa,QAAQ;;IAGkB,QAAQ,CAAC,GAAG,EAAE,SAAS;gBAAjD,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAW,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO;IA2BxF,SAAS,CAAC,MAAM,EAAE,OAAO;IACzB,kBAAkB,CAAC,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAE,gBAAgB;IAkE3E,UAAU;IA8DV,mBAAmB,CAAC,iBAAiB,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,EAAE;IA2ChE,OAAO;CAEP"} \ No newline at end of file +{"version":3,"file":"SoundMng.d.ts","sourceRoot":"","sources":["../../src/sn/SoundMng.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,OAAO,EAA6B,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAC,KAAK,EAAO,MAAM,WAAW,CAAC;AACtC,OAAO,EAAC,SAAS,EAAE,KAAK,EAAE,gBAAgB,EAAC,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAChC,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAC;AAMlC,qBAAa,QAAQ;;IAGkB,QAAQ,CAAC,GAAG,EAAE,SAAS;gBAAjD,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAW,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO;IA2BxF,SAAS,CAAC,MAAM,EAAE,OAAO;IACzB,kBAAkB,CAAC,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAE,gBAAgB;IAmE3E,UAAU;IA8DV,mBAAmB,CAAC,iBAAiB,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,EAAE;IA2ChE,OAAO;CAEP"} \ No newline at end of file diff --git a/src/sn/SndBuf.ts b/src/sn/SndBuf.ts index 61079f2f..f68284c2 100644 --- a/src/sn/SndBuf.ts +++ b/src/sn/SndBuf.ts @@ -146,18 +146,13 @@ export class SndBuf { static readonly #MAX_END_MS = 999000; - static generate(hArg: HArg): boolean { - const {buf = BUF_SE, fn = ''} = hArg; - const sb = hSndBuf[buf] = new SndBuf(hArg, buf, fn); - return sb.#init_wait; - } readonly #si : SndInf; - readonly #init_wait; + readonly needLoad; - private constructor( + constructor( readonly hArg : HArg, readonly buf : string, readonly fn : string, @@ -300,11 +295,11 @@ export class SndBuf { })); if (pan !== 0) snd.filters = [new filters.StereoFilter(pan)]; } - this.#init_wait = false; + this.needLoad = false; return; } - const join = this.#init_wait = argChk_Boolean(hArg, 'join', true); + const join = this.needLoad = argChk_Boolean(hArg, 'join', true); if (join) { disableEvent(); const old = o.loaded!; diff --git a/src/sn/SoundMng.ts b/src/sn/SoundMng.ts index 2c6a2de4..c08eb68e 100644 --- a/src/sn/SoundMng.ts +++ b/src/sn/SoundMng.ts @@ -109,7 +109,8 @@ export class SoundMng { // isSkipKeyDown()は此処のみとする。タイミングによって変わる if (argChk_Boolean(hArg, 'canskip', true) && this.#evtMng.isSkipping) return false; - return SndBuf.generate(hArg); + const sb = this.#hSndBuf[buf] = new SndBuf(hArg, buf, fn); + return sb.needLoad; } clearCache() {sound.removeAll()}