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 /JttyTxLoopbackTestController.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 'JttyTxLoopbackTestController.hpp')
| -rw-r--r-- | JttyTxLoopbackTestController.hpp | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/JttyTxLoopbackTestController.hpp b/JttyTxLoopbackTestController.hpp new file mode 100644 index 00000000..69e43c8f --- /dev/null +++ b/JttyTxLoopbackTestController.hpp @@ -0,0 +1,63 @@ +// -*- Mode: C++ -*- +#ifndef JTTY_TX_LOOPBACK_TEST_CONTROLLER_HPP__ +#define JTTY_TX_LOOPBACK_TEST_CONTROLLER_HPP__ + +#include <QObject> +#include <QSet> +#include <QString> +#include <QTimer> +#include <QVector> + +class FixtureSoundOutput; +class MainWindow; + +class JttyTxLoopbackTestController final + : public QObject +{ + Q_OBJECT + +public: + JttyTxLoopbackTestController (MainWindow * window, + FixtureSoundOutput * output, + QString capturePath, + QObject * parent = nullptr); + + void begin (); + bool succeeded () const {return m_succeeded;} + +private: + static QString contestExchangeMessage (); + static QString adjacentStructuredFramesMessage (); + static qint64 encodedSampleFrames (QString const& message); + void prepareWhenReady (); + void submitSecondMessage (); + void maybeFinish (); + bool validateCapture (QString * error) const; + void fail (QString const& reason); + void checkForUnexpectedModal (); + + MainWindow * m_window; + FixtureSoundOutput * m_output; + QString m_capturePath; + QSet<qint64> m_acceptedRequests; + QSet<qint64> m_completedRequests; + QVector<qint64> m_acceptedOrder; + QVector<qint64> m_completedOrder; + QTimer m_timeout; + QTimer m_prepareTimer; + QTimer m_modalTimer; + qint64 m_firstRequestId {0}; + qint64 m_secondRequestId {0}; + qint64 m_capturedFrames {0}; + qint64 m_expectedAudioFrames {0}; + qint64 m_firstNonSilentFrame {0}; + int m_captureStartCount {0}; + int m_captureStopCount {0}; + int m_sessionDrainCount {0}; + bool m_prepared {false}; + bool m_nonSilentAudioSeen {false}; + bool m_finished {false}; + bool m_succeeded {false}; +}; + +#endif |
