Use individual play schedules #4
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: KnarCraft/Minstrel#4
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The best way to avoid the problems with stopping songs for individual when the next song plays, and the problems where stopping one song might affect others, would be to utilize individual play schedules.
By using a sorted queue, it should be possible to minimize overhead, as one would only need to check whether the first song in the queue is finished, every few ticks. All expired songs should have their next song played, so it's important to note that several songs may expire at the same time.
If the song has to be re-played when traveling between worlds, it would probably be safest to stop all songs for that player, and re-play the current song.
If songs have to be reset per-world, it could make sense to pause songs for a player if that player isn't in the world the song is playing in.
It's important to clear the scheduling of a player's playing songs when they leave the server, to prevent overhead. Their currently playing songs should be stopped.