-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaudio.js
More file actions
58 lines (47 loc) · 1.73 KB
/
audio.js
File metadata and controls
58 lines (47 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
var audio_url=window.URL || window.webkitURL;
function audio_playsound(params)
{
try
{
var soundURL=jsfxr(params);
var player=new Audio();
player.src=soundURL;
player.play();
player.addEventListener('ended', function(e) {
audio_url.revokeObjectURL(soundURL);
}, false);
}
catch (e) {}
}
function audio_explosion()
{
audio_playsound([3,,0.3708,0.5822,0.3851,0.0584,,-0.0268,,,,-0.0749,0.7624,,,,,,1,,,,,0.5]);
}
function audio_collect()
{
audio_playsound([1,,0.0957,0.3189,0.3562,0.5325,,,,,,0.5407,0.6494,,,,,,1,,,,,0.5]);
}
function audio_laser()
{
audio_playsound([,,0.2311,0,0.1885,0.5784,0.2,-0.2543,,,,,,0.1326,0.0283,,0.0899,-0.0316,1,,,0.2648,,0.5]);
}
function audio_missile()
{
audio_playsound([3,0.0324,0.7427,0.2327,-0.3593,0.1788,,0.1083,-0.1552,-0.6967,0.9526,0.4280,-0.2025,-0.8107,-0.0003,0.9058,0.1206,0.1947,0.1594,-0.0476,-0.2936,0.2408,-0.0482,0.25]);
}
function audio_alien()
{
audio_playsound([1,-0.3997,0.4534,0.4353,-0.3988,0.6939,,-0.2292,0.0213,0.5732,0.2278,0.7962,-0.8172,-0.3081,-0.9170,0.7628,-0.3341,0.0690,0.9999,-0.0474,-0.9969,,-0.1301,0.5]);
}
function audio_fire()
{
audio_playsound([3,-0.1273,0.6436,0.0195,-0.1374,0.9708,,0.0012,-0.3374,-0.6906,-0.4025,0.0102,-0.6567,0.9377,0.1812,-0.6699,0.7458,-0.0607,0.7014,-0.4196,-0.8569,0.4117,-0.3709,0.25]);
}
function audio_deinfect()
{
audio_playsound([2,0.0016,0.0106,0.3845,0.4799,0.8265,,,-0.5788,-8.1307-7,-0.5269,0.6409,-0.5847,-0.7950,0.0018,0.6167,-0.0092,-0.5819,0.9686,0.0028,-0.5964,0.4727,-0.0005,0.5]);
}
function audio_failed()
{
audio_playsound([2,-0.8487,0.4388,0.0386,0.8212,0.0033,,0.0239,0.8420,0.9778,-0.7578,0.6320,0.2456,-0.5832,-0.0135,0.4773,-0.0882,0.0027,0.7743,0.8443,-0.8965,0.0863,-0.9315,0.25]);
}