mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-04-22 03:19:25 -04:00
LimeSDR output: handle cross allocation from Rx properly
This commit is contained in:
parent
7ad6533b1f
commit
2369cb62af
@ -131,6 +131,16 @@ bool LimeSDROutput::openDevice()
|
||||
qDebug("LimeSDROutput::openDevice: getting device parameters from Rx buddy");
|
||||
}
|
||||
|
||||
for (int i = 0; i < m_deviceAPI->getSourceBuddies().size(); i++)
|
||||
{
|
||||
DeviceSourceAPI *buddy = m_deviceAPI->getSourceBuddies()[i];
|
||||
DeviceLimeSDRShared *buddyShared = (DeviceLimeSDRShared *) buddy->getBuddySharedPtr();
|
||||
|
||||
if (buddyShared->m_thread) { // suspend Rx buddy's thread for proper stream allocation later
|
||||
buddyShared->m_thread->stopWork();
|
||||
}
|
||||
}
|
||||
|
||||
m_deviceShared.m_channel = 0; // take first channel
|
||||
}
|
||||
// There are no buddies then create the first LimeSDR common parameters
|
||||
@ -191,6 +201,18 @@ bool LimeSDROutput::openDevice()
|
||||
}
|
||||
}
|
||||
|
||||
// resume Rx buddy's threads
|
||||
|
||||
for (int i = 0; i < m_deviceAPI->getSourceBuddies().size(); i++)
|
||||
{
|
||||
DeviceSourceAPI *buddy = m_deviceAPI->getSourceBuddies()[i];
|
||||
DeviceLimeSDRShared *buddyShared = (DeviceLimeSDRShared *) buddy->getBuddySharedPtr();
|
||||
|
||||
if (buddyShared->m_thread) { // suspend Rx buddy's thread for proper stream allocation later
|
||||
buddyShared->m_thread->startWork();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user