2003-03-11 16:56:45 +00:00
|
|
|
/* FluidSynth - A Software Synthesizer
|
|
|
|
*
|
|
|
|
* Copyright (C) 2003 Peter Hanappe and others.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
2017-07-12 15:45:23 +00:00
|
|
|
* modify it under the terms of the GNU Lesser General Public License
|
2017-07-12 15:53:03 +00:00
|
|
|
* as published by the Free Software Foundation; either version 2.1 of
|
2003-03-11 16:56:45 +00:00
|
|
|
* the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2017-07-12 15:45:23 +00:00
|
|
|
* Lesser General Public License for more details.
|
2009-05-01 17:26:42 +00:00
|
|
|
*
|
2017-07-12 15:54:54 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2003-03-11 16:56:45 +00:00
|
|
|
* License along with this library; if not, write to the Free
|
2011-08-15 12:57:10 +00:00
|
|
|
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
|
|
* 02110-1301, USA
|
2003-03-11 16:56:45 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _FLUIDSYNTH_H
|
|
|
|
#define _FLUIDSYNTH_H
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(WIN32)
|
|
|
|
#if defined(FLUIDSYNTH_DLL_EXPORTS)
|
|
|
|
#define FLUIDSYNTH_API __declspec(dllexport)
|
|
|
|
#elif defined(FLUIDSYNTH_NOT_A_DLL)
|
2009-05-01 17:26:42 +00:00
|
|
|
#define FLUIDSYNTH_API
|
2003-03-11 16:56:45 +00:00
|
|
|
#else
|
|
|
|
#define FLUIDSYNTH_API __declspec(dllimport)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#elif defined(MACOS9)
|
|
|
|
#define FLUIDSYNTH_API __declspec(export)
|
|
|
|
|
GCC: Stop exporting symbols which should not be exported
Previously, functions that were just used internally in FluidSynth
were still visible to users of the library. No application should
ever use them anyway, as they were only visible at the ABI level,
and not listed in the public API headers.
The big question here is whether this requires a major library bump. I've been
trying to inform myself by looking around the Internet but I haven't come to a
conclusion. E g, the libtool manual just says "interfaces" without specifying
whether they mean API or ABI.
From a pragmatic standpoint, I'm leaning towards *not* bumping the major
library version, because doing so is a major pain for Linux distributions:
they will have to make one "libfluidsynth1" and one "libfluidsynth2"
package, and in turn update everything using that library to depend on
libfluidsynth2 instead of libfluidsynth1.
Sure, there is a risk that some software out there is using one of these hidden
symbols. But I'd say that risk is quite low. And if they are, they're broken
anyway.
In short, I prefer being nice to our downstreams, over being nice to terribly
broken hacky applications that probably don't even exist.
Signed-off-by: David Henningsson <diwic@ubuntu.com>
2014-03-22 17:10:22 +00:00
|
|
|
#elif defined(__GNUC__)
|
|
|
|
#define FLUIDSYNTH_API __attribute__ ((visibility ("default")))
|
2003-03-11 16:56:45 +00:00
|
|
|
#else
|
|
|
|
#define FLUIDSYNTH_API
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2017-10-19 20:41:13 +00:00
|
|
|
#if defined(__GNUC__) || defined(__clang__)
|
|
|
|
# define FLUID_DEPRECATED __attribute__((deprecated))
|
2017-10-24 18:31:56 +00:00
|
|
|
#elif defined(_MSC_VER) && _MSC_VER > 1200
|
2017-10-19 20:41:13 +00:00
|
|
|
# define FLUID_DEPRECATED __declspec(deprecated)
|
|
|
|
#else
|
|
|
|
# define FLUID_DEPRECATED
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2006-12-10 16:02:04 +00:00
|
|
|
/**
|
|
|
|
* @file fluidsynth.h
|
|
|
|
* @brief FluidSynth is a real-time synthesizer designed for SoundFont(R) files.
|
|
|
|
*
|
|
|
|
* This is the header of the fluidsynth library and contains the
|
|
|
|
* synthesizer's public API.
|
|
|
|
*
|
|
|
|
* Depending on how you want to use or extend the synthesizer you
|
|
|
|
* will need different API functions. You probably do not need all
|
|
|
|
* of them. Here is what you might want to do:
|
|
|
|
*
|
2009-05-01 17:26:42 +00:00
|
|
|
* - Embedded synthesizer: create a new synthesizer and send MIDI
|
2006-12-10 16:02:04 +00:00
|
|
|
* events to it. The sound goes directly to the audio output of
|
|
|
|
* your system.
|
|
|
|
*
|
2009-05-01 17:26:42 +00:00
|
|
|
* - Plugin synthesizer: create a synthesizer and send MIDI events
|
2006-12-10 16:02:04 +00:00
|
|
|
* but pull the audio back into your application.
|
|
|
|
*
|
2009-05-01 17:26:42 +00:00
|
|
|
* - SoundFont plugin: create a new type of "SoundFont" and allow
|
2006-12-10 16:02:04 +00:00
|
|
|
* the synthesizer to load your type of SoundFonts.
|
|
|
|
*
|
2009-05-01 17:26:42 +00:00
|
|
|
* - MIDI input: Create a MIDI handler to read the MIDI input on your
|
2006-12-10 16:02:04 +00:00
|
|
|
* machine and send the MIDI events directly to the synthesizer.
|
|
|
|
*
|
2009-05-01 17:26:42 +00:00
|
|
|
* - MIDI files: Open MIDI files and send the MIDI events to the
|
2006-12-10 16:02:04 +00:00
|
|
|
* synthesizer.
|
|
|
|
*
|
2009-05-01 17:26:42 +00:00
|
|
|
* - Command lines: You can send textual commands to the synthesizer.
|
2006-12-10 16:02:04 +00:00
|
|
|
*
|
|
|
|
* SoundFont(R) is a registered trademark of E-mu Systems, Inc.
|
|
|
|
*/
|
2003-03-11 16:56:45 +00:00
|
|
|
|
|
|
|
#include "fluidsynth/types.h"
|
|
|
|
#include "fluidsynth/settings.h"
|
|
|
|
#include "fluidsynth/synth.h"
|
|
|
|
#include "fluidsynth/shell.h"
|
|
|
|
#include "fluidsynth/sfont.h"
|
|
|
|
#include "fluidsynth/ramsfont.h"
|
|
|
|
#include "fluidsynth/audio.h"
|
|
|
|
#include "fluidsynth/event.h"
|
|
|
|
#include "fluidsynth/midi.h"
|
|
|
|
#include "fluidsynth/seq.h"
|
|
|
|
#include "fluidsynth/seqbind.h"
|
|
|
|
#include "fluidsynth/log.h"
|
|
|
|
#include "fluidsynth/misc.h"
|
|
|
|
#include "fluidsynth/mod.h"
|
|
|
|
#include "fluidsynth/gen.h"
|
|
|
|
#include "fluidsynth/voice.h"
|
|
|
|
#include "fluidsynth/version.h"
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _FLUIDSYNTH_H */
|