feat: add command queue and FIFO pipe for unified input handling
Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
This commit is contained in:
19
src/command.h
Normal file
19
src/command.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef COMMAND_H
|
||||
#define COMMAND_H
|
||||
|
||||
typedef enum {
|
||||
CMD_CYCLE, // toggle record/stop for a channel
|
||||
CMD_STOP, // force to idle
|
||||
// CMD_LOOP_TOGGLE not needed, CYCLE covers it
|
||||
CMD_BIND_CHANNEL, // bind a channel index (data = channel)
|
||||
CMD_UNBIND, // reset bind to channel 0
|
||||
// ADD and REMOVE are still driven via atomics for now
|
||||
} cmd_type_t;
|
||||
|
||||
typedef struct {
|
||||
cmd_type_t type;
|
||||
int channel; // which channel; -1 means "current/bound"
|
||||
int data; // extra parameter (e.g. bind channel number)
|
||||
} command_t;
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user