mp3 replaced by ogg
+ value of radio button discared, because never used
This commit is contained in:
@@ -2,12 +2,12 @@
|
|||||||
import * as c from "./constants.js"
|
import * as c from "./constants.js"
|
||||||
|
|
||||||
export const soundPongArr: HTMLAudioElement[] = [];
|
export const soundPongArr: HTMLAudioElement[] = [];
|
||||||
export const soundRoblox = new Audio("http://localhost:8080/sound/roblox-oof.mp3");
|
export const soundRoblox = new Audio("http://localhost:8080/sound/roblox-oof.ogg");
|
||||||
|
|
||||||
export function initAudio(muteFlag: boolean)
|
export function initAudio(muteFlag: boolean)
|
||||||
{
|
{
|
||||||
for (let i = 0; i <= 32; i++) {
|
for (let i = 0; i <= 32; i++) {
|
||||||
soundPongArr.push(new Audio("http://localhost:8080/sound/pong/"+i+".mp3"));
|
soundPongArr.push(new Audio("http://localhost:8080/sound/pong/"+i+".ogg"));
|
||||||
soundPongArr[i].volume = c.soundPongVolume;
|
soundPongArr[i].volume = c.soundPongVolume;
|
||||||
soundPongArr[i].muted = muteFlag;
|
soundPongArr[i].muted = muteFlag;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,9 +21,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<label>sound :</label>
|
<label>sound :</label>
|
||||||
<input type="radio" id="sound_on" name="sound_selector" value="on" checked>
|
<input type="radio" id="sound_on" name="sound_selector" checked>
|
||||||
<label for="sound_on">on</label>
|
<label for="sound_on">on</label>
|
||||||
<input type="radio" id="sound_off" name="sound_selector" value="off">
|
<input type="radio" id="sound_off" name="sound_selector">
|
||||||
<label for="sound_off">off</label>
|
<label for="sound_off">off</label>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -28,6 +28,9 @@ const server = http.createServer((req, res) => {
|
|||||||
else if (path.extname(filename) === ".mp3") {
|
else if (path.extname(filename) === ".mp3") {
|
||||||
res.writeHead(200, {"Content-Type": "audio/mpeg"});
|
res.writeHead(200, {"Content-Type": "audio/mpeg"});
|
||||||
}
|
}
|
||||||
|
else if (path.extname(filename) === ".ogg") {
|
||||||
|
res.writeHead(200, {"Content-Type": "audio/ogg"});
|
||||||
|
}
|
||||||
res.write(data);
|
res.write(data);
|
||||||
return res.end();
|
return res.end();
|
||||||
});
|
});
|
||||||
|
|||||||
Binary file not shown.
BIN
www/sound/pong/0.ogg
Normal file
BIN
www/sound/pong/0.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/1.ogg
Normal file
BIN
www/sound/pong/1.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/10.ogg
Normal file
BIN
www/sound/pong/10.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/11.ogg
Normal file
BIN
www/sound/pong/11.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/12.ogg
Normal file
BIN
www/sound/pong/12.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/13.ogg
Normal file
BIN
www/sound/pong/13.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/14.ogg
Normal file
BIN
www/sound/pong/14.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/15.ogg
Normal file
BIN
www/sound/pong/15.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/16.ogg
Normal file
BIN
www/sound/pong/16.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/17.ogg
Normal file
BIN
www/sound/pong/17.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/18.ogg
Normal file
BIN
www/sound/pong/18.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/19.ogg
Normal file
BIN
www/sound/pong/19.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/2.ogg
Normal file
BIN
www/sound/pong/2.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/20.ogg
Normal file
BIN
www/sound/pong/20.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/21.ogg
Normal file
BIN
www/sound/pong/21.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/22.ogg
Normal file
BIN
www/sound/pong/22.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/23.ogg
Normal file
BIN
www/sound/pong/23.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/24.ogg
Normal file
BIN
www/sound/pong/24.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/25.ogg
Normal file
BIN
www/sound/pong/25.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/26.ogg
Normal file
BIN
www/sound/pong/26.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/27.ogg
Normal file
BIN
www/sound/pong/27.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/28.ogg
Normal file
BIN
www/sound/pong/28.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/29.ogg
Normal file
BIN
www/sound/pong/29.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/3.ogg
Normal file
BIN
www/sound/pong/3.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/30.ogg
Normal file
BIN
www/sound/pong/30.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/31.ogg
Normal file
BIN
www/sound/pong/31.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/32.ogg
Normal file
BIN
www/sound/pong/32.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/4.ogg
Normal file
BIN
www/sound/pong/4.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/5.ogg
Normal file
BIN
www/sound/pong/5.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/6.ogg
Normal file
BIN
www/sound/pong/6.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/7.ogg
Normal file
BIN
www/sound/pong/7.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/8.ogg
Normal file
BIN
www/sound/pong/8.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/pong/9.ogg
Normal file
BIN
www/sound/pong/9.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
www/sound/roblox-oof.ogg
Normal file
BIN
www/sound/roblox-oof.ogg
Normal file
Binary file not shown.
Reference in New Issue
Block a user