Skip to content

Comments

[Chore] Changing Tracks Concurrency#562

Merged
davidvedvick merged 2 commits intomainfrom
chore/changing-tracks-concurrency
Jun 14, 2025
Merged

[Chore] Changing Tracks Concurrency#562
davidvedvick merged 2 commits intomainfrom
chore/changing-tracks-concurrency

Conversation

@davidvedvick
Copy link
Collaborator

No description provided.

The `PlaybackEngine` now uses a counter to ensure that playback actions are performed only for the current playback session. This prevents race conditions when changing the playback position or skipping tracks rapidly.

- A new test class, `LinkedOnPlayingFileChangedListener`, was added to facilitate testing of multiple `OnPlayingFileChanged` listeners.
- Consolidated playlist modification methods
- Used AtomicReference for promisedNowPlayingState
- Stopped stale players when clearing playlist or on errors
- Removed checks for `isSameAsCurrentPlayback` as they are now implicitly handled by `isCurrentPlayerId`.
@davidvedvick davidvedvick merged commit 60c663b into main Jun 14, 2025
2 checks passed
@davidvedvick davidvedvick deleted the chore/changing-tracks-concurrency branch June 14, 2025 01:04
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 this pull request may close these issues.

1 participant