[PR #23] Separate out internal code more cleanly #61

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

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

State: closed
Merged: Yes


This PR does a few major things:

  • Remove as many references as possible to the currently loaded disc from the UI code. This means that nearly all instances where the disc is accessed, it will go through the Player code instead. This is an extension to the previous PR.
  • Separate out audio handling code from the Player code into a new class called SoundOutput. There is only one type of output right now, but either an abstract class or an interface can be created later to make adding different audio handlers possible (fixes #21)
  • Organized classes into more accurate namespaces, named Discs, GUI, and Hardware
    • Discs is the namespace for all supported media, including what used to be PlayableDisc. PlayableDisc has been separated into a base class called OpticalDisc and a specific implementation called CompactDisc
    • GUI is the namespace for all current UI. The intent is that the existing UI may not be the only way that this player can be interacted with in the future. A better solution when that day comes is to separate out the code into separate libraries, not just namespaces
    • Hardware is for "hardware mimicking" parts of the code. This includes player and sound output code currently. If other pieces come in the future, such as the ability to have multiple outputs or effects, they would likely go here.

Aside from the above, the PR also does the following:

  • Add Windows and Linux build scripts while simplifying the csproj a bit
  • Fix more issues found during regression testing, mainly around reading
  • Use the sector size from the current image (fixes #11)
  • Remove the unused HiResTimer class
  • Use the TOC generation code from the latest version of Aaru
  • Enable drag and drop support, which loads the first valid file dropped onto the UI (fixes #9)
**Original Pull Request:** https://github.com/aaru-dps/RedBookPlayer/pull/23 **State:** closed **Merged:** Yes --- This PR does a few major things: - Remove as many references as possible to the currently loaded disc from the UI code. This means that nearly all instances where the disc is accessed, it will go through the `Player` code instead. This is an extension to the previous PR. - Separate out audio handling code from the `Player` code into a new class called `SoundOutput`. There is only one type of output right now, but either an abstract class or an interface can be created later to make adding different audio handlers possible (fixes #21) - Organized classes into more accurate namespaces, named `Discs`, `GUI`, and `Hardware` - `Discs` is the namespace for all supported media, including what used to be `PlayableDisc`. `PlayableDisc` has been separated into a base class called `OpticalDisc` and a specific implementation called `CompactDisc` - `GUI` is the namespace for all current UI. The intent is that the existing UI may not be the only way that this player can be interacted with in the future. A better solution when that day comes is to separate out the code into separate libraries, not just namespaces - `Hardware` is for "hardware mimicking" parts of the code. This includes player and sound output code currently. If other pieces come in the future, such as the ability to have multiple outputs or effects, they would likely go here. Aside from the above, the PR also does the following: - Add Windows and Linux build scripts while simplifying the csproj a bit - Fix more issues found during regression testing, mainly around reading - Use the sector size from the current image (fixes #11) - Remove the unused `HiResTimer` class - Use the TOC generation code from the latest version of Aaru - Enable drag and drop support, which loads the first valid file dropped onto the UI (fixes #9)
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#61