diff options
| author | Dave Hibberd <hibby@debian.org> | 2026-10-20 22:35:06 +0100 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2026-10-20 22:35:06 +0100 |
| commit | 82ebb1ed1af30cee4dfbb1c628431d32885a00e0 (patch) | |
| tree | 1a1f782d3e576b758be0bc61171574a7cd8f2376 /Audio/FixtureAudioInput.hpp | |
| parent | 061658210acb6425517733ea012dda803a7f72a1 (diff) | |
| parent | 61d684922b0f1c8455cc60eb3d123df058c9e1f5 (diff) | |
Merge tag 'debian/3.3.0_beta2+dfsg-1' into hibbian/trixie-backports
tagging wsjtx 3.3.0~beta2+dfsg-1
Diffstat (limited to 'Audio/FixtureAudioInput.hpp')
| -rw-r--r-- | Audio/FixtureAudioInput.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Audio/FixtureAudioInput.hpp b/Audio/FixtureAudioInput.hpp index 8bca1af9..8dd2940e 100644 --- a/Audio/FixtureAudioInput.hpp +++ b/Audio/FixtureAudioInput.hpp @@ -5,6 +5,7 @@ #include "Audio/AudioInputSource.hpp" #include <QByteArray> +#include <QElapsedTimer> #include <QPointer> #include <QString> #include <QVector> @@ -25,6 +26,7 @@ public: }; explicit FixtureAudioInput (QString path, Profile profile = Profile::Ft8, + unsigned pacingSpeed = 1, QObject * parent = nullptr); Q_SLOT void start (QAudioDeviceInfo const&, int framesPerBuffer, @@ -39,6 +41,7 @@ public: QString emitFt8RolloverPrefix (); static constexpr int ft8RolloverFrames () {return 6912;} static constexpr qint16 ft8RolloverSample () {return -12345;} + static constexpr qint64 jttyCaptureOffsetMs () { return 177500; } Q_SLOT void advanceHandoff (qint64 captureFrames, bool fresh, bool flush); static qint16 handoffSample (qint64 period, qint64 offset) { @@ -57,6 +60,7 @@ private: } void fail (QString const& message); qint64 captureTimestamp (qint64 frameIndex) const; + qint64 pacingTimestamp (qint64 frameIndex) const; void publishCaptureAnchor (qint64 firstFrame); void maybeSchedule (); void scheduleNextChunk (); @@ -67,6 +71,7 @@ private: QString m_path; Profile m_profile; + unsigned const m_pacingSpeed; QByteArray m_pcm; QPointer<AudioDevice> m_sink; QTimer * m_timer; @@ -76,7 +81,10 @@ private: qint64 m_tailFrames {0}; qint64 m_framesEmitted {0}; qint64 m_periodStartMs {0}; + qint64 m_pacingStartMs {0}; qint64 m_jttyAcknowledgedInputFrames {0}; + QElapsedTimer m_emissionTimer; + qint64 m_nextChunkMs {0}; int m_chunkIndex {0}; bool m_started {false}; bool m_armed {false}; |
