Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Commit

Permalink
🔥 Remove extraAudio feature
Browse files Browse the repository at this point in the history
  • Loading branch information
GitSquared committed Feb 21, 2019
1 parent b0bc79d commit c3e9490
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 36 deletions.
1 change: 0 additions & 1 deletion src/_boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ if (!fs.existsSync(settingsFile)) {
theme: "tron",
termFontSize: 15,
audio: true,
extraAudio: false,
pingAddr: "1.1.1.1",
port: 3000,
nointro: false,
Expand Down
11 changes: 0 additions & 11 deletions src/_renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ async function displayTitleScreen() {

await _delay(400);

window.audioManager.intro.play();
document.body.setAttribute("class", "");
title.setAttribute("style", `border: 5px solid rgb(${window.theme.r}, ${window.theme.g}, ${window.theme.b});`);

Expand Down Expand Up @@ -297,7 +296,6 @@ async function initUI() {

await _delay(10);

window.audioManager.scan.play();
document.getElementById("main_shell").setAttribute("style", "height:0%;margin-bottom:30vh;");

await _delay(500);
Expand Down Expand Up @@ -601,14 +599,6 @@ window.openSettings = async () => {
<option>${!window.settings.audio}</option>
</select></td>
</tr>
<tr>
<td>extraAudio</td>
<td>Enable extra audio FX (requires audio: true)</td>
<td><select id="settingsEditor-extraAudio">
<option>${window.settings.extraAudio}</option>
<option>${!window.settings.extraAudio}</option>
</select></td>
</tr>
<tr>
<td>port</td>
<td>Local port to use for UI-shell connection</td>
Expand Down Expand Up @@ -710,7 +700,6 @@ window.writeSettingsFile = () => {
theme: document.getElementById("settingsEditor-theme").value,
termFontSize: Number(document.getElementById("settingsEditor-termFontSize").value),
audio: (document.getElementById("settingsEditor-audio").value === "true"),
extraAudio: (document.getElementById("settingsEditor-extraAudio").value === "true"),
pingAddr: document.getElementById("settingsEditor-pingAddr").value,
port: Number(document.getElementById("settingsEditor-port").value),
monitor: Number(document.getElementById("settingsEditor-monitor").value),
Expand Down
Binary file removed src/assets/audio/beep5.wav
Binary file not shown.
Binary file removed src/assets/audio/intro.wav
Binary file not shown.
Binary file removed src/assets/audio/ping.wav
Binary file not shown.
Binary file removed src/assets/audio/pingFailed.wav
Binary file not shown.
Binary file removed src/assets/audio/scan.wav
Binary file not shown.
20 changes: 0 additions & 20 deletions src/classes/audiofx.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,6 @@ class AudioManager {
Howler.volume(0.0);
}

if (window.settings.audio === true && window.settings.extraAudio === true) {
this.beep5 = new Howl({
src: [path.join(__dirname, "assets", "audio", "beep5.wav")]
});
this.intro = new Howl({
src: [path.join(__dirname, "assets", "audio", "intro.wav")]
});
this.scan = new Howl({
src: [path.join(__dirname, "assets", "audio", "scan.wav")]
});
this.ping = new Howl({
src: [path.join(__dirname, "assets", "audio", "ping.wav")],
volume: 0.02
});
this.pingFailed = new Howl({
src: [path.join(__dirname, "assets", "audio", "pingFailed.wav")],
volume: 0.02
});
}

// Return a proxy to avoid errors if sounds aren't loaded
return new Proxy(this, {
get: (target, sound) => {
Expand Down
4 changes: 0 additions & 4 deletions src/classes/clock.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ class Clock {
let time = new Date();
let array = [time.getHours(), time.getMinutes(), time.getSeconds()];

if (this.lastTime.getMinutes() !== array[1]) {
window.audioManager.beep5.play();
}

array.forEach((e, i) => {
if (e.toString().length !== 2) {
array[i] = "0"+e;
Expand Down

0 comments on commit c3e9490

Please sign in to comment.