Skip to content

Unified Renderer - #300

Merged
Raffaello merged 7 commits into
masterfrom
renderer
Jun 9, 2026
Merged

Unified Renderer#300
Raffaello merged 7 commits into
masterfrom
renderer

Conversation

@Raffaello

@Raffaello Raffaello commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Chores
    • Version bumped to 0.19.3
  • Refactor
    • Unified audio renderer into a single, platform-agnostic implementation and removed the legacy platform-specific renderer
    • Simplified renderer API and internal buffer handling
  • Tests
    • Consolidated renderer tests to target the unified renderer implementation

@Raffaello Raffaello self-assigned this Jun 9, 2026
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a07ea57f-db14-4579-8386-30f88021840a

📥 Commits

Reviewing files that changed from the base of the PR and between 1513e91 and ff403ae.

📒 Files selected for processing (1)
  • hyper-sonic-drivers/src/HyperSonicDrivers/audio/Renderer.hpp
🚧 Files skipped from review as they are similar to previous changes (1)
  • hyper-sonic-drivers/src/HyperSonicDrivers/audio/Renderer.hpp

Walkthrough

Consolidates SDL2/SDL3-specific renderers into a single generic HyperSonicDrivers::audio::Renderer, removes mixer dependency from IRenderer, updates build wiring to include the shared renderer, and consolidates renderer tests and namespaces.

Changes

Audio Renderer Backend Unification

Layer / File(s) Summary
IRenderer interface simplification
hyper-sonic-drivers/src/HyperSonicDrivers/audio/IRenderer.hpp
Removed IMixer include and getMixer(); replaced m_mixer with m_buffer_size to decouple buffer sizing from mixer management.
Generic renderer implementation and API change
hyper-sonic-drivers/src/HyperSonicDrivers/audio/Renderer.hpp, hyper-sonic-drivers/src/HyperSonicDrivers/audio/Renderer.cpp
Renderer moved from HyperSonicDrivers::audio::sdl3 to HyperSonicDrivers::audio; constructor now takes only buffer_size and methods use m_buffer_size for buffer sizing.
Build wiring and platform include selection
hyper-sonic-drivers/CMakeLists.txt, hyper-sonic-drivers/sdl2-hyper-sonic-drivers.cpp
CMake unconditionally includes audio/Renderer.cpp; sdl2-hyper-sonic-drivers.cpp now selects SDL3/SDL2/rtaudio headers and mixer/logger implementations, then includes generic Renderer.hpp.
Test consolidation and updates
hyper-sonic-drivers/test/HyperSonicDrivers/CMakeLists.txt, hyper-sonic-drivers/test/HyperSonicDrivers/audio/TestRenderer.cpp
Test CMakeLists now builds audio/TestRenderer.cpp unconditionally; test includes the generic audio/Renderer.hpp, uses HyperSonicDrivers::audio namespace, and constructs Renderer(1024).
Release version bump
CMakeLists.txt
Project version updated from 0.19.2 to 0.19.3.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

enhancement, file

"I nibble at old headers, sew them anew,
SDL branches fold into one bright view.
A buffer kept simple, steady and small,
Tests hop together and answer the call.
Version raised — the rabbit does a joyful sprawl." 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 9.09% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Unified Renderer' accurately captures the main objective of the pull request, which consolidates the SDL2 and SDL3-specific Renderer implementations into a single, generic Renderer class in the HyperSonicDrivers::audio namespace.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch renderer

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Raffaello Raffaello added good first issue Good for newcomers refactor refactoring code, same functionality, but better code labels Jun 9, 2026
@github-project-automation github-project-automation Bot moved this to In progress in Architecture Jun 9, 2026
@Raffaello Raffaello changed the title unified renderer Unified Renderer Jun 9, 2026
@codacy-production

codacy-production Bot commented Jun 9, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 23 complexity

Metric Results
Complexity 23

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@Raffaello
Raffaello marked this pull request as ready for review June 9, 2026 10:38
coderabbitai[bot]

This comment was marked as outdated.

@Raffaello

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

coderabbitai[bot]

This comment was marked as resolved.

@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@Raffaello

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Raffaello
Raffaello merged commit c139254 into master Jun 9, 2026
17 of 18 checks passed
@github-project-automation github-project-automation Bot moved this from In progress to Done in Architecture Jun 9, 2026
@Raffaello
Raffaello deleted the renderer branch June 9, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue Good for newcomers refactor refactoring code, same functionality, but better code

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant