diff --git a/README.md b/README.md index 473bcfc..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/Ale32bit/Quartz/main/download.lua +wget run https://raw.github.com/Ale32Bit/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` | 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!") 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