From 2485dc3b1ef7f2da20924f512f75ba7dc8aae2cc Mon Sep 17 00:00:00 2001 From: Bioscreeper <67083372+Bioscreeper@users.noreply.github.com> Date: Mon, 8 Apr 2024 20:12:18 +1000 Subject: [PATCH 1/4] Use math.min/max and increase volume limit --- player.lua | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/player.lua b/player.lua index 19f5776..acaedf3 100644 --- a/player.lua +++ b/player.lua @@ -269,23 +269,13 @@ function quartz.loadTrack(tr, src) end function quartz.setVolume(vol) - if vol > 1 then - vol = 1 - end - if vol < 0 then - vol = 0 - end + vol = math.min(math.max(vol, 0), 5) speakers.volume = vol os.queueEvent("quartz_volume", vol) end function quartz.setDistance(dist) - if dist > 128 then - dist = 128 - end - if dist < 0 then - dist = 0 - end + dist = math.min(math.max(dist, 1), 3) speakers.distance = dist os.queueEvent("quartz_distance", dist) end From 34ec98f70faa54d78a5f7a3e44f70d6044e50775 Mon Sep 17 00:00:00 2001 From: Bioscreeper <67083372+Bioscreeper@users.noreply.github.com> Date: Mon, 8 Apr 2024 20:14:52 +1000 Subject: [PATCH 2/4] Make it use my repo --- download.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/download.lua b/download.lua index fe2cf57..ce6facc 100644 --- a/download.lua +++ b/download.lua @@ -1,4 +1,4 @@ -local base = "https://raw.github.com/Ale32bit/Quartz/main/" +local base = "https://raw.githubusercontent.com/Bioscreeper/Quartz/main/" local files = { "player.lua", "quartz/lib/ui.lua", @@ -33,4 +33,4 @@ for i, file in ipairs(files) do download(base .. file, file) end -print("Quartz downloaded!") \ No newline at end of file +print("Quartz downloaded!") From 9e4f436e146fc029864016784c95e7f8885ccbd4 Mon Sep 17 00:00:00 2001 From: Bioscreeper <67083372+Bioscreeper@users.noreply.github.com> Date: Mon, 8 Apr 2024 20:15:23 +1000 Subject: [PATCH 3/4] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 473bcfc..4a8459e 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ DFPWM and MDFPWM audio player for ComputerCraft. Quartz can be installed by executing the `download.lua` file or by copy pasting this command: ``` -wget run https://raw.github.com/Ale32bit/Quartz/main/download.lua +wget run https://raw.github.com/Bioscreeper/Quartz/main/download.lua ``` ## Usage @@ -44,4 +44,4 @@ Quartz can be configured with the use of the `set` command. | `quartz.autoplay` | Automatically plays the disk when the program is started. | boolean | `true` | | `quartz.distributed` | Play mono audio on all speakers attached to the network. This setting disables `quartz.left` and `quartz.right`. Fine tune `quartz.distance` for best coverage. | boolean | `false` | | `quartz.raw` | Skip the audio filters when decoding DFPWM. | boolean | `false` | -| `quartz.stream.server` | Server URL of the conversion service. No trailing slash. | string | `https://cc.alexdevs.me` | \ No newline at end of file +| `quartz.stream.server` | Server URL of the conversion service. No trailing slash. | string | `https://cc.alexdevs.me` | From da1663140695e81cdbc62549e60f850f2cf08d44 Mon Sep 17 00:00:00 2001 From: Bioscreeper <67083372+Bioscreeper@users.noreply.github.com> Date: Mon, 8 Apr 2024 20:19:55 +1000 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4a8459e..2b3e76c 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ DFPWM and MDFPWM audio player for ComputerCraft. Quartz can be installed by executing the `download.lua` file or by copy pasting this command: ``` -wget run https://raw.github.com/Bioscreeper/Quartz/main/download.lua +wget run https://raw.github.com/Ale32Bit/Quartz/main/download.lua ``` ## Usage