mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-27 02:09:14 -05:00
DSD demod plugin: DSD proper integration interim state #3
This commit is contained in:
parent
497ce458dc
commit
6a8d1e066e
@ -43,7 +43,7 @@ DSDDemod::DSDDemod(SampleSink* sampleSink) :
|
|||||||
{
|
{
|
||||||
setObjectName("DSDDemod");
|
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_inputSampleRate = 96000;
|
||||||
m_config.m_inputFrequencyOffset = 0;
|
m_config.m_inputFrequencyOffset = 0;
|
||||||
@ -69,7 +69,7 @@ DSDDemod::DSDDemod(SampleSink* sampleSink) :
|
|||||||
DSDDemod::~DSDDemod()
|
DSDDemod::~DSDDemod()
|
||||||
{
|
{
|
||||||
DSPEngine::instance()->removeAudioSink(&m_audioFifo);
|
DSPEngine::instance()->removeAudioSink(&m_audioFifo);
|
||||||
delete[] m_dsdInBuffer;
|
delete[] m_samplesBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DSDDemod::configure(MessageQueue* messageQueue,
|
void DSDDemod::configure(MessageQueue* messageQueue,
|
||||||
@ -96,7 +96,7 @@ void DSDDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
|
|||||||
Complex ci;
|
Complex ci;
|
||||||
|
|
||||||
m_settingsMutex.lock();
|
m_settingsMutex.lock();
|
||||||
m_dsdInCount = 0;
|
m_samplesBufferIndex = 0;
|
||||||
m_scopeSampleBuffer.clear();
|
m_scopeSampleBuffer.clear();
|
||||||
|
|
||||||
for (SampleVector::const_iterator it = begin; it != end; ++it)
|
for (SampleVector::const_iterator it = begin; it != end; ++it)
|
||||||
@ -141,7 +141,7 @@ void DSDDemod::feed(const SampleVector::const_iterator& begin, const SampleVecto
|
|||||||
|
|
||||||
Sample s(sample, 0.0);
|
Sample s(sample, 0.0);
|
||||||
m_scopeSampleBuffer.push_back(s);
|
m_scopeSampleBuffer.push_back(s);
|
||||||
m_dsdInBuffer[m_dsdInCount++] = sample;
|
m_samplesBuffer[m_samplesBufferIndex++] = sample;
|
||||||
|
|
||||||
// if (m_running.m_audioMute)
|
// if (m_running.m_audioMute)
|
||||||
// {
|
// {
|
||||||
@ -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.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))
|
if ((m_scope != 0) && (m_scopeEnabled))
|
||||||
{
|
{
|
||||||
|
@ -169,8 +169,8 @@ private:
|
|||||||
|
|
||||||
Real m_fmExcursion;
|
Real m_fmExcursion;
|
||||||
|
|
||||||
qint16 *m_dsdInBuffer; //!< Input buffer for DSD decoder process
|
qint16 *m_samplesBuffer; //!< Input buffer for DSD decoder process
|
||||||
int m_dsdInCount;
|
int m_samplesBufferIndex;
|
||||||
SampleVector m_scopeSampleBuffer;
|
SampleVector m_scopeSampleBuffer;
|
||||||
AudioVector m_audioBuffer;
|
AudioVector m_audioBuffer;
|
||||||
uint m_audioBufferFill;
|
uint m_audioBufferFill;
|
||||||
|
Loading…
Reference in New Issue
Block a user