livoxGen1: Add StimBuffs to PcloudStimProd
* PcloudStimulusProducer now has member sh_ptr<StimulusBuffer>s. * StimulusProducer now has a vector<sh_ptr<StimulusBuffer>s. Created new stimbuff-type-specific Pcloud[Xyz|I|Ambience]StimulusBuffer classes for representing each stim feature exposed by livoxGen1's PcloudStimulusProducer.
This commit is contained in:
@@ -9,10 +9,26 @@
|
||||
#include <componentThread.h>
|
||||
#include <spinLock.h>
|
||||
#include <user/stimulusProducer.h>
|
||||
#include <user/stimulusBuffer.h>
|
||||
|
||||
namespace smo {
|
||||
namespace stim_buff {
|
||||
|
||||
std::shared_ptr<StimulusBuffer> StimulusProducer::getAttachedStimulusBuffer(
|
||||
const std::shared_ptr<device::DeviceAttachmentSpec>& spec) const
|
||||
{
|
||||
for (const auto& buffer : attachedStimulusBuffers)
|
||||
{
|
||||
if (buffer && buffer->deviceAttachmentSpec &&
|
||||
*buffer->deviceAttachmentSpec == *spec)
|
||||
{
|
||||
return buffer;
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void StimulusProducer::stop()
|
||||
{
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user