This commit is contained in:
parent
7ff9024ba5
commit
164aea2eae
1 changed files with 5 additions and 4 deletions
|
@ -27,12 +27,13 @@
|
|||
<BUTTON onclick="
|
||||
F.A?.close();
|
||||
F.A=A=new AudioContext;
|
||||
D=Date.now();
|
||||
// kill some time for the audio context to start
|
||||
S='@qx@'+F.value.toLowerCase();
|
||||
S='@'+F.value.toLowerCase();
|
||||
// stack
|
||||
B=[];
|
||||
// stack variables
|
||||
K=O=T=Z=L=0;
|
||||
K=L=O=T=Z=0;
|
||||
U=137;
|
||||
V=40;
|
||||
// samples
|
||||
|
@ -94,7 +95,7 @@ M=_=>{
|
|||
// play sample
|
||||
S=C[a]+S.slice(s--);
|
||||
|
||||
// loop
|
||||
(S=S.slice(s))&&setTimeout(M,50)
|
||||
// loop (but don't get too far ahead)
|
||||
A.state!='closed'&&(S=S.slice(s))&&setTimeout(M,1000*T-Date.now()+D);
|
||||
};M()
|
||||
">#play</BUTTON> <BUTTON ONCLICK=F.A.close()>#stop
|
||||
|
|
Loading…
Add table
Reference in a new issue