Each opening started a new audio thread, and Qt's PipeWire backend leaks
~24 file descriptors per thread that ends. At the desktop's 1024-fd limit
QAudioSink.start() failed ("Too many open files") and segfaulted in
pw_stream_connect. The thread now lives as long as the output: stop()
only silences the pump, shutdown() (window close / aboutToQuit) ends it.
- Records in the top corners, each deck's controls beside them facing the
middle, the zoomed A-over-B waveforms in the centre, and a whole-song
overview per deck below (click to jump, drag to move) with the
crossfader between them.
- Loops per deck: Loop plus a 1/32 to 8 beat stepper; a loop starts on
the next beat and shows on both waveforms.
- Sync sets this deck to the other's tempo once, and stays lit only while
that still holds.
- The air horn plays like a real one: every press a fresh blast, held it
carries the note, let go it stops.
- Opening and closing DJ mode slides a picture over the final layout
instead of re-laying-out the window every frame (the flicker).
- Tests: garbage is collected on the main thread after each test, which
stops a rare segfault in the full run.
View > DJ Mode (or the turntable button under BPM) parts the window under
the transport boxes and opens a dark shelf: a record per deck (drag a song
on to load it; drag the record to scratch), play/pause and Sync to other
track beside it, a ±8% speed fader on each edge, Keep pitch, the two
waveforms stacked around one playhead, a vocals/instrumental slider and
the crossfader. Deck A is blue, Deck B orange; loaded songs are tagged in
the lists.
Its own engine (lintunes/dj): whole-song decode, tempo refined to 0.01
BPM plus the first beat (exact on synthetic kicks), WSOLA time-stretch or
varispeed, a QAudioSink on its own thread. Sync matches tempo and, while
both play, nudges the beats into line. A missing BPM is calculated and
saved. Vocals come from Demucs, run once per song in the background and
cached; Demucs lives in its own venv.
Opening Connections called find_device() on the GUI thread, which lists the
gvfs-MTP mount; on a wedged mount that blocks forever in an uninterruptible
FUSE wait and the app had to be force-quit. DeviceWatcher now probes on a
daemon thread (one at a time, STUCK after 3 s, late answers still land), the
menu reads its cached answer, and a stuck mount shows "Rabbit isn't
responding…" with a Reset Connection button (kill gvfsd-mtp, remount via
gio). Tests can no longer reach the real mount (conftest patches
find_device), which also takes the suite from ~200 s to ~22 s.
- Connections ▸ Share Library with a Friend… makes a one-time invite code
(device id, display name, token) and the inviter's send-only folder.
- Connections ▸ Add Friend Library… takes the pasted code: adds the
inviter, shares our folder, and accepts theirs receive-only when it's
offered back.
- Syncthing hides an unknown device's folders (verified on 1.30), so the
inviter probes a new knock only while an invite is open: added with
nothing shared, completed on the right token, otherwise removed and
never probed again. Used and cancelled codes go nowhere.
- Sync Settings lists open invites (Cancel Invite) and gives each friend a
page: avatar, plain-language status with a next step, last seen, last
synced, Remove Friend. Removals are staged until OK.
- scripts/cassette_pair.py runs throwaway Syncthings on loopback;
pytest --syncthing drives a real three-machine handshake.
LinTunes has spontaneously resumed playback for ~4s (then paused) four
times while trav was away — suspected phantom media-key events from the
Audioengine USB DAC's HID 'keyboard', but the pathway (MPRIS vs the
focused-window key filter) is unproven. Every control path now drops a
timestamped line in ~/.cache/lintunes/control-events.log: MPRIS Player
methods, the media-key eventFilter (with source input device where the
compositor exposes it), and Player.toggle_play/pause with position. New
lintunes/eventlog.py, 1MB rotation, never raises; conftest autouse
fixture keeps tests off the real log file.
Snapshot of the existing codebase before working through the TASKS.md
backlog. Real library data (data/) and the iTunes import fixture
(itunes-test-library/) are gitignored.