Add SpMcRingBuffer to base class StimulusBuffer
This will hopefully genericise the interface for Stimbuffs.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
#include <config.h>
|
||||
#include <opts.h>
|
||||
#include <algorithm>
|
||||
#include <unistd.h>
|
||||
#include <user/spMcRingBuffer.h>
|
||||
#include <componentThread.h>
|
||||
#include "pcloudStimulusBuffer.h"
|
||||
|
||||
@@ -11,7 +14,12 @@ PcloudStimulusBuffer::PcloudStimulusBuffer(
|
||||
std::shared_ptr<livoxProto1::Device> &device,
|
||||
const PcloudFormatDesc& formatDesc,
|
||||
size_t nDgramsPerStagingBufferFrame)
|
||||
: StimulusBuffer(deviceAttachmentSpec, device->componentThread->getIoService()),
|
||||
: StimulusBuffer(
|
||||
deviceAttachmentSpec,
|
||||
static_cast<size_t>((1000 * 30) / CONFIG_STIMBUFF_FRAME_PERIOD_MS),
|
||||
SpMcRingBuffer::InputEngineConstraints(
|
||||
static_cast<size_t>(sysconf(_SC_PAGE_SIZE)), 4),
|
||||
device->componentThread->getIoService()),
|
||||
deviceAttachmentSpec(deviceAttachmentSpec), device(device),
|
||||
formatDesc(formatDesc), stagingBuffer(
|
||||
StagingBuffer::InputEngineConstraints::ioUringConstraints,
|
||||
|
||||
Reference in New Issue
Block a user