PageSourceSearch

https://community.gardencomm.org/packs/js/audio_effects-8358eadb5bdc9e20.chunk.js

js gardencomm.org collected 2026-09-25 19:18:30 UTC 5,838 bytes, 2 lines download raw bytes

1"use strict";(self.rspackChunkcircle=self.rspackChunkcircle||[]).push([[25645],{276670(e,t,r){r.r(t);var n=r(637086),o=r(705288);function s(e,t,r,n,o,s,i){try{var c=e[s](i),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function i(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function c(e){s(i,n,o,c,u,"next",e)}function u(e){s(i,n,o,c,u,"throw",e)}c(void 0)})}}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e,t){var r,n,o,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(i,"next",{value:u(0)}),c(i,"throw",{value:u(1)}),c(i,"return",{value:u(2)}),"function"==typeof Symbol&&c(i,Symbol.iterator,{value:function(){return this}}),i;function u(c){return function(u){var a=[c,u];if(r)throw TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}}var a={preset:"balanced",sampleRate:48e3},f=function(){var e;function t(){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");c(this,"name","audio-effects-sdk"),c(this,"effectsSdk",void 0),c(this,"processedTrack",void 0),c(this,"audioContext",void 0),console.log("AudioEffectsProcessor constructor"),this.configureSdk()}return e=[{key:"configureSdk",value:function(){this.effectsSdk=new n.$(window.EFFECTS_SDK_CUSTOMER_ID),this.effectsSdk.config(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){c(e,t,r[t])})}return e}({},a)),this.effectsSdk.onError(function(e){switch(e.type){case"error":console.error(e.message);break;case"info":console.log(e.message)}})}},{key:"setupAudioContext",value:function(){return i(function(){var e;return u(this,function(t){switch(t.label){case 0:if(!this.audioContext)return[3,2];return[4,this.audioContext.close().catch(function(){})];case 1:t.sent(),this.audioContext=void 0,t.label=2;case 2:try{this.audioContext=new AudioContext({sampleRate:48e3})}catch(e){console.error("AudioEffectsProcessor: 48kHz AudioContext unsupported, falling back",e),this.audioContext=new AudioContext}if("suspended"!==this.audioContext.state)return[3,4];return[4,this.audioContext.resume().catch(function(){})];case 3:t.sent(),t.label=4;case 4:return[4,null==(e=this.effectsSdk)?void 0:e.setAudioContext(this.audioContext)];case 5:return t.sent(),[2]}})}).call(this)}},{key:"init",value:function(e){return i(function(){var t;return u(this,function(r){switch(r.label){case 0:if(t=this,e.kind!==o.CC.Kind.Audio)throw Error("AudioEffectsProcessor: Invalid track kind");if(!this.effectsSdk)throw Error("AudioEffectsProcessor: SDK not configured");return[4,this.setupAudioContext()];case 1:return r.sent(),[4,this.effectsSdk.preload()];case 2:return r.sent(),this.effectsSdk.clear(),this.effectsSdk.useAudioTrack(e.track),console.log("AudioEffectsProcessor: using audio track",e.track),[4,new Promise(function(e){console.log("AudioEffectsProcessor: ready"),t.effectsSdk&&(t.effectsSdk.onReady=function(){return e(!0)})})];case 3:return r.sent(),this.processedTrack=this.effectsSdk.getAudioTrack(),console.log("AudioEffectsProcessor: set processedTrack",this.processedTrack),[2]}})}).call(this)}},{key:"restart",value:function(e){return i(function(){return u(this,function(t){switch(t.label){case 0:return[4,this.destroy()];case 1:return t.sent(),this.configureSdk(),[4,this.init(e)];case 2:return t.sent(),[2]}})}).call(this)}},{key:"destroy",value:function(){return i(function(){var e;return u(this,function(t){switch(t.label){case 0:if(!this.effectsSdk)return[2];return this.effectsSdk.stop(),this.effectsSdk.clear(),this.processedTrack=void 0,[4,this.effectsSdk.clearCache()];case 1:return t.sent(),[4,null==(e=this.audioContext)?void 0:e.close().catch(function(){})];case 2:return t.sent(),this.audioContext=void 0,[2]}})}).call(this)}},{key:"onPublish",value:function(e){return i(function(){return u(this,function(t){return console.log("AudioEffectsProcessor: onPublish",e),[2,Promise.resolve()]})})()}},{key:"onUnpublish",value:function(){return i(function(){return u(this,function(e){return console.log("AudioEffectsProcessor: onUnpublish"),[2,Promise.resolve()]})})()}},{key:"setEnabled",value:function(e){return i(function(){return u(this,function(t){return(console.log("AudioEffectsProcessor: setEnabled",e),this.effectsSdk)?(e?this.effectsSdk.run():this.effectsSdk.stop(),[2,Promise.resolve()]):(console.error("AudioEffectsProcessor: SDK not configured"),[2])})}).call(this)}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,e),t}();r.d(t,{AudioEffectsProcessor:()=>f})}}]);
2//# sourceMappingURL=/packs/js/audio_effects-8358eadb5bdc9e20.chunk.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.