Drag up/down to set arbitrary FM demod bandwidth

Shouldn't need separate WBFM/FM/NFM setting this way -- Just "FM" and
then set arbitrary bandwidth by dragging.

Also removed redundant demod resampling stages left over from early
experiments.
This commit is contained in:
Charles J. Cliffe
2014-11-26 21:05:19 -05:00
parent f441546023
commit ddbc08a4ff
13 changed files with 256 additions and 87 deletions
+25 -5
View File
@@ -2,6 +2,12 @@
DemodulatorInstance::DemodulatorInstance() :
t_Demod(NULL), threadQueueDemod(NULL), demodulatorThread(NULL) {
threadQueueDemod = new DemodulatorThreadInputQueue;
threadQueueCommand = new DemodulatorThreadCommandQueue;
demodulatorThread = new DemodulatorThread(threadQueueDemod);
demodulatorThread->setCommandQueue(threadQueueCommand);
}
DemodulatorInstance::~DemodulatorInstance() {
@@ -14,20 +20,30 @@ void DemodulatorInstance::setVisualOutputQueue(DemodulatorThreadOutputQueue *tQu
demodulatorThread->setVisualOutputQueue(tQueue);
}
void DemodulatorInstance::init() {
if (demodulatorThread) {
void DemodulatorInstance::run() {
if (t_Demod) {
terminate();
delete threadQueueDemod;
delete demodulatorThread;
delete t_Demod;
threadQueueDemod = new DemodulatorThreadInputQueue;
threadQueueCommand = new DemodulatorThreadCommandQueue;
demodulatorThread = new DemodulatorThread(threadQueueDemod);
demodulatorThread->setCommandQueue(threadQueueCommand);
}
threadQueueDemod = new DemodulatorThreadInputQueue;
demodulatorThread = new DemodulatorThread(threadQueueDemod, &params);
t_Demod = new std::thread(&DemodulatorThread::threadMain, demodulatorThread);
}
DemodulatorThreadCommandQueue *DemodulatorInstance::getCommandQueue() {
return threadQueueCommand;
}
DemodulatorThreadParameters &DemodulatorInstance::getParams() {
return demodulatorThread->getParams();
}
void DemodulatorInstance::terminate() {
demodulatorThread->terminate();
t_Demod->join();
@@ -55,3 +71,7 @@ void DemodulatorMgr::terminateAll() {
delete d;
}
}
std::vector<DemodulatorInstance *> &DemodulatorMgr::getDemodulators() {
return demods;
}