-
Notifications
You must be signed in to change notification settings - Fork 0
/
threads.h
57 lines (47 loc) · 996 Bytes
/
threads.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//
// Created by patryk on 19.08.16.
//
#ifndef VSAMIDISYNC_THREADS_H
#define VSAMIDISYNC_THREADS_H
#include <windows.h>
#include "AXCtrl.h"
typedef struct {
void *data;
volatile BOOL shouldRun;
volatile BOOL isRunning;
} thread_data;
typedef struct {
AX_object *ctrl;
HWND timeText, window;
volatile long frame;
volatile BOOL playing;
} time_thread_data;
typedef struct {
volatile long *frame;
volatile BOOL *playing;
HANDLE img_midi_off;
HANDLE img_midi_on;
HWND status;
UINT device;
} midi_thread_data;
typedef union {
DWORD word;
UCHAR data[4];
} MIDIMsg;
typedef struct {
AX_object *ctrl;
volatile long *frame;
volatile long start;
volatile long stop;
volatile BOOL loop;
volatile char idle;
volatile long idleStart;
volatile long idleStop;
INT *current_track;
INT *looping_one;
HWND list;
} loop_thread_data;
DWORD WINAPI TimeThread(LPVOID data);
DWORD WINAPI MidiThread(LPVOID data);
DWORD WINAPI LoopThread(LPVOID data);
#endif //VSAMIDISYNC_THREADS_H