Skip to content

Release/v1.0.1#4

Merged
lkora merged 7 commits intomainfrom
release/v1.0.1
Jul 5, 2025
Merged

Release/v1.0.1#4
lkora merged 7 commits intomainfrom
release/v1.0.1

Conversation

@lkora
Copy link
Owner

@lkora lkora commented Jul 5, 2025

🚀 New Features

Upsampling with Customizable Strategies

When drawing a waveform that is wider than the number of available audio samples, the scrubber now uses hardware-accelerated vDSP interpolation to intelligently "stretch" the data. This completely eliminates the visual gaps that occurred previously with drawers like BarDrawer.

You can now control the visual style of this upsampling by choosing a strategy in your Drawer's configuration:

  • .smooth (Default): Uses a simd_smoothstep function for a C² continuous, highly smoothed curve. The most visually pleasing option for most use cases.
  • .cosine: Uses a cosine curve for a smooth "ease-in, ease-out" effect.
  • .linear: Creates straight lines between sample points.
  • .hold: Repeats the previous sample's value, creating a "stepped" or blocky retro effect.
  • .none: Disables upsampling entirely, preserving the original behavior for custom use cases.

New inverted mode for LineDrawer

The LineDrawer now includes an inverted option in its configuration, allowing you to create "cutout" or "trough" style waveforms.

🛠️ Improvements & Refactoring

  • Refactored Processing Logic into Services: The core data processing logic has been extracted from AudioProcessor into dedicated Downsampler and Upsampler services. This adheres to the Single Responsibility Principle, making the codebase cleaner, more focused, and easier to maintain.
  • Massively Expanded Unit Test Coverage: Added dedicated test suites for the new Upsampler and Downsampler services. This verifies the correctness of all interpolation and downsampling algorithms across various edge cases, ensuring high stability.
  • Improved Testability: Key logic, like the logarithmic transformation, has been made static to allow for direct and isolated unit testing.

🐛 Bug Fixes

  • LineDrawer Rendering Corrected: Fixed a critical bug where LineDrawer would draw an incorrect, asymmetrical shape. It now perfectly renders a symmetrical, closed path that matches the envelope of the BarDrawer.

@lkora lkora merged commit cf02494 into main Jul 5, 2025
4 checks passed
@lkora lkora deleted the release/v1.0.1 branch July 5, 2025 22:36
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