comparison webGL/src/sound.js @ 0:9285dae61395 draft

1st commit,just play sounds.
author e105711 <yomitan.ie.u-ryukyu.ac.jp>
date Wed, 25 Apr 2012 23:45:59 +0900
parents
children 4fd71be3fb0b
comparison
equal deleted inserted replaced
-1:000000000000 0:9285dae61395
1 var audioHClose = window.Audio && new Audio("sound/hclose.wav");
2 var audioHClose2 = window.Audio && new Audio("sound/hclose.wav");
3 var audioHOpen = window.Audio && new Audio("sound/hopen.wav");
4 var audioHOpen2 = window.Audio && new Audio("sound/hopen.wav");
5 var audioFtom = window.Audio && new Audio("sound/ftom.wav");
6 var audioFtom2 = window.Audio && new Audio("sound/ftom.wav");
7 var audioCymbal = window.Audio && new Audio("sound/cymbal.wav");
8 var audioCymbal2 = window.Audio && new Audio("sound/cymbal.wav");
9 var audioKick = window.Audio && new Audio("sound/kick.wav");
10 var audioKick2 = window.Audio && new Audio("sound/kick.wav");
11 var audioSnare = window.Audio && new Audio("sound/snare.wav");
12 var audioSnare2 = window.Audio && new Audio("sound/snare.wav");
13 var audioBGM = window.Audio && new Audio("sound/BGM.wav");
14
15 var CymbalCnt = 0;
16 var HCloseCnt = 0;
17 var HOpenCnt = 0;
18 var FtomCnt = 0;
19 var KickCnt = 0;
20 var SnareCnt = 0;
21
22 function audioStop(audioFile){
23 if(!audioFile.ended){
24 audioFile.pause();
25 audioFile.load();
26 }
27 }
28
29 function audioStart(audioFile){
30 audioFile.load();
31 audioFile.play();
32 }