leaf.h
1 
15 /*
16  ==============================================================================
17 
18  leaf.h
19  Created: 20 Jan 2017 12:07:26pm
20  Author: Michael R Mulshine
21 
22  ==============================================================================
23  */
24 
25 #ifndef LEAF_H_INCLUDED
26 #define LEAF_H_INCLUDED
27 
28 #define LEAF_DEBUG 0
29 
30 #if LEAF_DEBUG
31 #include "../LEAF_JUCEPlugin/JuceLibraryCode/JuceHeader.h"
32 #endif
33 
34 #if _WIN32 || _WIN64
35 
36 #include ".\Inc\leaf-global.h"
37 #include ".\Inc\leaf-math.h"
38 #include ".\Inc\leaf-mempool.h"
39 #include ".\Inc\leaf-tables.h"
40 #include ".\Inc\leaf-distortion.h"
41 #include ".\Inc\leaf-oscillators.h"
42 #include ".\Inc\leaf-filters.h"
43 #include ".\Inc\leaf-delay.h"
44 #include ".\Inc\leaf-reverb.h"
45 #include ".\Inc\leaf-effects.h"
46 #include ".\Inc\leaf-envelopes.h"
47 #include ".\Inc\leaf-dynamics.h"
48 #include ".\Inc\leaf-analysis.h"
49 #include ".\Inc\leaf-instruments.h"
50 #include ".\Inc\leaf-midi.h"
51 #include ".\Inc\leaf-sampling.h"
52 #include ".\Inc\leaf-physical.h"
53 #include ".\Inc\leaf-electrical.h"
54 
55 #else
56 
57 #include "./Inc/leaf-global.h"
58 #include "./Inc/leaf-math.h"
59 #include "./Inc/leaf-mempool.h"
60 #include "./Inc/leaf-tables.h"
61 #include "./Inc/leaf-distortion.h"
62 #include "./Inc/leaf-dynamics.h"
63 #include "./Inc/leaf-oscillators.h"
64 #include "./Inc/leaf-filters.h"
65 #include "./Inc/leaf-delay.h"
66 #include "./Inc/leaf-reverb.h"
67 #include "./Inc/leaf-effects.h"
68 #include "./Inc/leaf-envelopes.h"
69 #include "./Inc/leaf-analysis.h"
70 #include "./Inc/leaf-instruments.h"
71 #include "./Inc/leaf-midi.h"
72 #include "./Inc/leaf-sampling.h"
73 #include "./Inc/leaf-physical.h"
74 #include "./Inc/leaf-electrical.h"
75 
76 #endif
77 
134 #ifdef __cplusplus
135 extern "C" {
136 #endif
137 
143 
151  void LEAF_init (LEAF* const leaf, float sampleRate, int blockSize, char* memory, size_t memorySize, float(*random)(void));
152 
154 
157  void LEAF_setSampleRate (LEAF* const leaf, float sampleRate);
158 
160 
163  float LEAF_getSampleRate (LEAF* const leaf);
164 
166 
169  void LEAF_defaultErrorCallback(LEAF* const leaf, LEAFErrorType errorType);
170 
171  void LEAF_internalErrorCallback(LEAF* const leaf, LEAFErrorType whichone);
172 
174 
177  void LEAF_setErrorCallback(LEAF* const leaf, void (*callback)(LEAF* const, LEAFErrorType));
178 
181 #ifdef __cplusplus
182 }
183 #endif
184 
185 #endif // LEAF_H_INCLUDED
186 
LEAF_defaultErrorCallback
void LEAF_defaultErrorCallback(LEAF *const leaf, LEAFErrorType errorType)
The default callback function for LEAF errors.
Definition: leaf.c:58
LEAF_setErrorCallback
void LEAF_setErrorCallback(LEAF *const leaf, void(*callback)(LEAF *const, LEAFErrorType))
Set the callback function for LEAF errors.
Definition: leaf.c:70
LEAF_getSampleRate
float LEAF_getSampleRate(LEAF *const leaf)
Get the sample rate of LEAF.
Definition: leaf.c:53
LEAF_init
void LEAF_init(LEAF *const leaf, float sampleRate, int blockSize, char *memory, size_t memorySize, float(*random)(void))
Initialize the LEAF instance.
Definition: leaf.c:21
LEAF_setSampleRate
void LEAF_setSampleRate(LEAF *const leaf, float sampleRate)
Set the sample rate of LEAF.
Definition: leaf.c:47
LEAF
Struct for an instance of LEAF.
Definition: leaf-global.h:31