diff --git a/Desktop_Interface/isobuffer.cpp b/Desktop_Interface/isobuffer.cpp index 2f769772..992554d1 100644 --- a/Desktop_Interface/isobuffer.cpp +++ b/Desktop_Interface/isobuffer.cpp @@ -29,15 +29,15 @@ constexpr double kTriggerSensitivityMultiplier = 4; isoBuffer::isoBuffer(QWidget* parent, int bufferLen, isoDriver* caller, unsigned char channel_value) : QWidget(parent) , m_channel(channel_value) - , m_buffer(std::make_unique(bufferLen*2)) + , m_bufferPtr(std::make_unique(bufferLen*2)) , m_bufferLen(bufferLen) , m_samplesPerSecond(bufferLen/21.0/375*VALID_DATA_PER_375) , m_sampleRate_bit(bufferLen/21.0/375*VALID_DATA_PER_375*8) , m_virtualParent(caller) { + m_buffer = m_bufferPtr.get(); } - void isoBuffer::insertIntoBuffer(short item) { m_buffer[m_back] = item; diff --git a/Desktop_Interface/isobuffer.h b/Desktop_Interface/isobuffer.h index d7744a0c..8811c04f 100644 --- a/Desktop_Interface/isobuffer.h +++ b/Desktop_Interface/isobuffer.h @@ -98,7 +98,8 @@ public: bool m_serialAutoScroll = true; // Internal Storage - std::unique_ptr m_buffer; + std::unique_ptr m_bufferPtr; + short* m_buffer; uint32_t m_back = 0; uint32_t m_insertedCount = 0; uint32_t m_bufferLen;