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

Add play simple tone sequence function #83

Open
zenodante opened this issue Jul 30, 2022 · 1 comment
Open

Add play simple tone sequence function #83

zenodante opened this issue Jul 30, 2022 · 1 comment

Comments

@zenodante
Copy link

zenodante commented Jul 30, 2022

Current a sound updating is only possible in update() with 25ms step. However, when porting games from other system sometimes we need play much faster changed tone sequences. How about add a api function like PlaySimpleTones(uint16_t *seq, uint32_t volume) and a bool state to tell the sound updating callback to switch between normal sound or simple tone state? The Sequence could be a 16bit uint array [xxxhz,yyyyms,xxxxhz,yyyyyms], then we could have easy to use sound effects.

@zenodante
Copy link
Author

I found the solution to do it without changing the API... Just disable the 1ms sound update callback and replace it with my own one...

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

No branches or pull requests

1 participant