Persist solo state (local tracks and peers) across restarts - #291
Open
kb9gxk wants to merge 5 commits into
Open
Conversation
Covers both local input channel groups and per-peer channel groups, since both reuse this struct's serialization. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- PeerStateCache gains a soloed field for whole-peer solo caching. - Two new processor-level settings, mRememberLocalTrackSolo and mRememberPeerSolo (both default true), gate whether solo state is restored on load. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- commitCacheForPeer/findAndLoadCacheForPeer now carry RemotePeer::soloed through the in-memory peer cache (same-session drop/reconnect). - PeerStateCache::getValueTree/setFromValueTree round-trip soloed to/from disk, matching the existing muted/gain/pan fields. - Two new extraTree keys persist the Remember Local Track Solo / Remember Peer Solo settings themselves. - On load, if a Remember-Solo setting is off, the corresponding soloed values are reset to false right after loading, so a restart doesn't restore solo state for that category. In-session reconnects are unaffected by this gating (untouched code path). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Two new checkboxes in the Options tab, following the existing Disable-keyboard-shortcuts toggle pattern exactly. Verified via a headless Xvfb run: both default on, both round-trip correctly through app restart. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Root cause of solo (and any other per-peer setting) not persisting for a peer that's still connected when the app quits: commitCacheForPeer was only ever called from peer-removal code paths (removeAllRemotePeers, individual disconnect), never from getStateInformationWithOptions itself. So a peer's live state -- soloed, gain, pan, etc. -- was only captured in mPeerStateCacheMap if you explicitly disconnected before quitting; anything changed since the last disconnect/reconnect was silently lost on quit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Currently,
MUTEstate persists across app restarts, butSOLOstate doesn't — soloing a local input track or a remote peer is lost every time the app restarts. This makes the two controls behave inconsistently even though they're presented identically in the UI.ChannelGroupParams(used by both local input channel groups and per-peer channel groups) now serializessoloed, matching the existingmutedfield exactly.PeerStateCachegains asoloedfield for the whole-peerSOLOtoggle (the one that solos an entire peer and un-solos the rest), wired throughcommitCacheForPeer/findAndLoadCacheForPeerand its owngetValueTree/setFromValueTree.commitCacheForPeeris now also called for every currently-connected peer right before state is saved.Testing
Main Monitor Solo is untouched — it was already a plugin parameter and already persisted correctly.