Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use math.min/max and increase volume limit #3

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Bioscreeper
Copy link

No description provided.

Copy link
Owner

@Ale32bit Ale32bit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do some changes and LGTM

@@ -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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "bit" is lowercase.

@@ -1,4 +1,4 @@
local base = "https://raw.github.com/Ale32bit/Quartz/main/"
local base = "https://raw.githubusercontent.com/Bioscreeper/Quartz/main/"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change back to original URL.

if dist < 0 then
dist = 0
end
dist = math.min(math.max(dist, 1), 3)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set minimum to 0 instead of 1.
The second argument of speaker.playAudio accepts lower than 1 numbers.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should also update the relevant documentation to reflect the range change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants