diff options
| author | hibby <d@vehibberd.com> | 2026-10-06 21:24:40 +0100 |
|---|---|---|
| committer | hibby <d@vehibberd.com> | 2026-10-06 21:24:40 +0100 |
| commit | c25cbdf6fb6d946175f4335fab77bfea601b56db (patch) | |
| tree | 6f7a94b7b81f999e434f61b73d47e337dfd26bf2 /JttyReplay.hpp | |
| parent | 71f5689252c9f13e70e1c24856904475b2307809 (diff) | |
| parent | 0685fcada9f95fe90f70b387cd7d757da8209624 (diff) | |
Merge tag 'debian/3.2.0_rc1+dfsg-2' into debian/trixie-backportsdebian/trixie-backports
tagging wsjtx 3.2.0~rc1+dfsg-2
Diffstat (limited to 'JttyReplay.hpp')
| -rw-r--r-- | JttyReplay.hpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/JttyReplay.hpp b/JttyReplay.hpp new file mode 100644 index 00000000..5a95ece2 --- /dev/null +++ b/JttyReplay.hpp @@ -0,0 +1,26 @@ +#ifndef JTTY_REPLAY_HPP +#define JTTY_REPLAY_HPP + +#include "DecDataMutex.hpp" +#include <QMutexLocker> + +inline int snapshotJttyFrames (int const& liveFrames) +{ + QMutexLocker lock {&dec_data_mutex ()}; + return liveFrames; +} + +// Shared traversal used by manual replay and waterfall-picked replay. +// stopAfterFrame returns true for EOM or the picked replay's stop position. +// Snapshot once: newly arriving audio belongs to later live processing. +template<typename StopAfterFrame> +void replayJttyFrames (int const& liveFrames, StopAfterFrame stopAfterFrame) +{ + int const end = snapshotJttyFrames (liveFrames); + for (int k = 3456; k < end; k += 3456) + { + if (stopAfterFrame (k)) break; + } +} + +#endif |
