mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-01 21:54:55 -04:00
SoapySDR support: input: settings and thread output: settings
This commit is contained in:
@@ -23,10 +23,12 @@
|
||||
#include "dsp/dspengine.h"
|
||||
#include "soapysdr/devicesoapysdr.h"
|
||||
|
||||
#include "soapysdrinputthread.h"
|
||||
#include "soapysdrinput.h"
|
||||
|
||||
SoapySDRInput::SoapySDRInput(DeviceSourceAPI *deviceAPI) :
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_thread(0),
|
||||
m_deviceDescription("SoapySDRInput"),
|
||||
m_running(false)
|
||||
{
|
||||
@@ -131,9 +133,9 @@ void SoapySDRInput::closeDevice()
|
||||
stop();
|
||||
}
|
||||
|
||||
// if (m_thread) { // stills own the thread => transfer to a buddy
|
||||
// moveThreadToBuddy();
|
||||
// }
|
||||
if (m_thread) { // stills own the thread => transfer to a buddy
|
||||
moveThreadToBuddy();
|
||||
}
|
||||
|
||||
m_deviceShared.m_channel = -1; // publicly release channel
|
||||
m_deviceShared.m_source = 0;
|
||||
@@ -152,6 +154,23 @@ void SoapySDRInput::init()
|
||||
{
|
||||
}
|
||||
|
||||
void SoapySDRInput::moveThreadToBuddy()
|
||||
{
|
||||
const std::vector<DeviceSourceAPI*>& sourceBuddies = m_deviceAPI->getSourceBuddies();
|
||||
std::vector<DeviceSourceAPI*>::const_iterator it = sourceBuddies.begin();
|
||||
|
||||
for (; it != sourceBuddies.end(); ++it)
|
||||
{
|
||||
SoapySDRInput *buddySource = ((DeviceSoapySDRShared*) (*it)->getBuddySharedPtr())->m_source;
|
||||
|
||||
if (buddySource)
|
||||
{
|
||||
buddySource->setThread(m_thread);
|
||||
m_thread = 0; // zero for others
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool SoapySDRInput::start()
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user