-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathlibunsf.h
75 lines (68 loc) · 2.21 KB
/
libunsf.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#ifndef UNSF_LIBUNSF_H
#define UNSF_LIBUNSF_H
#include <stdlib.h>
/* set our symbol export visiblity */
#if defined _WIN32 || defined __CYGWIN__
/* ========== NOTE TO WINDOWS DEVELOPERS:
* If you are compiling for Windows and will link to the static library
* (libunsf.a with MinGW, or unsf_static.lib with MSVC, etc),
* you must define UNSF_STATIC in your project. Otherwise dllimport
* will be assumed. */
# if defined(UNSF_BUILD) && defined(DLL_EXPORT) /* building library as a dll for windows */
# define UNSF_SYMBOL __declspec(dllexport)
# elif defined(UNSF_BUILD) || defined(UNSF_STATIC) /* building or using static lib for windows */
# define UNSF_SYMBOL
# else /* using library dll for windows */
# define UNSF_SYMBOL __declspec(dllimport)
# endif
#elif defined(UNSF_BUILD)
# if defined(SYM_VISIBILITY) /* __GNUC__ >= 4, or older gcc with backported feature */
# define UNSF_SYMBOL __attribute__ ((visibility ("default")))
/*
# elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
# define DD_SYMBOL __attribute__ ((visibility ("default")))
*/
# elif defined(SYM_LDSCOPE) /* __SUNPRO_C >= 0x550 */
# define UNSF_SYMBOL __global
# elif defined(__OS2__) && defined(__WATCOMC__) && defined(__SW_BD)
# define UNSF_SYMBOL __declspec(dllexport)
# else
# define UNSF_SYMBOL
# endif
#else
# define UNSF_SYMBOL
#endif
#if defined(__cplusplus)
extern "C" {
#endif
typedef struct UnSF_Options
{
int opt_8bit;
int opt_verbose;
int opt_veryverbose;
int opt_bank;
int opt_drum_bank;
int opt_header;
int opt_left_channel;
int opt_right_channel;
char *opt_soundfont;
int opt_small;
int opt_drum;
int opt_mono;
int opt_no_write;
int opt_adjust_sample_flags;
int opt_adjust_volume;
char *basename;
char *output_directory;
FILE *cfg_fd;
/* manually set the velocity of either a instrument or drum since most
applications do not know about the extended patch format. */
signed char melody_velocity_override[128][128];
signed char drum_velocity_override[128][128];
} UnSF_Options;
UNSF_SYMBOL UnSF_Options unsf_initialization(void);
UNSF_SYMBOL void unsf_convert_sf_to_gus(UnSF_Options *options);
#if defined(__cplusplus)
}
#endif
#endif /* UNSF_LIBUNSF_H */