added music theory #5

Merged
karx merged 4 commits from gallant/catbox3d:master into audio 2022-10-06 08:41:45 -05:00
Contributor

idk if this may cause shenanigans

idk if this may cause shenanigans
gallant added 1 commit 2022-10-01 14:16:44 -05:00
Owner

Great PR! However, there's a couple style changes that I'd like to get out of the way.

  1. play should return the JoinHandle returned by thread::spawn
  2. Please move play out of impl Game. In my opinion, Game should only contain things which directly affect the game loop. play does not.
  3. Please document the play method. Good docs make happy users (and other developers).

Thanks for this PR, if you just fix these things, I'll merge it.

Great PR! However, there's a couple style changes that I'd like to get out of the way. 1. `play` should return the `JoinHandle` returned by `thread::spawn` 2. Please move `play` out of `impl Game`. In my opinion, Game should only contain things which directly affect the game loop. `play` does not. 3. Please document the `play` method. Good docs make happy users (and other developers). Thanks for this PR, if you just fix these things, I'll merge it.
Owner

Also, please put this behind a feature flag; we don't want people to pull in dependencies for audio if they're not going to use it.

Thanks!

Also, please put this behind a feature flag; we don't want people to pull in dependencies for audio if they're not going to use it. Thanks!
gallant added 1 commit 2022-10-02 11:12:13 -05:00
Owner

Thanks for the commit! As before, please put the play function behind a feature flag.

I don't think you need to bind the result of thread::spawn into its own variable here. You should just be able to remove the semicolon on line 793 and take advantage of Rust's implicit return syntax. This way, you can bypass the need for a variable entirely.

Also, if you could, please have play be generic over AsRef<Path> for the path to the audio file? This will allow more flexibility for users, keep allocations to a minimum, and allow users to specify a path containing invalid unicode characters.

If you want, I can merge this into a development branch and make these changes myself; just let me know how you want to proceed with this PR.

Thanks for the commit! As before, please put the `play` function behind a feature flag. I don't think you need to bind the result of `thread::spawn` into its own variable here. You should just be able to remove the semicolon on line 793 and take advantage of Rust's implicit return syntax. This way, you can bypass the need for a variable entirely. Also, if you could, please have `play` be generic over `AsRef<Path>` for the path to the audio file? This will allow more flexibility for users, keep allocations to a minimum, and allow users to specify a path containing invalid unicode characters. If you want, I can merge this into a development branch and make these changes myself; just let me know how you want to proceed with this PR.
Author
Contributor

i'm not exactly sure how to make those changes so it would be really helpful if you did that haha

i'm not exactly sure how to make those changes so it would be really helpful if you did that haha
gallant added 2 commits 2022-10-02 23:50:59 -05:00
Author
Contributor

Hopefully this works, set audio as a default crate so they can opt out if they wish :)

Hopefully this works, set audio as a default crate so they can opt out if they wish :)
karx changed title from WIP: added music theory to added music theory 2022-10-06 08:40:45 -05:00
karx changed target branch from master to audio 2022-10-06 08:41:29 -05:00
karx merged commit b42a12465a into audio 2022-10-06 08:41:45 -05:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: karx/catbox#5
No description provided.