1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -04:00

Multiple modulators support: works with two modulators

This commit is contained in:
f4exb
2016-12-26 12:11:51 +01:00
parent 2a8a3bf457
commit 5598265e66
7 changed files with 103 additions and 9 deletions
+13 -1
View File
@@ -22,6 +22,7 @@ BasebandSampleSource::BasebandSampleSource() :
m_sampleFifo(48000) // arbitrary, will be adjusted to match device sink FIFO size
{
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));
connect(&m_sampleFifo, SIGNAL(dataWrite(int)), this, SLOT(handleWriteToFifo(int)));
}
BasebandSampleSource::~BasebandSampleSource()
@@ -41,6 +42,17 @@ void BasebandSampleSource::handleInputMessages()
}
}
void BasebandSampleSource::handleWriteToFifo(int nbSamples)
{
SampleVector::iterator writeAt;
m_sampleFifo.getWriteIterator(writeAt);
pullAudio(nbSamples); // Pre-fetch input audio samples this is mandatory to keep things running smoothly
for (int i = 0; i < nbSamples; i++)
{
pull((*writeAt));
m_sampleFifo.bumpIndex(writeAt);
}
}