mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-08-12 22:43:41 -04:00
Basic cleanup / mutex additions / bulk demod add
This commit is contained in:
@@ -33,6 +33,18 @@ void SDRPostThread::bindDemodulator(DemodulatorInstance *demod) {
|
||||
busy_demod.unlock();
|
||||
}
|
||||
|
||||
void SDRPostThread::bindDemodulators(std::vector<DemodulatorInstance *> *demods) {
|
||||
if (!demods) {
|
||||
return;
|
||||
}
|
||||
busy_demod.lock();
|
||||
for (std::vector<DemodulatorInstance *>::iterator di = demods->begin(); di != demods->end(); di++) {
|
||||
demodulators.push_back(*di);
|
||||
doRefresh.store(true);
|
||||
}
|
||||
busy_demod.unlock();
|
||||
}
|
||||
|
||||
void SDRPostThread::removeDemodulator(DemodulatorInstance *demod) {
|
||||
if (!demod) {
|
||||
return;
|
||||
|
||||
@@ -13,6 +13,7 @@ public:
|
||||
~SDRPostThread();
|
||||
|
||||
void bindDemodulator(DemodulatorInstance *demod);
|
||||
void bindDemodulators(std::vector<DemodulatorInstance *> *demods);
|
||||
void removeDemodulator(DemodulatorInstance *demod);
|
||||
|
||||
void run();
|
||||
|
||||
Reference in New Issue
Block a user