30 m_ofstream(samplesStream),
32 m_samplesChunkSize(0),
33 m_sampleFifo(sampleFifo),
36 m_log2Interpolation(0),
39 m_throttleToggle(false),
56 qDebug() <<
"FileSinkThread::startWork: ";
60 qDebug() <<
"FileSinkThread::startWork: file stream open, starting...";
71 qDebug() <<
"FileSinkThread::startWork: file stream closed, not starting.";
77 qDebug() <<
"FileSinkThread::stopWork";
86 qDebug() <<
"FileSinkThread::setSamplerate:" 87 <<
" new:" << samplerate
90 bool wasRunning =
false;
107 m_samplerate = samplerate;
118 if ((log2Interpolation < 0) || (log2Interpolation > 6))
125 qDebug() <<
"FileSinkThread::setLog2Interpolation:" 126 <<
" new:" << log2Interpolation
129 bool wasRunning =
false;
141 m_log2Interpolation = log2Interpolation;
164 qDebug() <<
"FileSinkThread::connectTimer";
165 connect(&timer, SIGNAL(timeout()),
this, SLOT(
tick()));
187 SampleVector::iterator readUntil;
195 m_ofstream->write(reinterpret_cast<char*>(&(*beginRead)), m_samplesChunkSize*
sizeof(
Sample));
#define FILESINK_THROTTLE_MS
void interpolate64_cen(SampleVector::iterator *it, T *buf, qint32 len, bool invertIQ=false)
void setLog2Interpolation(int log2Interpolation)
QWaitCondition m_startWaiter
FileSinkThread(std::ofstream *samplesStream, SampleSourceFifo *sampleFifo, QObject *parent=0)
void interpolate32_cen(SampleVector::iterator *it, T *buf, qint32 len, bool invertIQ=false)
void interpolate8_cen(SampleVector::iterator *it, T *buf, qint32 len, bool invertIQ=false)
unsigned int m_samplesChunkSize
void interpolate2_cen(SampleVector::iterator *it, T *buf, qint32 len, bool invertIQ=false)
void readAdvance(SampleVector::iterator &readUntil, unsigned int nbSamples)
QElapsedTimer m_elapsedTimer
void resize(uint32_t size)
SampleSourceFifo * m_sampleFifo
std::size_t m_samplesCount
Interpolators< qint16, SDR_TX_SAMP_SZ, 16 > m_interpolators
void interpolate16_cen(SampleVector::iterator *it, T *buf, qint32 len, bool invertIQ=false)
void interpolate4_cen(SampleVector::iterator *it, T *buf, qint32 len, bool invertIQ=false)
void connectTimer(const QTimer &timer)
std::ofstream * m_ofstream
void setSamplerate(int samplerate)
T min(const T &x, const T &y)