From bfc79cef2cb743fedba3e93fd005d25b0a4923dc Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Wed, 9 Oct 2024 17:59:41 +0200 Subject: Added mutex and proper audio playback --- mutex.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 mutex.h (limited to 'mutex.h') diff --git a/mutex.h b/mutex.h new file mode 100644 index 0000000..2f3c653 --- /dev/null +++ b/mutex.h @@ -0,0 +1,24 @@ +#ifndef MUTEX_H +#define MUTEX_H + +#include + +typedef struct { + int note; + int state; + int velocity; + int preset; + int action; +} SharedData; + +extern SharedData shared_data; + +extern pthread_mutex_t mutex; +extern pthread_cond_t cond_midi; +extern pthread_cond_t cond_synth; + +void initialize_mutex(); +void destroy_mutex(); + +#endif // MUTEX_H + -- cgit v1.2.3