summaryrefslogtreecommitdiff
path: root/Modulator/JttyTxStream.hpp
diff options
context:
space:
mode:
authorDave Hibberd <hibby@debian.org>2026-10-20 22:35:06 +0100
committerDave Hibberd <hibby@debian.org>2026-10-20 22:35:06 +0100
commit82ebb1ed1af30cee4dfbb1c628431d32885a00e0 (patch)
tree1a1f782d3e576b758be0bc61171574a7cd8f2376 /Modulator/JttyTxStream.hpp
parent061658210acb6425517733ea012dda803a7f72a1 (diff)
parent61d684922b0f1c8455cc60eb3d123df058c9e1f5 (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 'Modulator/JttyTxStream.hpp')
-rw-r--r--Modulator/JttyTxStream.hpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/Modulator/JttyTxStream.hpp b/Modulator/JttyTxStream.hpp
index 1a1d8784..9a58e956 100644
--- a/Modulator/JttyTxStream.hpp
+++ b/Modulator/JttyTxStream.hpp
@@ -2,6 +2,8 @@
#define JTTY_TX_STREAM_HPP__
#include <atomic>
+#include <memory>
+#include <QByteArray>
#include <QPointer>
#include <QTimer>
#include <QVector>
@@ -35,9 +37,21 @@ public:
Q_SLOT void start (TxEvidence::TxRequest request, SoundOutput * stream);
Q_SLOT void stop ();
+ Q_SLOT void clearQueue (TxAudioQueueEpoch epoch);
+ // Reserve queued payload capacity before posting to the audio thread.
+ void queuePcm (QByteArray const& samples, TxAudioQueueEpoch epoch,
+ qint64 enqueueId);
+ Q_SLOT void enqueuePcm (QByteArray const& samples, TxAudioQueueEpoch epoch,
+ qint64 enqueueId);
Q_SIGNAL void drained (TxAudioQueueDrainState drain);
+ Q_SIGNAL void progress (TxAudioQueueProgress progress);
+ Q_SIGNAL void stopped ();
Q_SIGNAL void txSourceCommitted (TxEvidence::TxStartSnapshot snapshot);
+ Q_SIGNAL void enqueueAccepted (qint64 enqueueId, qint64 sampleCount,
+ TxAudioQueueProgress progress);
+ Q_SIGNAL void enqueueFailed (TxAudioQueueEpoch epoch, qint64 enqueueId,
+ TxAudioQueueEnqueueFailure failure);
protected:
qint64 readData (char * data, qint64 maxSize) override;
@@ -47,6 +61,8 @@ protected:
}
private:
+ struct PendingEnqueues;
+ std::shared_ptr<PendingEnqueues> m_pendingEnqueues;
Q_SLOT void pollDrain ();
TxAudioQueue& m_queue;
@@ -55,6 +71,7 @@ private:
QPointer<SoundOutput> m_stream;
QTimer * m_drainTimer;
std::atomic<bool> m_active;
+ TxAudioQueueProgress m_lastProgress;
};
#endif