fix: use atomic operations for thread-safe clip state access
Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
4
engine.h
4
engine.h
@@ -32,9 +32,9 @@ typedef enum {
|
||||
|
||||
|
||||
typedef struct {
|
||||
ClipState state;
|
||||
atomic_int state; // ClipState (atomic for thread-safe access)
|
||||
float *buffer;
|
||||
size_t buffer_size;
|
||||
atomic_size_t buffer_size; // size_t (atomic for thread-safe access)
|
||||
size_t write_position;
|
||||
size_t read_position;
|
||||
bool is_playing;
|
||||
|
||||
Reference in New Issue
Block a user