Home

xmn / bettertrumpet

publicxammen/BetterTrumpet· sync paused
Overview Code History Branches Pull requestsIssuesInsights
master
HomeOverview Code PRsIssues

#81 Volume sliders and flyout becomes laggy/jittery after re-connecting an active audio device

open

Opened by WraithCruiser · last week

WraithCruiseropened this issueAuthor· last week
WraithCruisercommented· 4 days ago
xmncommented· yesterday

[!NOTE] 🤖 Claude Opus 5.5 responding on behalf of xammen

Your log showed the 3.5.0 fix did its part (no more dead device callbacks), so the search moved to what else survives a reconnect, and there was something.

Every audio session BetterTrumpet had seen stayed in memory: a background "did this app quit?" watcher kept a link to each one, and for apps that keep running (browser, Steam, OBS, BetterTrumpet itself) that link never went away. Reproduced with your steps: on 3.5.0, 6 disable/enable cycles of the default device left 62 extra sessions and 165 extra app rows in memory. With 3.5.1, after the same 6 cycles it's back to exactly what it was at startup.

Two related fixes:

  • The peak meter timer could queue UI work ahead of mouse input when the app got busy, which is the "slider keeps moving after I let go" kind of lag. It now never queues more than one update, and it waits behind input.
  • A small handler leak in the collapsed flyout on every default-device switch.

The lag itself didn't reproduce here, only the memory growth, so please say if it still gets jittery after a few reconnects on 3.5.1. A log from that session would help again.

WraithCruisercommented· 17 hours ago

Sign in to comment.

Linked pull requests

No linked pull requests yet.

Summary

Summary:

After disabling/disconnecting and re-enabling/reconnecting an active audio device (reproduced with both TWS headphones and default speakers) a few times, all volume sliders (including those for other devices, e.g. speakers) and the flyout start to lag and jitter.

The flyout opens with a noticeable delay, and the sliders seem to debounce/throttle volume changes while dragging. Both mouse wheel scrolling and cursor dragging are affected. Right after app startup, everything works smoothly.

Memory usage also seems to increase with each reconnect: ~30–40 MB right after startup, rising to 60+ MB after several reconnects. Restarting the app fixes the issue until the next few reconnects.

This issue is also reproducible during extended PC usage (e.g. over a day), particularly after sleep/wake cycles when previously connected TWS headphones reconnect to the PC.

Steps to reproduce

Steps to reproduce:

  1. Start BetterTrumpet (fresh start). Open the flyout and drag any slider — it works smoothly.
  2. Disconnect and reconnect the active audio device 2–3 times using any of these methods:
  • Windows Settings > Bluetooth & devices > Disconnect / Connect
  • Sound Control Panel > Playback > right-click the active device > Disable / Enable
  • Sound Control Panel > Playback > right-click > Disconnect
  1. Open the flyout and drag any slider back and forth.
  2. Sliders lag and jitter, and continue moving for a moment after releasing the mouse button.

What does NOT trigger it:

  • Changing the default output device in Windows Settings.
  • Disabling/enabling a device that is not currently active (seems fine in my tests).

EarTrumpet version

3.4.0

Windows version

Windows 10 22H2 (10.0.19045.6466)

Additional information

Additional information:

  • Headphones: realme Buds Air 6 Pro (Bluetooth 5.3).
  • Workaround: Restarting BetterTrumpet fixes the issue.
  • Screen recording attached: Shows smooth sliders after a fresh start, followed by Task Manager memory/CPU usage and laggy sliders after several reconnects.

github.com/user-attachments/…/4647b6d6-8b91-4882-a4e6-c7280168bc2f

Unfortunately, the issue still persists on my end and remains reproducible under the same conditions described above, even after the latest changes.

I've attached logs in case they help. bettertrumpet-20261108-133404.log

Tested it on 3.5.1. I tried the same steps as before, but the issue is no longer reproducible.

Thanks for the fix!