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

Provide playback position from sound instance #2335

Closed
EzraMoore65 opened this issue Jun 3, 2022 · 4 comments · Fixed by #2336
Closed

Provide playback position from sound instance #2335

EzraMoore65 opened this issue Jun 3, 2022 · 4 comments · Fixed by #2336

Comments

@EzraMoore65
Copy link

Was working on a rhythm game and hit a roadblock when I realized you cannot currently get the position of a sound instance. Managed to find another npm package that I can use, but would love to see this added to the engine.

@eonarheim
Copy link
Member

@EzraMoore65 this would be a great idea! I fully endorse such a feature!

@eonarheim
Copy link
Member

I'll have some time to look at it this weekend, I'll give it a shot

eonarheim added a commit that referenced this issue Jun 4, 2022
Closes #2335 

This PR adds a new method onto `ex.Sound.getCurrentTime()` to get the current playback time into the currently playing track. 

Additionally this PR adds the current playback rate that can be get/set on `ex.Sound.playbackRate`, 1.0 is the default playback rate, 2.0 is twice the speed, and 0.5 is half speed.
@eonarheim
Copy link
Member

@EzraMoore65 the latest alpha should include this feature, it'd be awesome to get your feedback

0.27.0-alpha.474

@EzraMoore65
Copy link
Author

@eonarheim Did exactly what I wanted. Thank you for the quick turn around!

This issue was closed.
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 a pull request may close this issue.

2 participants