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

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

📋 Pull Request Information

Original PR: https://github.com/aaru-dps/RedBookPlayer/pull/3
Author: @mnadareski
Created: 6/5/2021
Status: Merged
Merged: 6/6/2021
Merged by: @claunia

Base: develHead: devel


📝 Commits (3)

  • 09f1481 Fix current index setting, lock reads (fixes #2)
  • bc645c2 Simplify next and previous index logic
  • df3d90a Fix next/previous track, fix playing to end of track

📊 Changes

1 file changed (+36 additions, -34 deletions)

View changed files

📝 RedBookPlayer/Player.cs (+36 -34)

📄 Description

  • 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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/aaru-dps/RedBookPlayer/pull/3 **Author:** [@mnadareski](https://github.com/mnadareski) **Created:** 6/5/2021 **Status:** ✅ Merged **Merged:** 6/6/2021 **Merged by:** [@claunia](https://github.com/claunia) **Base:** `devel` ← **Head:** `devel` --- ### 📝 Commits (3) - [`09f1481`](https://github.com/aaru-dps/RedBookPlayer/commit/09f14810dd1d7f4db27819336819650d2cb0986a) Fix current index setting, lock reads (fixes #2) - [`bc645c2`](https://github.com/aaru-dps/RedBookPlayer/commit/bc645c21f0f515b534b6b97eba118c62e5d0fae1) Simplify next and previous index logic - [`df3d90a`](https://github.com/aaru-dps/RedBookPlayer/commit/df3d90a5309e1003f7b1eeef12c7412f0b398c61) Fix next/previous track, fix playing to end of track ### 📊 Changes **1 file changed** (+36 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `RedBookPlayer/Player.cs` (+36 -34) </details> ### 📄 Description - 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-30 21:23:12 +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#55