ape
0.5.0
Audio Programming Environment
shared-src
ape
APE.h
Go to the documentation of this file.
1
/*************************************************************************************
2
3
Audio Programming Environment - Audio Plugin - v. 0.4.0.
4
5
Copyright (C) 2017 Janus Lynggaard Thorborg [LightBridge Studios]
6
7
This program is free software: you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation, either version 3 of the License, or
10
(at your option) any later version.
11
12
This program is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
16
17
You should have received a copy of the GNU General Public License
18
along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20
See \licenses\ for additional details on licenses associated with this program.
21
22
**************************************************************************************
23
24
file:Ape.h
25
26
Common basic definitions for use in other ape headers.
27
28
*************************************************************************************/
29
30
#ifndef APE_APE_H
31
#define APE_APE_H
32
33
#include <stddef.h>
34
35
#ifndef APE_MACROCONSTANTS_H
36
#ifdef _WIN32
37
#define __WINDOWS__
38
#define EXPORTED __declspec(dllexport)
39
#elif (__MACH__) && (__APPLE__)
40
#define EXPORTED __attribute__ ((visibility ("default")))
41
#define __MAC__
42
#endif
43
#ifdef _MSC_VER
44
#define APE_STD_API _cdecl
45
#define APE_API APE_STD_API
46
#define APE_API_VARI _cdecl
47
#else
48
#define APE_STD_API __cdecl
49
#define APE_API APE_STD_API
50
#define APE_API_VARI APE_STD_API
51
#endif
52
#endif
53
57
typedef
double
PFloat
;
58
59
typedef
PFloat
(
APE_API
*
APE_Transformer
)(
PFloat
x,
PFloat
_min,
PFloat
_max);
60
typedef
PFloat
(
APE_API
*
APE_Normalizer
)(
PFloat
y,
PFloat
_min,
PFloat
_max);
61
62
struct
APE_Project
;
63
64
// Status definitions for operation and states.
65
typedef
enum
66
{
67
STATUS_OK
= 0,
// operation completed succesfully
68
STATUS_ERROR
= 1,
// operation failed, state errornous
69
STATUS_WAIT
= 2,
// operation not completed yet
70
STATUS_SILENT
= 3,
// the plugin should not process data
71
STATUS_READY
= 4,
// ready for any operation
72
STATUS_DISABLED
= 5,
// plugin is disabled
73
STATUS_HANDLED
= 6,
// plugin handled request, host shouldn't do anything.
74
STATUS_NOT_IMPLEMENTED
= 7
// operation not supported
75
}
APE_Status
;
76
77
typedef
enum
78
{
79
APE_Diag_Info
,
80
APE_Diag_Warning
,
81
APE_Diag_Error
,
82
APE_Diag_CompilationError
83
}
APE_Diagnostic
;
84
85
typedef
enum
86
{
87
APE_SampleRate_Adopt
= -1,
88
APE_SampleRate_Retain
= 0
89
}
APE_SampleRateOptions
;
90
91
typedef
void (
APE_API
*
APE_ErrorFunc
)(
APE_Project
*,
APE_Diagnostic
,
const
char
*);
92
93
#if defined(__cplusplus) && !defined(__cfront)
94
namespace
ape
95
{
96
using
Status =
APE_Status
;
97
using
ErrorFunc =
APE_ErrorFunc
;
98
using
Transformer =
APE_Transformer
;
99
using
Normalizer =
APE_Normalizer
;
100
using
Diagnostic =
APE_Diagnostic
;
101
};
102
#endif
103
#endif
APE_Project
Definition:
Project.h:36
APE_SampleRate_Adopt
Definition:
APE.h:86
STATUS_READY
Definition:
APE.h:70
STATUS_OK
Definition:
APE.h:66
APE_Normalizer
PFloat(APE_API * APE_Normalizer)(PFloat y, PFloat _min, PFloat _max)
Definition:
APE.h:59
APE_Diag_Info
Definition:
APE.h:78
APE_Diag_CompilationError
Definition:
APE.h:81
APE_SampleRate_Retain
Definition:
APE.h:87
STATUS_HANDLED
Definition:
APE.h:72
STATUS_DISABLED
Definition:
APE.h:71
APE_Diag_Error
Definition:
APE.h:80
PFloat
double PFloat
Floating-precision point type used for parameter processing
Definition:
APE.h:56
APE_Diagnostic
APE_Diagnostic
Definition:
APE.h:76
APE_SampleRateOptions
APE_SampleRateOptions
Definition:
APE.h:84
ape
Definition:
audiofile.h:7
STATUS_SILENT
Definition:
APE.h:69
APE_Transformer
PFloat(APE_API * APE_Transformer)(PFloat x, PFloat _min, PFloat _max)
Definition:
APE.h:58
STATUS_ERROR
Definition:
APE.h:67
APE_Diag_Warning
Definition:
APE.h:79
APE_Status
APE_Status
Definition:
APE.h:64
STATUS_WAIT
Definition:
APE.h:68
STATUS_NOT_IMPLEMENTED
Definition:
APE.h:73
APE_API
#define APE_API
Definition:
APE.h:48
APE_ErrorFunc
void(APE_API * APE_ErrorFunc)(APE_Project *, APE_Diagnostic, const char *)
Definition:
APE.h:90
Generated by
1.8.16