-
Notifications
You must be signed in to change notification settings - Fork 141
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
Add play sound message #370
base: kotlin-experiments
Are you sure you want to change the base?
Add play sound message #370
Conversation
* | ||
* @param id The id of the sound to play. | ||
* @param type The type of the sound to play. | ||
* @param delay The delay before the client plays the sound |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What unit is the delay measured in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe ticks
* Creates a new send play sound message. | ||
* | ||
* @param id The id of the sound to play. | ||
* @param type The type of the sound to play. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we know what the different types are?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far all the sounds I have used are using type 0
Could you update the documentation about the two things mentioned (delay in ticks, type usually 0). Besides that LGTM. |
@garyttierney I looked at the client I have a little. The delay is in milliseconds. The type I am not sure of though. It is passed to a function in the SoundTrack class called mix(int loop). I played several sounds doing a test of type 0, the of type 1. I could not hear any difference. |
5211b9b
to
97896a3
Compare
Ok. If the type is always 0 we should add a constructor that uses 0 as a default value. |
Aren't there two different frames to play (different types?) of sound |
There's music and there's sound effects IIRC. |
If someone can confirm which of the two channels are which, i.e channel 1 is music and 2 is sound effects. That is an example, I have no evidence for that. Then, I will work on adding sounds once kotlin experiments is merged. I have a list of sound effects and what they go to. |
|
Made documentation explain delay and type.
781c3eb
to
828cf12
Compare
Codecov Report
@@ Coverage Diff @@
## kotlin-experiments #370 +/- ##
========================================================
- Coverage 23.16% 23.12% -0.04%
Complexity 807 807
========================================================
Files 643 645 +2
Lines 11131 11146 +15
Branches 1637 1637
========================================================
Hits 2578 2578
- Misses 8268 8283 +15
Partials 285 285
Continue to review full report at Codecov.
|
I know that kotin-experiments is closed to new features. I am opening this for reference until kotlin-experiments is merged into master.
~Trevor