sync
This commit is contained in:
@@ -8,6 +8,9 @@
|
||||
#include <vector>
|
||||
#include <atomic>
|
||||
|
||||
#include "ConfigService.hpp"
|
||||
#include "LoggerService.hpp"
|
||||
|
||||
class ScopeBuffer : public QObject {
|
||||
|
||||
Q_OBJECT // needed to attach to a qml component
|
||||
@@ -15,7 +18,7 @@ class ScopeBuffer : public QObject {
|
||||
public:
|
||||
|
||||
explicit ScopeBuffer(QObject* parent = nullptr);
|
||||
ScopeBuffer(size_t size);
|
||||
ScopeBuffer(ConfigService* config, LoggerService* logger, size_t size);
|
||||
~ScopeBuffer() = default;
|
||||
|
||||
void push(float sample);
|
||||
@@ -31,6 +34,9 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
ConfigService* config_;
|
||||
LoggerService* logger_;
|
||||
|
||||
std::vector<float> buffer_;
|
||||
std::atomic<size_t> writeIndex_{0};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user