Skip to content

Commit

Permalink
DSD demod plugin: DSD proper integration interim state #3
Browse files Browse the repository at this point in the history
  • Loading branch information
f4exb committed Apr 9, 2016
1 parent 497ce45 commit 6a8d1e0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions plugins/channel/demoddsd/dsddemod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ DSDDemod::DSDDemod(SampleSink* sampleSink) :
{
setObjectName("DSDDemod");

m_dsdInBuffer = new qint16[1<<18]; // 128 k Samples is the maximum size of all input devices sample buffers (Airspy or HackRF) = 2^(17+1) for 2 byte samples
m_samplesBuffer = new qint16[1<<18]; // 128 k Samples is the maximum size of all input devices sample buffers (Airspy or HackRF) = 2^(17+1) for 2 byte samples

m_config.m_inputSampleRate = 96000;
m_config.m_inputFrequencyOffset = 0;
Expand All @@ -69,7 +69,7 @@ DSDDemod::DSDDemod(SampleSink* sampleSink) :
DSDDemod::~DSDDemod()
{
DSPEngine::instance()->removeAudioSink(&m_audioFifo);
delete[] m_dsdInBuffer;
delete[] m_samplesBuffer;
}

void DSDDemod::configure(MessageQueue* messageQueue,
Expand All @@ -96,7 +96,7 @@ void DSDDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
Complex ci;

m_settingsMutex.lock();
m_dsdInCount = 0;
m_samplesBufferIndex = 0;
m_scopeSampleBuffer.clear();

for (SampleVector::const_iterator it = begin; it != end; ++it)
Expand Down Expand Up @@ -141,7 +141,7 @@ void DSDDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto

Sample s(sample, 0.0);
m_scopeSampleBuffer.push_back(s);
m_dsdInBuffer[m_dsdInCount++] = sample;
m_samplesBuffer[m_samplesBufferIndex++] = sample;

// if (m_running.m_audioMute)
// {
Expand Down Expand Up @@ -186,7 +186,7 @@ void DSDDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
// }

m_dsdDecoder.popAudioSamples(&m_audioFifo, m_running.m_audioMute);
m_dsdDecoder.pushSamples(m_dsdInBuffer, m_dsdInCount);
m_dsdDecoder.pushSamples(m_samplesBuffer, m_samplesBufferIndex);

if ((m_scope != 0) && (m_scopeEnabled))
{
Expand Down
4 changes: 2 additions & 2 deletions plugins/channel/demoddsd/dsddemod.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ class DSDDemod : public SampleSink {

Real m_fmExcursion;

qint16 *m_dsdInBuffer; //!< Input buffer for DSD decoder process
int m_dsdInCount;
qint16 *m_samplesBuffer; //!< Input buffer for DSD decoder process
int m_samplesBufferIndex;
SampleVector m_scopeSampleBuffer;
AudioVector m_audioBuffer;
uint m_audioBufferFill;
Expand Down

0 comments on commit 6a8d1e0

Please sign in to comment.