1import{_ as M}from"./LanguageSwitcher-DtvM7PCS.js";import{d as T,r as _,b as g,o as v,T as a,w as f,e as u,g as s,n as d,t as k,k as w,ag as D,v as b,x as A}from"./modules/vue-Bw_6t8Ev.js";import{I as h,_ as I,aj as P}from"./index-BgHgLzyu.js";import{u as C,A as N}from"./AudioDemo-JrtIWsDv.js";import{W as S}from"./WaveformVisualizer-BqwSlklJ.js";import{I as z}from"./MyDefault-BmotRWjN.js";import"./modules/shiki-BPPYVDiq.js";const B="/assets/delay-glitch-processor-YRYoXY53.js",V={class:"demo-container"},W={class:"info-section"},$={class:"threshold-indicator"},j={class:"threshold-bar"},G={class:"controls"},L={class:"control-group"},Y=["value"],F={class:"range-labels"},R=T({__name:"DelayGlitchDemo",setup(y){h();const l=_(0),t=_(0);let o=null;const{isPlaying:p,toggle:i,masterGain:r}=C({onSetup:(n,e)=>{n.audioWorklet.addModule(B).then(()=>{o=new AudioWorkletNode(n,"delay-glitch-processor"),o.connect(e),o.port.onmessage=m=>{m.data.actualTimeMs!==void 0&&(t.value=m.data.actualTimeMs)},o.port.postMessage({delayMs:l.value})})}}),x=n=>{const e=parseFloat(n.target.value);l.value=e,o&&o.port.postMessage({delayMs:e})},c=()=>t.value>3;return(n,e)=>(v(),g(N,{"is-playing":a(p),"master-gain":a(r),onToggle:a(i)},{default:f(()=>[u(S,{source:a(r),fullscreen:!0},null,8,["source"]),s("div",V,[s("div",W,[s("div",{class:d(["delay-display",{warning:c()}])},k(t.value.toFixed(1))+"ms ",3),e[2]||(e[2]=s("div",{class:"subtitle"},"Actual Processing Time",-1)),s("div",$,[e[1]||(e[1]=s("span",{class:"threshold-label"},"3ms threshold",-1)),s("div",j,[e[0]||(e[0]=s("div",{class:"threshold-marker",style:{left:"30%"}},null,-1)),s("div",{class:d(["current-position",{over:c()}]),style:w({width:`${Math.min(t.value*10,100)}%`})},null,6)])])]),s("div",G,[s("div",L,[s("label",null,[e[3]||(e[3]=D(" Artificial Processing Load ")),s("input",{type:"range",min:"0",max:"10",step:"0.01",value:l.value,onInput:x},null,40,Y)]),s("div",F,[e[4]||(e[4]=s("span",null,"0ms (safe)",-1)),s("span",{class:d({warning:c()})},"10ms (glitchy)",2)])])])])]),_:1},8,["is-playing","master-gain","onToggle"]))}}),O=I(R,[["__scopeId","data-v-c9cb7a81"]]),Q={__name:"slides.md__slidev_24",setup(y){const{$clicksContext:l,$frontmatter:t}=h();return l.setup(),(o,p)=>{const i=O,r=M;return v(),g(z,b(A(a(P)(a(t),23))),{default:f(()=>[u(i),u(r)]),_:1},16)}}};export{Q as default};
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.