diff --git a/fluidsynth/include/fluidsynth.h b/fluidsynth/include/fluidsynth.h index 36de3a37..4e307098 100644 --- a/fluidsynth/include/fluidsynth.h +++ b/fluidsynth/include/fluidsynth.h @@ -3,16 +3,16 @@ * Copyright (C) 2003 Peter Hanappe and others. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of * 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 - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA @@ -27,20 +27,36 @@ extern "C" { #endif -#if defined(WIN32) -#if defined(FLUIDSYNTH_DLL_EXPORTS) -#define FLUIDSYNTH_API __declspec(dllexport) -#elif defined(FLUIDSYNTH_NOT_A_DLL) -#define FLUIDSYNTH_API -#else -#define FLUIDSYNTH_API __declspec(dllimport) -#endif +#define BUILD_SHARED_LIBS 0 + +#if (BUILD_SHARED_LIBS == 0) + #define FLUIDSYNTH_API // building static lib? no visibility control then +#elif defined(WIN32) + #if defined(FLUIDSYNTH_NOT_A_DLL) + #define FLUIDSYNTH_API + #elif defined(FLUIDSYNTH_DLL_EXPORTS) + #define FLUIDSYNTH_API __declspec(dllexport) + #else + #define FLUIDSYNTH_API __declspec(dllimport) + #endif #elif defined(MACOS9) #define FLUIDSYNTH_API __declspec(export) +#elif defined(__GNUC__) +#define FLUIDSYNTH_API __attribute__ ((visibility ("default"))) + #else #define FLUIDSYNTH_API + +#endif + +#if defined(__GNUC__) || defined(__clang__) +# define FLUID_DEPRECATED __attribute__((deprecated)) +#elif defined(_MSC_VER) && _MSC_VER > 1200 +# define FLUID_DEPRECATED __declspec(deprecated) +#else +# define FLUID_DEPRECATED #endif diff --git a/fluidsynth/include/fluidsynth/audio.h b/fluidsynth/include/fluidsynth/audio.h index 014daf43..795a0003 100644 --- a/fluidsynth/include/fluidsynth/audio.h +++ b/fluidsynth/include/fluidsynth/audio.h @@ -3,16 +3,16 @@ * Copyright (C) 2003 Peter Hanappe and others. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of * 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 - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA @@ -67,6 +67,9 @@ FLUIDSYNTH_API void delete_fluid_audio_driver(fluid_audio_driver_t* driver); FLUIDSYNTH_API fluid_file_renderer_t *new_fluid_file_renderer(fluid_synth_t* synth); FLUIDSYNTH_API int fluid_file_renderer_process_block(fluid_file_renderer_t* dev); FLUIDSYNTH_API void delete_fluid_file_renderer(fluid_file_renderer_t* dev); +FLUIDSYNTH_API int fluid_file_set_encoding_quality(fluid_file_renderer_t* dev, double q); + +FLUIDSYNTH_API int fluid_audio_driver_register(const char** adrivers); #ifdef __cplusplus } diff --git a/fluidsynth/include/fluidsynth/event.h b/fluidsynth/include/fluidsynth/event.h index b1543045..1676163f 100644 --- a/fluidsynth/include/fluidsynth/event.h +++ b/fluidsynth/include/fluidsynth/event.h @@ -3,16 +3,16 @@ * Copyright (C) 2003 Peter Hanappe and others. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of * 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 - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA @@ -53,12 +53,12 @@ enum fluid_seq_event_type { FLUID_SEQ_VOLUME, /**< Volume set event */ FLUID_SEQ_REVERBSEND, /**< Reverb send set event */ FLUID_SEQ_CHORUSSEND, /**< Chorus send set event */ - FLUID_SEQ_TIMER, /**< Timer event (DOCME) */ - FLUID_SEQ_ANYCONTROLCHANGE, /**< DOCME (used for remove_events only) */ + FLUID_SEQ_TIMER, /**< Timer event (useful for giving a callback at a certain time) */ + FLUID_SEQ_ANYCONTROLCHANGE, /**< Any control change message (only internally used for remove_events) */ FLUID_SEQ_CHANNELPRESSURE, /**< Channel aftertouch event @since 1.1.0 */ FLUID_SEQ_SYSTEMRESET, /**< System reset event @since 1.1.0 */ FLUID_SEQ_UNREGISTERING, /**< Called when a sequencer client is being unregistered. @since 1.1.0 */ - FLUID_SEQ_LASTEVENT /**< Defines the count of event enums */ + FLUID_SEQ_LASTEVENT /**< Defines the count of event enums @deprecated As of 1.1.7 this enum value is deprecated and will be removed in a future release, because it prevents adding new enum values without breaking ABI compatibility. */ }; #define FLUID_SEQ_PITCHWHHELSENS FLUID_SEQ_PITCHWHEELSENS /**< Old deprecated misspelling of #FLUID_SEQ_PITCHWHEELSENS */ @@ -68,8 +68,8 @@ FLUIDSYNTH_API fluid_event_t* new_fluid_event(void); FLUIDSYNTH_API void delete_fluid_event(fluid_event_t* evt); /* Initializing events */ -FLUIDSYNTH_API void fluid_event_set_source(fluid_event_t* evt, short src); -FLUIDSYNTH_API void fluid_event_set_dest(fluid_event_t* evt, short dest); +FLUIDSYNTH_API void fluid_event_set_source(fluid_event_t* evt, fluid_seq_id_t src); +FLUIDSYNTH_API void fluid_event_set_dest(fluid_event_t* evt, fluid_seq_id_t dest); /* Timer events */ FLUIDSYNTH_API void fluid_event_timer(fluid_event_t* evt, void* data); @@ -115,8 +115,8 @@ FLUIDSYNTH_API void fluid_event_unregistering(fluid_event_t* evt); /* Accessing event data */ FLUIDSYNTH_API int fluid_event_get_type(fluid_event_t* evt); -FLUIDSYNTH_API short fluid_event_get_source(fluid_event_t* evt); -FLUIDSYNTH_API short fluid_event_get_dest(fluid_event_t* evt); +FLUIDSYNTH_API fluid_seq_id_t fluid_event_get_source(fluid_event_t* evt); +FLUIDSYNTH_API fluid_seq_id_t fluid_event_get_dest(fluid_event_t* evt); FLUIDSYNTH_API int fluid_event_get_channel(fluid_event_t* evt); FLUIDSYNTH_API short fluid_event_get_key(fluid_event_t* evt); FLUIDSYNTH_API short fluid_event_get_velocity(fluid_event_t* evt); diff --git a/fluidsynth/include/fluidsynth/gen.h b/fluidsynth/include/fluidsynth/gen.h index e4bbc8ef..f4b7f472 100644 --- a/fluidsynth/include/fluidsynth/gen.h +++ b/fluidsynth/include/fluidsynth/gen.h @@ -3,16 +3,16 @@ * Copyright (C) 2003 Peter Hanappe and others. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of * 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 - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA @@ -99,7 +99,7 @@ enum fluid_gen_type { * is used, however, as the destination for the default pitch wheel * modulator. */ GEN_PITCH, /**< Pitch (NOTE: Not a real SoundFont generator) */ - GEN_LAST /**< Value defines the count of generators (#fluid_gen_type) */ + GEN_LAST /**< Value defines the count of generators (#fluid_gen_type) @deprecated As of 1.1.7 this enum value is deprecated and will be removed in a future release, because it prevents adding new enum values without breaking ABI compatibility. */ }; @@ -124,7 +124,7 @@ enum fluid_gen_flags GEN_ABS_NRPN /**< Generator is an absolute value */ }; -FLUIDSYNTH_API int fluid_gen_set_default_values(fluid_gen_t* gen); +FLUIDSYNTH_API FLUID_DEPRECATED int fluid_gen_set_default_values(fluid_gen_t* gen); diff --git a/fluidsynth/include/fluidsynth/log.h b/fluidsynth/include/fluidsynth/log.h index 85db03e1..cd9f4041 100644 --- a/fluidsynth/include/fluidsynth/log.h +++ b/fluidsynth/include/fluidsynth/log.h @@ -3,16 +3,16 @@ * Copyright (C) 2003 Peter Hanappe and others. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of * 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 - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA @@ -58,7 +58,7 @@ enum fluid_log_level { FLUID_WARN, /**< Warning */ FLUID_INFO, /**< Verbose informational messages */ FLUID_DBG, /**< Debugging messages */ - LAST_LOG_LEVEL + LAST_LOG_LEVEL /**< @deprecated As of 1.1.7 this enum value is deprecated and will be removed in a future release, because it prevents adding new enum values without breaking ABI compatibility. */ }; /** diff --git a/fluidsynth/include/fluidsynth/midi.h b/fluidsynth/include/fluidsynth/midi.h index ab1e6a19..bd991a0a 100644 --- a/fluidsynth/include/fluidsynth/midi.h +++ b/fluidsynth/include/fluidsynth/midi.h @@ -3,16 +3,16 @@ * Copyright (C) 2003 Peter Hanappe and others. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of * 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 - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA @@ -131,9 +131,16 @@ FLUIDSYNTH_API int fluid_player_join(fluid_player_t* player); FLUIDSYNTH_API int fluid_player_set_loop(fluid_player_t* player, int loop); FLUIDSYNTH_API int fluid_player_set_midi_tempo(fluid_player_t* player, int tempo); FLUIDSYNTH_API int fluid_player_set_bpm(fluid_player_t* player, int bpm); -FLUIDSYNTH_API int fluid_player_get_status(fluid_player_t* player); FLUIDSYNTH_API int fluid_player_set_playback_callback(fluid_player_t* player, handle_midi_event_func_t handler, void* handler_data); +FLUIDSYNTH_API int fluid_player_get_status(fluid_player_t* player); +FLUIDSYNTH_API int fluid_player_get_current_tick(fluid_player_t * player); +FLUIDSYNTH_API int fluid_player_get_total_ticks(fluid_player_t * player); +FLUIDSYNTH_API int fluid_player_get_bpm(fluid_player_t * player); +FLUIDSYNTH_API int fluid_player_get_midi_tempo(fluid_player_t * player); + +/// + #ifdef __cplusplus } #endif diff --git a/fluidsynth/include/fluidsynth/misc.h b/fluidsynth/include/fluidsynth/misc.h index 4f97d843..3845e306 100644 --- a/fluidsynth/include/fluidsynth/misc.h +++ b/fluidsynth/include/fluidsynth/misc.h @@ -3,16 +3,16 @@ * Copyright (C) 2003 Peter Hanappe and others. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of * 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 - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA @@ -65,8 +65,8 @@ FLUIDSYNTH_API int fluid_is_midifile (const char *filename); #ifdef WIN32 -FLUIDSYNTH_API void* fluid_get_hinstance(void); -FLUIDSYNTH_API void fluid_set_hinstance(void* hinstance); +FLUIDSYNTH_API FLUID_DEPRECATED void* fluid_get_hinstance(void); +FLUIDSYNTH_API FLUID_DEPRECATED void fluid_set_hinstance(void* hinstance); #endif diff --git a/fluidsynth/include/fluidsynth/mod.h b/fluidsynth/include/fluidsynth/mod.h index e3430954..a50c5218 100644 --- a/fluidsynth/include/fluidsynth/mod.h +++ b/fluidsynth/include/fluidsynth/mod.h @@ -3,16 +3,16 @@ * Copyright (C) 2003 Peter Hanappe and others. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of * 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 - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA @@ -34,6 +34,8 @@ extern "C" { /** * Modulator structure. See SoundFont 2.04 PDF section 8.2. + * + * @deprecated To be removed from the public API. */ struct _fluid_mod_t { diff --git a/fluidsynth/include/fluidsynth/ramsfont.h b/fluidsynth/include/fluidsynth/ramsfont.h index 46709a4f..c4cf9458 100644 --- a/fluidsynth/include/fluidsynth/ramsfont.h +++ b/fluidsynth/include/fluidsynth/ramsfont.h @@ -3,16 +3,16 @@ * Copyright (C) 2003 Peter Hanappe and others. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of * 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 - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA diff --git a/fluidsynth/include/fluidsynth/seq.h b/fluidsynth/include/fluidsynth/seq.h index f1775573..9f0ee6c3 100644 --- a/fluidsynth/include/fluidsynth/seq.h +++ b/fluidsynth/include/fluidsynth/seq.h @@ -3,16 +3,16 @@ * Copyright (C) 2003 Peter Hanappe and others. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of * 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 - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA @@ -46,11 +46,11 @@ FLUIDSYNTH_API fluid_sequencer_t* new_fluid_sequencer2(int use_system_timer); FLUIDSYNTH_API void delete_fluid_sequencer(fluid_sequencer_t* seq); FLUIDSYNTH_API int fluid_sequencer_get_use_system_timer(fluid_sequencer_t* seq); FLUIDSYNTH_API -short fluid_sequencer_register_client(fluid_sequencer_t* seq, const char *name, +fluid_seq_id_t fluid_sequencer_register_client(fluid_sequencer_t* seq, const char *name, fluid_event_callback_t callback, void* data); -FLUIDSYNTH_API void fluid_sequencer_unregister_client(fluid_sequencer_t* seq, short id); +FLUIDSYNTH_API void fluid_sequencer_unregister_client(fluid_sequencer_t* seq, fluid_seq_id_t id); FLUIDSYNTH_API int fluid_sequencer_count_clients(fluid_sequencer_t* seq); -FLUIDSYNTH_API short fluid_sequencer_get_client_id(fluid_sequencer_t* seq, int index); +FLUIDSYNTH_API fluid_seq_id_t fluid_sequencer_get_client_id(fluid_sequencer_t* seq, int index); FLUIDSYNTH_API char* fluid_sequencer_get_client_name(fluid_sequencer_t* seq, int id); FLUIDSYNTH_API int fluid_sequencer_client_is_dest(fluid_sequencer_t* seq, int id); FLUIDSYNTH_API void fluid_sequencer_process(fluid_sequencer_t* seq, unsigned int msec); @@ -59,7 +59,7 @@ FLUIDSYNTH_API int fluid_sequencer_send_at(fluid_sequencer_t* seq, fluid_event_t* evt, unsigned int time, int absolute); FLUIDSYNTH_API -void fluid_sequencer_remove_events(fluid_sequencer_t* seq, short source, short dest, int type); +void fluid_sequencer_remove_events(fluid_sequencer_t* seq, fluid_seq_id_t source, fluid_seq_id_t dest, int type); FLUIDSYNTH_API unsigned int fluid_sequencer_get_tick(fluid_sequencer_t* seq); FLUIDSYNTH_API void fluid_sequencer_set_time_scale(fluid_sequencer_t* seq, double scale); FLUIDSYNTH_API double fluid_sequencer_get_time_scale(fluid_sequencer_t* seq); diff --git a/fluidsynth/include/fluidsynth/seqbind.h b/fluidsynth/include/fluidsynth/seqbind.h index 358032c9..1fa707c7 100644 --- a/fluidsynth/include/fluidsynth/seqbind.h +++ b/fluidsynth/include/fluidsynth/seqbind.h @@ -3,16 +3,16 @@ * Copyright (C) 2003 Peter Hanappe and others. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of * 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 - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA @@ -33,7 +33,7 @@ extern "C" { */ FLUIDSYNTH_API -short fluid_sequencer_register_fluidsynth(fluid_sequencer_t* seq, fluid_synth_t* synth); +fluid_seq_id_t fluid_sequencer_register_fluidsynth(fluid_sequencer_t* seq, fluid_synth_t* synth); FLUIDSYNTH_API int fluid_sequencer_add_midi_event_to_buffer(void* data, fluid_midi_event_t* event); diff --git a/fluidsynth/include/fluidsynth/settings.h b/fluidsynth/include/fluidsynth/settings.h index 3a0502a9..5551b92e 100644 --- a/fluidsynth/include/fluidsynth/settings.h +++ b/fluidsynth/include/fluidsynth/settings.h @@ -3,16 +3,16 @@ * Copyright (C) 2003 Peter Hanappe and others. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of * 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 - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA @@ -148,6 +148,7 @@ FLUIDSYNTH_API int fluid_settings_dupstr(fluid_settings_t* settings, const char *name, char** str); FLUIDSYNTH_API +FLUID_DEPRECATED int fluid_settings_getstr(fluid_settings_t* settings, const char *name, char** str); FLUIDSYNTH_API diff --git a/fluidsynth/include/fluidsynth/sfont.h b/fluidsynth/include/fluidsynth/sfont.h index 30aebfd1..4bfce9e9 100644 --- a/fluidsynth/include/fluidsynth/sfont.h +++ b/fluidsynth/include/fluidsynth/sfont.h @@ -3,16 +3,16 @@ * Copyright (C) 2003 Peter Hanappe and others. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of * 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 - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA @@ -75,7 +75,7 @@ enum { * SoundFont loader structure. */ struct _fluid_sfloader_t { - void* data; /**< User defined data pointer */ + void* data; /**< User defined data pointer used by _fluid_sfloader_t::load() */ /** * The free method should free the memory allocated for the loader in @@ -121,7 +121,7 @@ struct _fluid_sfont_t { /** * Get a virtual SoundFont preset by bank and program numbers. * @param sfont Virtual SoundFont - * @param bank MIDI bank number (0-16384) + * @param bank MIDI bank number (0-16383) * @param prenum MIDI preset number (0-127) * @return Should return an allocated virtual preset or NULL if it could not * be found. @@ -270,6 +270,7 @@ struct _fluid_sample_t #define FLUID_SAMPLETYPE_RIGHT 2 /**< Flag for #fluid_sample_t \a sampletype field for right samples of a stereo pair */ #define FLUID_SAMPLETYPE_LEFT 4 /**< Flag for #fluid_sample_t \a sampletype field for left samples of a stereo pair */ #define FLUID_SAMPLETYPE_LINKED 8 /**< Flag for #fluid_sample_t \a sampletype field, not used currently */ +#define FLUID_SAMPLETYPE_OGG_VORBIS 0x10 /**< Flag for #fluid_sample_t \a sampletype field for Ogg Vorbis compressed samples @since 1.1.7 */ #define FLUID_SAMPLETYPE_ROM 0x8000 /**< Flag for #fluid_sample_t \a sampletype field, ROM sample, causes sample to be ignored */ diff --git a/fluidsynth/include/fluidsynth/shell.h b/fluidsynth/include/fluidsynth/shell.h index 7a02bb65..ba0ebf4c 100644 --- a/fluidsynth/include/fluidsynth/shell.h +++ b/fluidsynth/include/fluidsynth/shell.h @@ -3,16 +3,16 @@ * Copyright (C) 2003 Peter Hanappe and others. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of * 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 - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA diff --git a/fluidsynth/include/fluidsynth/synth.h b/fluidsynth/include/fluidsynth/synth.h index f62e60cd..db9a4a99 100644 --- a/fluidsynth/include/fluidsynth/synth.h +++ b/fluidsynth/include/fluidsynth/synth.h @@ -3,16 +3,16 @@ * Copyright (C) 2003 Peter Hanappe and others. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of * 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 - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA @@ -94,21 +94,25 @@ FLUIDSYNTH_API int fluid_synth_get_program(fluid_synth_t* synth, int chan, unsigned int* sfont_id, unsigned int* bank_num, unsigned int* preset_num); FLUIDSYNTH_API int fluid_synth_unset_program (fluid_synth_t *synth, int chan); -FLUIDSYNTH_API int fluid_synth_get_channel_info (fluid_synth_t *synth, int chan, - fluid_synth_channel_info_t *info); +FLUIDSYNTH_API +FLUID_DEPRECATED +int fluid_synth_get_channel_info (fluid_synth_t *synth, int chan, fluid_synth_channel_info_t *info); FLUIDSYNTH_API int fluid_synth_program_reset(fluid_synth_t* synth); FLUIDSYNTH_API int fluid_synth_system_reset(fluid_synth_t* synth); FLUIDSYNTH_API int fluid_synth_all_notes_off(fluid_synth_t* synth, int chan); FLUIDSYNTH_API int fluid_synth_all_sounds_off(fluid_synth_t* synth, int chan); +/** + * The midi channel type used by fluid_synth_set_channel_type() + */ enum fluid_midi_channel_type { - CHANNEL_TYPE_MELODIC = 0, - CHANNEL_TYPE_DRUM = 1 + CHANNEL_TYPE_MELODIC = 0, /**< Melodic midi channel */ + CHANNEL_TYPE_DRUM = 1 /**< Drum midi channel */ }; -int fluid_synth_set_channel_type(fluid_synth_t* synth, int chan, int type); +FLUIDSYNTH_API int fluid_synth_set_channel_type(fluid_synth_t* synth, int chan, int type); /* Low level access */ @@ -217,7 +221,9 @@ enum fluid_interp { FLUIDSYNTH_API int fluid_synth_set_gen(fluid_synth_t* synth, int chan, int param, float value); -FLUIDSYNTH_API int fluid_synth_set_gen2 (fluid_synth_t* synth, int chan, +FLUIDSYNTH_API +FLUID_DEPRECATED +int fluid_synth_set_gen2 (fluid_synth_t* synth, int chan, int param, float value, int absolute, int normalized); FLUIDSYNTH_API float fluid_synth_get_gen(fluid_synth_t* synth, int chan, int param); @@ -226,12 +232,14 @@ FLUIDSYNTH_API float fluid_synth_get_gen(fluid_synth_t* synth, int chan, int par /* Tuning */ FLUIDSYNTH_API +FLUID_DEPRECATED int fluid_synth_create_key_tuning(fluid_synth_t* synth, int bank, int prog, const char* name, const double* pitch); FLUIDSYNTH_API int fluid_synth_activate_key_tuning(fluid_synth_t* synth, int bank, int prog, const char* name, const double* pitch, int apply); FLUIDSYNTH_API +FLUID_DEPRECATED int fluid_synth_create_octave_tuning(fluid_synth_t* synth, int bank, int prog, const char* name, const double* pitch); FLUIDSYNTH_API @@ -241,11 +249,14 @@ FLUIDSYNTH_API int fluid_synth_tune_notes(fluid_synth_t* synth, int bank, int prog, int len, const int *keys, const double* pitch, int apply); FLUIDSYNTH_API +FLUID_DEPRECATED int fluid_synth_select_tuning(fluid_synth_t* synth, int chan, int bank, int prog); FLUIDSYNTH_API int fluid_synth_activate_tuning(fluid_synth_t* synth, int chan, int bank, int prog, int apply); -FLUIDSYNTH_API int fluid_synth_reset_tuning(fluid_synth_t* synth, int chan); +FLUIDSYNTH_API +FLUID_DEPRECATED +int fluid_synth_reset_tuning(fluid_synth_t* synth, int chan); FLUIDSYNTH_API int fluid_synth_deactivate_tuning(fluid_synth_t* synth, int chan, int apply); FLUIDSYNTH_API void fluid_synth_tuning_iteration_start(fluid_synth_t* synth); @@ -305,8 +316,9 @@ FLUIDSYNTH_API void fluid_synth_start_voice(fluid_synth_t* synth, fluid_voice_t* FLUIDSYNTH_API void fluid_synth_get_voicelist(fluid_synth_t* synth, fluid_voice_t* buf[], int bufsize, int ID); FLUIDSYNTH_API int fluid_synth_handle_midi_event(void* data, fluid_midi_event_t* event); -FLUIDSYNTH_API void fluid_synth_set_midi_router(fluid_synth_t* synth, - fluid_midi_router_t* router); +FLUIDSYNTH_API +FLUID_DEPRECATED +void fluid_synth_set_midi_router(fluid_synth_t* synth, fluid_midi_router_t* router); #ifdef __cplusplus } diff --git a/fluidsynth/include/fluidsynth/types.h b/fluidsynth/include/fluidsynth/types.h index e956d818..ebe40a8f 100644 --- a/fluidsynth/include/fluidsynth/types.h +++ b/fluidsynth/include/fluidsynth/types.h @@ -3,16 +3,16 @@ * Copyright (C) 2003 Peter Hanappe and others. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of * 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 - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA @@ -60,6 +60,7 @@ typedef struct _fluid_rampreset_t fluid_rampreset_t; /**< RAM SoundFo typedef int fluid_istream_t; /**< Input stream descriptor */ typedef int fluid_ostream_t; /**< Output stream descriptor */ +typedef short fluid_seq_id_t; /**< Unique client IDs used by the sequencer and #fluid_event_t, obtained by fluid_sequencer_register_client() and fluid_sequencer_register_fluidsynth() */ #ifdef __cplusplus } diff --git a/fluidsynth/include/fluidsynth/version.h b/fluidsynth/include/fluidsynth/version.h index 5f35686b..1cc0e972 100644 --- a/fluidsynth/include/fluidsynth/version.h +++ b/fluidsynth/include/fluidsynth/version.h @@ -3,16 +3,16 @@ * Copyright (C) 2003 Peter Hanappe and others. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of * 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 - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA @@ -31,10 +31,10 @@ extern "C" { * @brief Library version functions and defines */ -#define FLUIDSYNTH_VERSION "1.1.6" /**< String constant of libfluidsynth version. */ +#define FLUIDSYNTH_VERSION "1.1.10" /**< String constant of libfluidsynth version. */ #define FLUIDSYNTH_VERSION_MAJOR 1 /**< libfluidsynth major version integer constant. */ #define FLUIDSYNTH_VERSION_MINOR 1 /**< libfluidsynth minor version integer constant. */ -#define FLUIDSYNTH_VERSION_MICRO 6 /**< libfluidsynth micro version integer constant. */ +#define FLUIDSYNTH_VERSION_MICRO 10 /**< libfluidsynth micro version integer constant. */ FLUIDSYNTH_API void fluid_version(int *major, int *minor, int *micro); FLUIDSYNTH_API char* fluid_version_str(void); diff --git a/fluidsynth/include/fluidsynth/voice.h b/fluidsynth/include/fluidsynth/voice.h index fe7ad8c1..f28e1dc3 100644 --- a/fluidsynth/include/fluidsynth/voice.h +++ b/fluidsynth/include/fluidsynth/voice.h @@ -3,16 +3,16 @@ * Copyright (C) 2003 Peter Hanappe and others. * * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License - * as published by the Free Software Foundation; either version 2 of + * modify it under the terms of the GNU Lesser General Public License + * as published by the Free Software Foundation; either version 2.1 of * 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 - * Library General Public License for more details. + * Lesser General Public License for more details. * - * You should have received a copy of the GNU Library General Public + * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA @@ -52,8 +52,16 @@ FLUIDSYNTH_API void fluid_voice_gen_set(fluid_voice_t* voice, int gen, float val FLUIDSYNTH_API float fluid_voice_gen_get(fluid_voice_t* voice, int gen); FLUIDSYNTH_API void fluid_voice_gen_incr(fluid_voice_t* voice, int gen, float val); -FLUIDSYNTH_API unsigned int fluid_voice_get_id(fluid_voice_t* voice); -FLUIDSYNTH_API int fluid_voice_is_playing(fluid_voice_t* voice); +FLUIDSYNTH_API unsigned int fluid_voice_get_id(const fluid_voice_t* voice); +FLUIDSYNTH_API int fluid_voice_is_playing(const fluid_voice_t* voice); +FLUIDSYNTH_API int fluid_voice_is_on(const fluid_voice_t* voice); +FLUIDSYNTH_API int fluid_voice_is_sustained(const fluid_voice_t* voice); +FLUIDSYNTH_API int fluid_voice_is_sostenuto(const fluid_voice_t* voice); +FLUIDSYNTH_API int fluid_voice_get_channel(const fluid_voice_t* voice); +FLUIDSYNTH_API int fluid_voice_get_actual_key(const fluid_voice_t* voice); +FLUIDSYNTH_API int fluid_voice_get_key(const fluid_voice_t* voice); +FLUIDSYNTH_API int fluid_voice_get_actual_velocity(const fluid_voice_t* voice); +FLUIDSYNTH_API int fluid_voice_get_velocity(const fluid_voice_t* voice); FLUIDSYNTH_API int fluid_voice_optimize_sample(fluid_sample_t* s); diff --git a/fluidsynth/lib/libfluidsynth.a b/fluidsynth/lib/libfluidsynth.a index d15e1c0d..89a97f86 100644 Binary files a/fluidsynth/lib/libfluidsynth.a and b/fluidsynth/lib/libfluidsynth.a differ