1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-02 14:04:46 -04:00

Tx ph.1: Added FileSink (2) compiles. Added plugin/samplesink in all builds

This commit is contained in:
f4exb
2016-10-19 22:32:14 +02:00
parent 6c82c36958
commit fbb816ebdf
13 changed files with 40 additions and 58 deletions
@@ -22,7 +22,7 @@
#include "dsp/samplesourcefifo.h"
#include "filesinkthread.h"
FileSinkThread::FileSinkThread(std::ofstream *samplesStream, SampleSinkFifo* sampleFifo, QObject* parent) :
FileSinkThread::FileSinkThread(std::ofstream *samplesStream, SampleSourceFifo* sampleFifo, QObject* parent) :
QThread(parent),
m_running(false),
m_ofstream(samplesStream),
@@ -30,6 +30,7 @@ FileSinkThread::FileSinkThread(std::ofstream *samplesStream, SampleSinkFifo* sam
m_bufsize(0),
m_samplesChunkSize(0),
m_sampleFifo(sampleFifo),
m_samplesCount(0),
m_samplerate(0),
m_throttlems(FILESINK_THROTTLE_MS),
m_throttleToggle(false)
@@ -129,6 +130,7 @@ void FileSinkThread::tick()
SampleVector::iterator beginRead;
m_sampleFifo->read(beginRead, m_samplesChunkSize);
m_ofstream->write(reinterpret_cast<char*>(*beginRead), m_samplesChunkSize*4);
m_ofstream->write(reinterpret_cast<char*>(&(*beginRead)), m_samplesChunkSize*4);
m_samplesCount += m_samplesChunkSize;
}
}