Commit db3387f
feedTxAudio/feedRxAudio took m_writeMutex *before* their fast-path checks.
The new CW record pump calls feedTxAudio ~100x/s from the real-time audio
thread; if the GUI thread holds m_writeMutex during stopRecording/finalize
disk I/O, the audio thread blocks inside the real-time path -> xrun. (RX
feed has the same shape and is fed continuously from the RX audio thread.)
Make m_recording std::atomic<bool> and check the atomics (m_recording +
m_transmitting) lock-free before taking the mutex, returning early in the
common not-recording / wrong-direction case. The post-lock re-check stays
authoritative, so behavior is unchanged — only the lock is skipped when
there's nothing to write.
Per maintainer call on the other items: #1 (CW pump architecture) is not a
blocker; #2 (RecordingMode "Client" default) is approved as-is.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 9433921 commit db3387f
2 files changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
128 | 135 | | |
129 | 136 | | |
130 | 137 | | |
| |||
137 | 144 | | |
138 | 145 | | |
139 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
140 | 154 | | |
141 | 155 | | |
142 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
0 commit comments