[PR #3] Fix index setting and moving, lock track reads #60

Open
opened 2026-01-30 21:23:13 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/aaru-dps/RedBookPlayer/pull/3

State: closed
Merged: Yes


  • Replaces call to GetEnumerator().Current, which was always returning default(ushort) for the index keys, with a .Min() in order to find the first index in the track.
  • Adds actual locking around all track reads, as once the above was fixed, changing tracks had a high probability of running into cache repeats in Aaru code (concurrent invocations of non-concurrent-safe code)
  • Ensure index is valid before attempting to increment or decrement the CurrentIndex or CurrentTrack

09f14810dd and df3d90a530 fixes #2
bc645c21f0 fixes #4

**Original Pull Request:** https://github.com/aaru-dps/RedBookPlayer/pull/3 **State:** closed **Merged:** Yes --- - Replaces call to `GetEnumerator().Current`, which was always returning `default(ushort)` for the index keys, with a `.Min()` in order to find the first index in the track. - Adds actual locking around all track reads, as once the above was fixed, changing tracks had a high probability of running into cache repeats in Aaru code (concurrent invocations of non-concurrent-safe code) - Ensure index is valid before attempting to increment or decrement the `CurrentIndex` or `CurrentTrack` https://github.com/aaru-dps/RedBookPlayer/pull/3/commits/09f14810dd1d7f4db27819336819650d2cb0986a and https://github.com/aaru-dps/RedBookPlayer/pull/3/commits/df3d90a5309e1003f7b1eeef12c7412f0b398c61 fixes #2 https://github.com/aaru-dps/RedBookPlayer/pull/3/commits/bc645c21f0f515b534b6b97eba118c62e5d0fae1 fixes #4
claunia added the pull-request label 2026-01-30 21:23:13 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: aaru-dps/RedBookPlayer#60