sync
This commit is contained in:
@@ -7,6 +7,9 @@
|
||||
#include <cstdint>
|
||||
#include <chrono>
|
||||
|
||||
#include "ConfigService.hpp"
|
||||
#include "LoggerService.hpp"
|
||||
|
||||
enum NoteEventType {
|
||||
NoteOn = 0,
|
||||
NoteOff
|
||||
@@ -22,7 +25,8 @@ struct NoteEvent {
|
||||
class NoteQueue {
|
||||
|
||||
public:
|
||||
NoteQueue() = default;
|
||||
NoteQueue();
|
||||
NoteQueue(ConfigService* config, LoggerService* logger);
|
||||
~NoteQueue() = default;
|
||||
|
||||
bool push(const NoteEvent& event);
|
||||
@@ -30,7 +34,10 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
static constexpr size_t SYNTH_NOTE_QUEUE_SIZE = 128;
|
||||
ConfigService* config_;
|
||||
LoggerService* logger_;
|
||||
|
||||
static constexpr size_t SYNTH_NOTE_QUEUE_SIZE = 128; // TODO: config
|
||||
|
||||
std::array<NoteEvent, SYNTH_NOTE_QUEUE_SIZE> buffer_;
|
||||
std::atomic<size_t> head_{ 0 };
|
||||
|
||||
Reference in New Issue
Block a user