-
Notifications
You must be signed in to change notification settings - Fork 118
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
Missed and delayed events when adding multiple track events #95
Comments
I'll try and look into this later tonight -- this may be related to #92? I've been quite busy with a new job lately, so my time's a little constrained these days. |
I realise now why this is happening! All events were being added, but only one was being cleared: the |
Fixes an issue where the `EventData` were not stored in reverse order, meaning that only the last added TimedEvent would be serviced. This reverses the `Ord` for `EventData`, which should only be internally compared, allowing all timed events to be processed correctly in order. Fixes serenity-rs#95.
Fixes an issue where the `EventData` were not stored in reverse order, meaning that only the last added TimedEvent would be serviced. This reverses the `Ord` for `EventData`, which should only be internally compared, allowing all timed events to be processed correctly in order. Fixes #95.
Thanks for the quick fix! |
Songbird version: 0.2.0
Rust version: rustc 1.55.0 (c8dfcfe04 2021-09-06)
Serenity version: 0.10.9
Description:
Setting multiple events on one track causes some strange behavior and missed events.
I am trying to add events that will skip certain parts of a track by adding a timed event, which when triggered will seek forward and then add another timed event to skip the next part. But I am running this issue where events are not being triggered. Is there a better way to do this?
Steps to reproduce:
Create an event that logs whenever it is triggered.
Play a song and add some events.
The 1 second delay event is only run after the 2 second delay event, and the 1 second periodic event is lost completely.
The text was updated successfully, but these errors were encountered: