You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Matrix_Riot/riot/recorder-worklet.305bebd.js

2 lines
2.8 KiB

!function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=4)}([function(e,t,r){var o=r(2);e.exports=function(e,t,r){return(t=o(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function r(t){return e.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var o=r(1).default,n=r(3);e.exports=function(e){var t=n(e,"string");return"symbol"===o(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var o=r(1).default;e.exports=function(e,t){if("object"!==o(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";r.r(t);var o=r(0),n=r.n(o);let u;function i(e,t,r){const o=(e-t)/(r-t);return Number.isNaN(o)?0:o}!function(e){e.Timekeep="timekeep",e.AmplitudeMark="amplitude_mark"}(u||(u={}));const s=16;function l(e){return Math.round((e+Number.EPSILON)*s)/s}class p extends AudioWorkletProcessor{constructor(){super(...arguments),n()(this,"nextAmplitudeSecond",0),n()(this,"amplitudeIndex",0)}process(e,t,r){const o=l(currentTime);if(o===this.nextAmplitudeSecond||0===this.nextAmplitudeSecond){const t=e[0][0],r=Math.min(...t),n=i(Math.max(...t),-1,1)-i(r,-1,1);this.port.postMessage({ev:u.AmplitudeMark,amplitude:n,forIndex:this.amplitudeIndex++}),this.nextAmplitudeSecond=l(o+1/s)}return this.port.postMessage({ev:u.Timekeep,timeSeconds:currentTime}),!0}}registerProcessor("mx-voice-worklet",p);t.default=""}]);
//# sourceMappingURL=recorder-worklet.305bebd.js.map