Skip to content

Finish the compacted gain/pan fill and drop the unused GetGain/GetPan - #320

Merged
ann0see merged 1 commit into
ann0see:perf/server-gain-pan-snapshotfrom
mcfnord:pr293-compacted-fill
Sep 11, 2026
Merged

Finish the compacted gain/pan fill and drop the unused GetGain/GetPan#320
ann0see merged 1 commit into
ann0see:perf/server-gain-pan-snapshotfrom
mcfnord:pr293-compacted-fill

Conversation

@mcfnord

@mcfnord mcfnord commented Sep 11, 2026

Copy link
Copy Markdown

🤖 AI: The rest of the 7-suggestion set from the review, as asked, as one commit on d76667d7, plus the dead-code removal from open question 1.

d76667d7 carries suggestions 1–3 (the four-argument GetGainsAndPannings(), the snapshot members and their Init lines gone) but DecodeReceiveData still calls the two-argument form and indexes vecvecfGainsSnapshot/vecvecfPanningsSnapshot, so it does not compile (control below). This commit applies the call site: the getter fills vecvecfGains[iChanCnt]/vecvecfPannings[iChanCnt] directly in vecChanIDsCurConChan order under the single lock, the re-index pass and the separate panning copy go, and CChannel::GetGain/GetPan, now without callers, are removed. Three files, 6 insertions, 45 deletions.

Checked on d76667d7 + this commit (Raspberry Pi 4, Qt 5.15.15, g++ 14.2, CONFIG+=headless serveronly): build exit 0, 33 objects, 0 warnings in server.cpp/channel.cpp/channel.h, Jamulus -s -n still up after 6 s; control — your server.cpp from d76667d7 dropped into the same tree stops at line 901 with 'vecvecfGainsSnapshot' was not declared in this scope. clang-format-14 -style=file is byte-clean on the three files.


🤖 This message was written by AI and reviewed by @mcfnord.

Summary by CodeRabbit

  • Refactor
    • Streamlined channel gain and pan retrieval for more efficient processing.
    • Consolidated access to gain and pan data through a single retrieval operation.
    • Removed individual channel gain and pan accessors from the internal channel interface.

Suggestions 1-3 of review 5002083150 were already applied (four-argument
CChannel::GetGainsAndPannings, snapshot members removed); this applies
the remaining call-site change so DecodeReceiveData fills
vecvecfGains[iChanCnt]/vecvecfPannings[iChanCnt] directly, in
vecChanIDsCurConChan order, under the single lock, and removes the
re-index pass. CChannel::GetGain/GetPan have no callers left and are
removed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Brn7JJKhs3fhPZP3qC8DZA
@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: df5397c4-ce85-4ba4-a326-53c372b889a8

📥 Commits

Reviewing files that changed from the base of the PR and between d76667d and 5f50e3d.

📒 Files selected for processing (3)
  • src/channel.cpp
  • src/channel.h
  • src/server.cpp

📝 Walkthrough

Walkthrough

The change removes individual gain and pan accessors from CChannel. DecodeReceiveData now writes gain and pan values directly into compacted client arrays through GetGainsAndPannings.

Changes

Channel gain and pan access

Layer / File(s) Summary
Consolidate channel accessors
src/channel.h, src/channel.cpp
The CChannel interface and implementation remove GetGain and GetPan.
Populate compacted server data
src/server.cpp
DecodeReceiveData passes compacted channel IDs and destination arrays to GetGainsAndPannings. Snapshot buffers and manual gain and pan remapping are removed.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Suggested reviewers: softins

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@ann0see
ann0see merged commit 880823f into ann0see:perf/server-gain-pan-snapshot Sep 11, 2026
1 of 2 checks passed
@ann0see

ann0see commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Probably we should just rebase the state of this one...

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.

2 participants