4f97d8437d5afcc80a0b902ed9b0bfa0a1383e94
[ardour.git] / libs / fluidsynth / fluidsynth / misc.h
1 /* FluidSynth - A Software Synthesizer
2  *
3  * Copyright (C) 2003  Peter Hanappe and others.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public License
7  * as published by the Free Software Foundation; either version 2 of
8  * the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Library General Public License for more details.
14  *  
15  * You should have received a copy of the GNU Library General Public
16  * License along with this library; if not, write to the Free
17  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18  * 02110-1301, USA
19  */
20
21 #ifndef _FLUIDSYNTH_MISC_H
22 #define _FLUIDSYNTH_MISC_H
23
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29
30 /**
31  * @file misc.h
32  * @brief Miscellaneous utility functions and defines
33  */
34
35 /**
36  * Value that indicates success, used by most libfluidsynth functions.
37  * @since 1.1.0
38  *
39  * NOTE: This was not publicly defined prior to libfluidsynth 1.1.0.  When
40  * writing code which should also be compatible with older versions, something
41  * like the following can be used:
42  *
43  * @code
44  *   #include <fluidsynth.h>
45  *
46  *   #ifndef FLUID_OK
47  *   #define FLUID_OK      (0)
48  *   #define FLUID_FAILED  (-1)
49  *   #endif
50  * @endcode
51  */
52 #define FLUID_OK        (0)
53
54 /**
55  * Value that indicates failure, used by most libfluidsynth functions.
56  * @since 1.1.0
57  *
58  * NOTE: See #FLUID_OK for more details.
59  */
60 #define FLUID_FAILED    (-1)
61
62
63 FLUIDSYNTH_API int fluid_is_soundfont (const char *filename);
64 FLUIDSYNTH_API int fluid_is_midifile (const char *filename);
65
66
67 #ifdef WIN32
68 FLUIDSYNTH_API void* fluid_get_hinstance(void);
69 FLUIDSYNTH_API void fluid_set_hinstance(void* hinstance);
70 #endif
71
72
73 #ifdef __cplusplus
74 }
75 #endif
76
77 #endif /* _FLUIDSYNTH_MISC_H */