diff --git a/sdrbase/device/devicesourceapi.cpp b/sdrbase/device/devicesourceapi.cpp index 7f1b004a2..24d90886e 100644 --- a/sdrbase/device/devicesourceapi.cpp +++ b/sdrbase/device/devicesourceapi.cpp @@ -70,6 +70,11 @@ void DeviceSourceAPI::setSource(DeviceSampleSource* source) m_deviceSourceEngine->setSource(source); } +DeviceSampleSource *DeviceSourceAPI::getSource() +{ + return m_deviceSourceEngine->getSource(); +} + bool DeviceSourceAPI::initAcquisition() { return m_deviceSourceEngine->initAcquisition(); diff --git a/sdrbase/device/devicesourceapi.h b/sdrbase/device/devicesourceapi.h index 5fc74e161..ee03e17b9 100644 --- a/sdrbase/device/devicesourceapi.h +++ b/sdrbase/device/devicesourceapi.h @@ -48,7 +48,8 @@ public: void removeSink(BasebandSampleSink* sink); //!< Remove a sample sink from device engine void addThreadedSink(ThreadedBasebandSampleSink* sink); //!< Add a sample sink that will run on its own thread to device engine void removeThreadedSink(ThreadedBasebandSampleSink* sink); //!< Remove a sample sink that runs on its own thread from device engine - void setSource(DeviceSampleSource* source); //!< Set device engine sample source type + void setSource(DeviceSampleSource* source); //!< Set device sample source + DeviceSampleSource *getSource(); //!< Return pointer to the device sample source bool initAcquisition(); //!< Initialize device engine acquisition sequence bool startAcquisition(); //!< Start device engine acquisition sequence void stopAcquisition(); //!< Stop device engine acquisition sequence diff --git a/sdrbase/dsp/dspdevicesourceengine.h b/sdrbase/dsp/dspdevicesourceengine.h index a2df6d9b8..ad55d11fe 100644 --- a/sdrbase/dsp/dspdevicesourceengine.h +++ b/sdrbase/dsp/dspdevicesourceengine.h @@ -61,6 +61,7 @@ public: void setSource(DeviceSampleSource* source); //!< Set the sample source type void setSourceSequence(int sequence); //!< Set the sample source sequence in type + DeviceSampleSource *getSource() { return m_deviceSampleSource; } void addSink(BasebandSampleSink* sink); //!< Add a sample sink void removeSink(BasebandSampleSink* sink); //!< Remove a sample sink