This commit is contained in:
2026-06-14 15:34:51 -05:00
parent cfc8cb2b51
commit f4d855b36b
10 changed files with 58 additions and 26 deletions

View File

@@ -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};