Skip to content

Add jamulusclient/setInputBoost JSON-RPC method - #3843

Open
mcfnord wants to merge 1 commit into
jamulussoftware:mainfrom
mcfnord:add-jsonrpc-setinputboost
Open

Add jamulusclient/setInputBoost JSON-RPC method#3843
mcfnord wants to merge 1 commit into
jamulussoftware:mainfrom
mcfnord:add-jsonrpc-setinputboost

Conversation

@mcfnord

@mcfnord mcfnord commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

MY LLM WROTE:

Adds jamulusclient/setInputBoost so headless clients can change the input boost factor at runtime, matching what the GUI's Advanced Settings combo box already does.

Requested by @pljones on #3841: "add the JSONRPC to match the Client UI first, then this one. I'd rather not introduce a hole." This is that first PR; #3841 (the ini-parse fix) follows it.

What it does

{"boost": <1-10>} calls CClient::SetInputBoost() directly — the same call the GUI makes from CClientSettingsDlg::OnInputBoostChanged (clientsettingsdlg.cpp:1385-1389) on every combo-box change. The factor is 1-based, where 1 is the GUI's "None", matching cbxInputBoost's population in clientsettingsdlg.cpp:549-556.

Validation mirrors the existing setMuted handler. docs/JSON-RPC.md is regenerated via tools/generate_json_rpc_docs.py.

Testing

Built headless (qmake CONFIG+=headless && make), then ran a real headless client (jackd -d dummy, -n --jsonrpcport ... --jsonrpcsecretfile ...) and drove the method over the TCP JSON-RPC socket — not just a startup smoke test:

Request Response
{"boost": 10} {"result": "ok"}
{"boost": 1} {"result": "ok"}
{"boost": 11} {"error": {"code": -32602, "message": "Invalid params: boost must be between 1 and 10"}}
{"boost": 0} {"error": {"code": -32602, "message": "Invalid params: boost must be between 1 and 10"}}
{"boost": "x"} {"error": {"code": -32602, "message": "Invalid params: boost is not a number"}}
{} {"error": {"code": -32602, "message": "Invalid params: boost is not a number"}}

Each response carries result or error, never both — checked explicitly, since that was the bug fixed in #3820.

Note

There is no getInputBoost: client.h:290 defines only the setter, so a consumer can set the boost but not read it back. Several other RPC settings have the same asymmetry, so I left it out of this PR rather than address it piecemeal — happy to follow up if you'd like it covered.

Headless clients had no way to change the input boost factor at
runtime: CClient::SetInputBoost() was only reachable from the GUI's
Advanced Settings combo box (CClientSettingsDlg::OnInputBoostChanged).

Adds a setter mirroring the existing setMuted handler, taking a 1-based
factor from 1 (the GUI's "None") to 10, matching cbxInputBoost's range.
docs/JSON-RPC.md regenerated via tools/generate_json_rpc_docs.py.

Requested by pljones on jamulussoftware#3841, which applies the inputboost ini setting
at headless startup and follows this change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@dingodoppelt

Copy link
Copy Markdown
Member

I don't think we should mix in some headless only options. I use client RPC only with the GUI (while I've never used the boost feature)
Alternatively (as with the reverb): get rid of the boost feature, because I doubt it sees much use.

@dingodoppelt dingodoppelt added JSON-RPC Related to the JSON-RPC API AI AI generated or potentially AI generated labels Jul 28, 2026
@ann0see

ann0see commented Jul 29, 2026

Copy link
Copy Markdown
Member

because I doubt it sees much use.

Likely.

I discussed this with @hoffie as this was introduced initially. The problem was that some windows laptops had very quiet mics. With an ASIO4ALL setup this was necessary.

Our ensemble side stepped this by giving everyone a budget interface + mic with real ASIO driver.

@pljones

pljones commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Yeah, it's another one of the "features" that - in my opinion - is pure bloat. The problem it addresses can - and should - be fixed outside Jamulus.

On this change -- when there's a change triggered by either the UI or JSONRPC, that change should send a signal and that signal should trigger the UI to change and a JSONRPC notification to be emitted. I believe that's the template we follow generally?

@dingodoppelt

Copy link
Copy Markdown
Member

On this change -- when there's a change triggered by either the UI or JSONRPC, that change should send a signal and that signal should trigger the UI to change and a JSONRPC notification to be emitted. I believe that's the template we follow generally?

I don't think there is a general template, yet. There definitely should be one. Having the input boost not reflected in the UI was just "bad luck". For example with setMuted I reused the MIDI implementation and that already updated the UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI AI generated or potentially AI generated JSON-RPC Related to the JSON-RPC API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants