diff options
| author | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:35 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:35 +0200 |
| commit | ffc62c792c9a5196cb4ce7a353287dfe20db6524 (patch) | |
| tree | 1269efa852935b183daae4bb33a58d1b4d2ffb53 /Audio/FixtureAudioInput.hpp | |
| parent | 059831534c7e884f0a607ed86b582fd00d821731 (diff) | |
New upstream version 3.3.0~beta1+dfsgupstream/3.3.0_beta1+dfsg
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}; |
