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

Continue playing previous sound instead of cutting it when the next key is pressed #46

Closed
Xenira opened this issue Oct 15, 2023 · 5 comments · Fixed by #128
Closed

Continue playing previous sound instead of cutting it when the next key is pressed #46

Xenira opened this issue Oct 15, 2023 · 5 comments · Fixed by #128
Assignees
Labels
enhancement New feature or request

Comments

@Xenira
Copy link
Sponsor Contributor

Xenira commented Oct 15, 2023

Is your feature request related to a problem? Please describe.

When a new key is pressed while the previous sound is still playing the old sound is stopped

sink.stop();

Describe the solution you'd like

The old sound should continue playing at the same time as the new.

Describe alternatives you've considered

Additional context

I created this as a feature request, as both behaviours are valid. This should be configurable, but default should be to continue playing.

@Xenira Xenira added the enhancement New feature or request label Oct 15, 2023
@orhun
Copy link
Owner

orhun commented Oct 15, 2023

Sounds good. Are you interested in making a draft PR? I think we should implement this first to test the new behavior. Then we can discuss making this configurable.

@Xenira
Copy link
Sponsor Contributor Author

Xenira commented Oct 15, 2023

I would wait with this till #24 is done, as we might need to touch the way sound is played for the pitch thing.

@orhun
Copy link
Owner

orhun commented Oct 15, 2023

Makes sense.

@Xenira
Copy link
Sponsor Contributor Author

Xenira commented Oct 18, 2023

I played around with this and some stuff does not sound great.

The default profile release sounds for example. Maybe this needs a configurable number of sounds that can be played concurrently.

@sloganking
Copy link
Contributor

I have primitive knowledge working with rodio and it's audio sink type. But my first impression to do this would be to store a Vec of N syncs. Let's say N = 8, and rotate which one plays an incoming new sound. 8 Sinks could play 8 sounds at once.

I have not looked at this repo before tonight but it doesn't seem too large. I might make a PR for this soon.

sloganking added a commit to sloganking/daktilo that referenced this issue Feb 8, 2024
orhun added a commit that referenced this issue Mar 24, 2024
* 🐛Continue playing previous sound instead of cutting it when the next key is pressed

Fixed #46

* refactor: clean up code

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Orhun Parmaksız <orhunparmaksiz@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants