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

Move Volume and GlobalVolume to own file #16838

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

mgi388
Copy link
Contributor

@mgi388 mgi388 commented Dec 16, 2024

Objective

Solution

  • Move the two types to volume.rs and made it compile.
  • Also #[reflect(Debug)] on Volume while I'm here.

Testing

  • Ran example locally.
  • Rely on CI.

@mgi388 mgi388 marked this pull request as ready for review December 16, 2024 06:26
@alice-i-cecile alice-i-cecile added A-Audio Sounds playback and modification C-Code-Quality A section of code that is hard to understand or change S-Needs-Review Needs reviewer attention (from anyone!) to move forward D-Trivial Nice and easy! A great choice to get started with Bevy labels Dec 16, 2024
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

Yes please :)

@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Dec 16, 2024
Copy link
Contributor

@SolarLiner SolarLiner left a comment

Choose a reason for hiding this comment

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

We should put a pin on improving the documentation of the Volume newtype, because it's unclear from the doc comments which scale we are using (linear can be inferred from the debug_assert!, but it would be nice to make it explicit).

Additionally, we should add a second constructor for setting the volume in decibels.

@mgi388
Copy link
Contributor Author

mgi388 commented Dec 16, 2024

We should put a pin on improving the documentation of the Volume newtype, because it's unclear from the doc comments which scale we are using (linear can be inferred from the debug_assert!, but it would be nice to make it explicit).

Additionally, we should add a second constructor for setting the volume in decibels.

Absolutely. We can look at these in a follow up PR since this PR is just a simple move around. FWIW, I also noticed this from a user perspective. The constructor just says Create a new volume level. which leaves the user wondering :)

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Dec 16, 2024
Merged via the queue into bevyengine:main with commit 74e793d Dec 16, 2024
33 checks passed
@mgi388 mgi388 deleted the volume-prework branch December 17, 2024 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Audio Sounds playback and modification C-Code-Quality A section of code that is hard to understand or change D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants