mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-27 22:14:26 -04:00
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:
@@ -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, ¶ms);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user