diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-10-09 17:59:41 +0200 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-10-09 17:59:41 +0200 |
| commit | bfc79cef2cb743fedba3e93fd005d25b0a4923dc (patch) | |
| tree | ba322aea6b9ce203b9daf9b4b7b9280455027454 /mutex.h | |
| parent | cf2cfcd8a96921dbe812647045dff71ab63989cd (diff) | |
| download | ttdaw-bfc79cef2cb743fedba3e93fd005d25b0a4923dc.tar.gz | |
Added mutex and proper audio playback
Diffstat (limited to 'mutex.h')
| -rw-r--r-- | mutex.h | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -0,0 +1,24 @@ +#ifndef MUTEX_H +#define MUTEX_H + +#include <pthread.h> + +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 + |
