The record could go from a screenful of text to less, and then to nothing at all, while
decoding was still running. The cause is dropBufferedAudio(), which runs on every change
of shift - and the shift tracks the detected tone, which drifts across a pass.
The live window is the only route into the archive: audio gets there by being pushed out
by newer audio. Clearing the window therefore did not merely discard 20 s, it reset the
progress towards ever archiving anything. Modelled at 18 WPM, a drift every 20 s meant
five minutes of listening archived not one character, however long the operator waited -
the window was always wiped before the first sample could be evicted. With the record
still concatenating the live decode at the time, each wipe also cut the visible
transcript short, which is the text going backwards and then never accumulating.
Retiring the window instead of dropping it fixes both. Those samples cannot stay - one
spectrogram over two shift amounts smears the tone - but they were shifted consistently
and they are complete, so they decode fine on their own. They are queued and archived by
the normal path, keeping dropBufferedAudio() non-suspending: both callers sit on the
synchronous capture path, and decoding there would put an inference inside the tone
scan. Modelled over 300 s, a drift every 5 s goes from 0 characters archived to 449.
An earlier attempt at this - keeping archiveSize instead of zeroing it - was wrong and
the probe rejected it: with the window wiped before it ever overflowed, that buffer was
empty, so preserving it preserved nothing.
The queue is synchronised (written from capture, drained from capture and flush) and
capped at four windows, dropping the oldest when full: a tone drifting on every
detection scan would otherwise queue faster than the decoder can drain.
Also from an audit of the previous two commits:
- The copy button was gated on the record, which is empty for the opening half-minute
while the first batch accumulates. That greyed out the one control that rescues the
text over exactly the short exchange most likely to be lost. It now copies the live
window too, and the empty state says which surface updates sooner.
- cw_copy, cw_copied, cw_record_label and cw_record_empty were missing from values-id,
values-in and values-tr, which carry the full UI strings, so those users saw English.
- Dropped a KDoc block left dangling by 8445c170, which had removed the constant it
documented.
22 lines
1.5 KiB
XML
22 lines
1.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<resources>
|
|
<string name="cw_pause">Jeda pendekodean</string>
|
|
<string name="cw_resume">Lanjutkan pendekodean</string>
|
|
<string name="cw_clear">Hapus teks hasil dekode</string>
|
|
<string name="cw_scroll_newest">Lompat ke teks terbaru</string>
|
|
<string name="cw_mic_permission">Izin mikrofon diperlukan untuk pendekodean CW</string>
|
|
<string name="cw_grant_permission">Berikan izin</string>
|
|
<string name="cw_open_settings">Buka pengaturan aplikasi</string>
|
|
<string name="cw_tone_shifted_hint">Nada %1$d Hz dipindahkan ke rentang dekode 400-1200 Hz</string>
|
|
<string name="cw_tone_outside_hint">Nada %1$d Hz di luar rentang dekode 400-1200 Hz. Aktifkan geser nada di Pengaturan.</string>
|
|
<string name="cw_waterfall_desc">Spektrum air terjun, %1$s</string>
|
|
<string name="cw_waterfall_idle">belum ada sinyal</string>
|
|
<string name="cw_waterfall_shifted">nada %1$d hertz, dipindahkan ke rentang dekode</string>
|
|
<string name="cw_waterfall_outside">nada %1$d hertz, di luar rentang dekode</string>
|
|
<string name="cw_waterfall_inside">nada %1$d hertz</string>
|
|
<string name="cw_copy">Salin catatan</string>
|
|
<string name="cw_copied">Catatan disalin</string>
|
|
<string name="cw_record_label">Catatan</string>
|
|
<string name="cw_record_empty">Teks muncul di sini setelah satu batch audio didekode. Baris di atas lebih cepat diperbarui. Salin sebelum keluar: catatan tidak disimpan.</string>
|
|
</resources>
|