mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-04-22 23:50:53 +00:00
Merge branch 'master' into sm24
This commit is contained in:
commit
1815ca880f
85 changed files with 712 additions and 4538 deletions
58
.appveyor.yml
Normal file
58
.appveyor.yml
Normal file
|
@ -0,0 +1,58 @@
|
|||
os:
|
||||
- Visual Studio 2015
|
||||
|
||||
build:
|
||||
verbosity: detailed
|
||||
|
||||
configuration:
|
||||
- Release
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- platform: x86
|
||||
generator: Visual Studio 14 2015
|
||||
glib-url: http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.28/glib_2.28.8-1_win32.zip
|
||||
glib-dev-url: http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.28/glib-dev_2.28.8-1_win32.zip
|
||||
pkg-config-url: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.26-1_win32.zip
|
||||
gettext-url: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime_0.18.1.1-2_win32.zip
|
||||
proxy-libintl-dev-url: http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/proxy-libintl-dev_20100902_win32.zip
|
||||
|
||||
- platform: x64
|
||||
generator: Visual Studio 14 2015 Win64
|
||||
glib-url: http://ftp.gnome.org/pub/gnome/binaries/win64/glib/2.26/glib_2.26.1-1_win64.zip
|
||||
glib-dev-url: http://ftp.gnome.org/pub/gnome/binaries/win64/glib/2.26/glib-dev_2.26.1-1_win64.zip
|
||||
pkg-config-url: http://ftp.gnome.org/pub/gnome/binaries/win64/dependencies/pkg-config_0.23-2_win64.zip
|
||||
gettext-url: http://ftp.gnome.org/pub/gnome/binaries/win64/dependencies/gettext-runtime_0.18.1.1-2_win64.zip
|
||||
proxy-libintl-dev-url: http://ftp.gnome.org/pub/gnome/binaries/win64/dependencies/proxy-libintl-dev_20100902_win64.zip
|
||||
|
||||
|
||||
install:
|
||||
- mkdir c:\deps
|
||||
- cd c:\deps
|
||||
- curl -fsS -o glib.zip %glib-url%
|
||||
- curl -fsS -o glib-dev.zip %glib-dev-url%
|
||||
- curl -fsS -o pkg-config.zip %pkg-config-url%
|
||||
- curl -fsS -o gettext.zip %gettext-url%
|
||||
- curl -fsS -o libintl-dev.zip %proxy-libintl-dev-url%
|
||||
- 7z x glib.zip > NUL
|
||||
- 7z x glib-dev.zip > NUL
|
||||
- 7z x pkg-config.zip > NUL
|
||||
- 7z x gettext.zip > NUL
|
||||
- 7z x libintl-dev.zip > NUL
|
||||
- SET PATH=C:\deps\bin;%PATH%
|
||||
|
||||
build_script:
|
||||
# - call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64
|
||||
# - call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64
|
||||
- cd C:\projects\fluidsynth
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake -G "%generator%" ..
|
||||
- cmake --build . --config Release
|
||||
|
||||
after_build:
|
||||
- 7z a fluidsynth.zip %APPVEYOR_BUILD_FOLDER%\build\src\Release\* c:\deps\bin\libglib*.dll c:\deps\bin\libgthread*.dll c:\deps\bin\*intl*.dll
|
||||
|
||||
artifacts:
|
||||
- path: build/fluidsynth.zip
|
||||
name: FluidSynth
|
2
.github/issue_template.md
vendored
2
.github/issue_template.md
vendored
|
@ -3,7 +3,7 @@ Before submitting an issue, consider looking into our
|
|||
wiki ( https://github.com/FluidSynth/fluidsynth/wiki ) or the
|
||||
developer resources ( http://www.fluidsynth.org/api/ )
|
||||
|
||||
Please do not submit support requests or "How to" questions here. Instead, please use FluidSynth's
|
||||
Please do not submit support requests or "How to" questions here. Instead, use FluidSynth's
|
||||
mailing list: https://lists.nongnu.org/mailman/listinfo/fluid-dev
|
||||
|
||||
Below is a form that shall help getting relevant information for bugs and feature requests together.
|
||||
|
|
|
@ -127,6 +127,7 @@ check_include_file ( limits.h HAVE_LIMITS_H )
|
|||
check_include_file ( pthread.h HAVE_PTHREAD_H )
|
||||
check_include_file ( signal.h HAVE_SIGNAL_H )
|
||||
check_include_file ( getopt.h HAVE_GETOPT_H )
|
||||
check_include_file ( stdint.h HAVE_STDINT_H )
|
||||
include ( TestInline )
|
||||
include ( TestVLA )
|
||||
include ( TestBigEndian )
|
||||
|
@ -138,7 +139,7 @@ unset ( FLUID_CPPFLAGS CACHE )
|
|||
unset ( FLUID_LIBS CACHE )
|
||||
|
||||
# Options for the GNU C compiler only
|
||||
if ( CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
||||
if ( CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang" )
|
||||
if ( NOT APPLE AND NOT OS2 )
|
||||
set ( CMAKE_EXE_LINKER_FLAGS
|
||||
"${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed" )
|
||||
|
@ -156,7 +157,7 @@ if ( CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
|||
set ( CMAKE_C_FLAGS_DEBUG "-std=gnu89 -g ${GNUCC_VISIBILITY_FLAG} -DDEBUG ${GNUCC_WARNING_FLAGS} -fsanitize=undefined" )
|
||||
set ( CMAKE_C_FLAGS_RELEASE "-std=gnu89 -O2 -fomit-frame-pointer -finline-functions ${GNUCC_VISIBILITY_FLAG} -DNDEBUG ${GNUCC_WARNING_FLAGS}" )
|
||||
set ( CMAKE_C_FLAGS_RELWITHDEBINFO "-std=gnu89 -O2 -g -fomit-frame-pointer -finline-functions ${GNUCC_VISIBILITY_FLAG} -DNDEBUG ${GNUCC_WARNING_FLAGS}" )
|
||||
endif ( CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" )
|
||||
endif ( CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang" )
|
||||
|
||||
# Windows
|
||||
unset ( WINDOWS_SUPPORT CACHE )
|
||||
|
@ -432,12 +433,6 @@ configure_file ( ${CMAKE_SOURCE_DIR}/src/config.cmake
|
|||
${CMAKE_BINARY_DIR}/config.h )
|
||||
add_definitions ( -DHAVE_CONFIG_H )
|
||||
|
||||
# Extra configuration file for MS VisualC compiler
|
||||
if ( MSVC )
|
||||
configure_file ( ${CMAKE_SOURCE_DIR}/src/config_win32.cmake
|
||||
${CMAKE_BINARY_DIR}/config_win32.h )
|
||||
endif ( MSVC )
|
||||
|
||||
# Process subdirectories
|
||||
add_subdirectory ( src )
|
||||
add_subdirectory ( include )
|
||||
|
|
40
CONTRIBUTING.md
Normal file
40
CONTRIBUTING.md
Normal file
|
@ -0,0 +1,40 @@
|
|||
# Contributing
|
||||
|
||||
Thanks for considering to contribute to FluidSynth. Before implementing
|
||||
any huge new feature, consider bringing up your ideas on our mailing list:
|
||||
https://lists.nongnu.org/mailman/listinfo/fluid-dev
|
||||
|
||||
Contributing can be done by
|
||||
* [submitting pull requests on Github](
|
||||
https://help.github.com/articles/proposing-changes-to-your-work-with-pull-requests/) or
|
||||
* submitting patches to the mailing list.
|
||||
|
||||
Patches should be created with `git format-patch`, so in every case you should be familiar with the basics of git.
|
||||
|
||||
Some things that will increase the chance that your pull request or patch is accepted:
|
||||
|
||||
* Give a reasoning / motivation for any changes or proposals you make.
|
||||
* Follow our style guide.
|
||||
* Keep your commits "atomic".
|
||||
* Write meaningful commit messages.
|
||||
|
||||
## Style Guide
|
||||
|
||||
Find FluidSynth's style guide below. Most of the syntax issues can be automatically applied with `clang-format` and `clang-tidy` using the config files in the repository root.
|
||||
|
||||
#### General
|
||||
* Every function should have a short comment explaining it's purpose
|
||||
* Every public API function **must** be documented with purpose, params and return value
|
||||
* Prefer signed integer types to unsigned ones
|
||||
* Use spaces rather than tabs
|
||||
* Avoid macros
|
||||
|
||||
#### Naming Conventions
|
||||
* Words separated by underscores
|
||||
* Macros always UPPER_CASE
|
||||
* Function and Variable names always lower_case, (e.g. `fluid_componentname_purpose()`)
|
||||
|
||||
#### Bracing
|
||||
* Every block after an if, else, while or for should be enclosed in braces
|
||||
* **Allman-Style** braces everywhere
|
||||
|
22
README.md
22
README.md
|
@ -1,6 +1,12 @@
|
|||
[](https://travis-ci.org/FluidSynth/fluidsynth)
|
||||
|
||||
# Introduction
|
||||
# FluidSynth
|
||||
|
||||
| | Build Status |
|
||||
|---|---|
|
||||
| Linux/MacOSX| [](https://travis-ci.org/FluidSynth/fluidsynth) |
|
||||
| Windows | [](https://ci.appveyor.com/project/derselbst/fluidsynth) |
|
||||
|
||||
|
||||
|
||||
FluidSynth is a software real-time synthesizer based on the
|
||||
Soundfont 2 specifications.
|
||||
|
@ -10,13 +16,13 @@ device. It is the software analogue of a MIDI synthesizer. FluidSynth
|
|||
can also play midifiles using a Soundfont.
|
||||
|
||||
|
||||
# Information on the web
|
||||
## Information on the web
|
||||
|
||||
The place to look if you are looking for the latest information on
|
||||
FluidSynth is the web site at http://www.fluidsynth.org/.
|
||||
|
||||
|
||||
# Why did we do it
|
||||
## Why did we do it
|
||||
|
||||
The synthesizer grew out of a project, started by Samuel Bianchini and
|
||||
Peter Hanappe, and later joined by Johnathan Lee, that aimed at
|
||||
|
@ -50,7 +56,7 @@ synthesizer. That is why we developed FluidSynth.
|
|||
|
||||
|
||||
|
||||
# Design decisions
|
||||
## Design decisions
|
||||
|
||||
The synthesizer was designed to be as self-contained as possible for
|
||||
several reasons:
|
||||
|
@ -70,7 +76,7 @@ several reasons:
|
|||
on external code.
|
||||
|
||||
|
||||
# Links
|
||||
## Links
|
||||
|
||||
### Home Page
|
||||
|
||||
|
@ -78,6 +84,10 @@ several reasons:
|
|||
|
||||
### Documentation
|
||||
|
||||
- FluidSynth's wiki, https://github.com/FluidSynth/fluidsynth/wiki
|
||||
|
||||
- FluidSynth's API documentation, http://www.fluidsynth.org/api/
|
||||
|
||||
- Introduction to SoundFonts, by Josh Green,
|
||||
http://smurf.sourceforge.net/sfont_intro.php
|
||||
|
||||
|
|
10
TODO
10
TODO
|
@ -19,14 +19,12 @@ Synthesis
|
|||
Drivers
|
||||
-------
|
||||
- libao audio output driver
|
||||
- MacOS X MidiCore component
|
||||
- Windows DirectMusic component
|
||||
- ASIO driver
|
||||
- DirectSound 3D and EAX
|
||||
|
||||
Bugs to mash
|
||||
------------
|
||||
- Fix warnings on 64 bit platforms and type-puned pointer warning
|
||||
- Add byte swapping support (on synthesis or sample load?)
|
||||
- Investigate why MIDI rendering causes burst of notes at start
|
||||
|
||||
|
@ -41,8 +39,6 @@ Validation
|
|||
Documentation
|
||||
-------------
|
||||
- Write documention on tuning
|
||||
- fluid_synth_program_select2() with name of soundfont instead of font_id
|
||||
- fluid_synth_set_gen2()
|
||||
- Add usage scenarios in the documentation
|
||||
- User and system configuration file
|
||||
|
||||
|
@ -76,10 +72,6 @@ Top of the list
|
|||
- Redo sfloader api using "interface" api
|
||||
- 3D audio output
|
||||
|
||||
Design
|
||||
- turn ladspa fx unit and router in indepedent
|
||||
objects, remove their dependencies from the synth object
|
||||
|
||||
MIDI player
|
||||
- Add API to manipulate and query MIDI file list
|
||||
- generalize use of fluid_event_t, remove fluid_midi_event_t
|
||||
|
@ -87,7 +79,6 @@ MIDI player
|
|||
Shell & command handler
|
||||
- Add "note" command that plays a note with a duration (sequencer)
|
||||
- MIDI file player commands (load/play/stop)
|
||||
- Relax dependency of the command handler on the synthesizer
|
||||
- Allow settings to be loaded before the synthesizer is created
|
||||
|
||||
SoundFont Specs:
|
||||
|
@ -100,7 +91,6 @@ MIDI Specs
|
|||
|
||||
|
||||
Unsorted
|
||||
- include readline in project
|
||||
- additional aux buses
|
||||
- rewrite midi file using new sequencer
|
||||
- direct access to audio buffer
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#---------------------------------------------------------------------------
|
||||
DOXYFILE_ENCODING = UTF-8
|
||||
PROJECT_NAME = libfluidsynth
|
||||
PROJECT_NUMBER = 1.1.8
|
||||
PROJECT_NUMBER = 2.0.0ALPHA
|
||||
OUTPUT_DIRECTORY = api
|
||||
CREATE_SUBDIRS = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*!
|
||||
\mainpage FluidSynth 1.1 Developer Documentation
|
||||
\mainpage FluidSynth 2.0 Developer Documentation
|
||||
\author Peter Hanappe
|
||||
\author Conrad Berhörster
|
||||
\author Antoine Schmitt
|
||||
|
@ -8,7 +8,7 @@
|
|||
\author David Henningsson
|
||||
\author Tom Moebert
|
||||
\author Copyright © 2003-2017 Peter Hanappe, Conrad Berhörster, Antoine Schmitt, Pedro López-Cabanillas, Josh Green, David Henningsson, Tom Moebert
|
||||
\version Revision 1.1.8
|
||||
\version Revision 2.0.0ALPHA
|
||||
\date 2017-10-14
|
||||
|
||||
All the source code examples in this document are in the public domain; you can use them as you please. This document is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ . The FluidSynth library is distributed under the GNU Lesser General Public License. A copy of the GNU Lesser General Public License is contained in the FluidSynth package; if not, visit http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
@ -21,7 +21,8 @@ All the source code examples in this document are in the public domain; you can
|
|||
|
||||
- \ref Disclaimer
|
||||
- \ref Introduction
|
||||
- \ref NewIn@NEXT_RELEASE@
|
||||
- \ref NewIn2_0_0
|
||||
- \ref NewIn1_1_9
|
||||
- \ref NewIn1_1_8
|
||||
- \ref NewIn1_1_7
|
||||
- \ref NewIn1_1_6
|
||||
|
@ -67,11 +68,11 @@ What is FluidSynth?
|
|||
|
||||
- FluidSynth is open source, in active development. For more details, take a look at http://www.fluidsynth.org
|
||||
|
||||
\section NewIn@NEXT_RELEASE@ Whats new in @NEXT_RELEASE@?
|
||||
\section NewIn2_0_0 Whats new in 2.0.0?
|
||||
|
||||
FluidSynths SOVERSION was bumped. The API was reworked, deprecated functions were removed. Functions that were doing (nearly) the same were fused together.
|
||||
|
||||
Changes in FluidSynth @NEXT_RELEASE@ concerning developers:
|
||||
Changes in FluidSynth 2.0.0 concerning developers:
|
||||
|
||||
- remove deprecated fluid_synth_get_program() and fluid_synth_get_channel_preset(), use fluid_synth_get_channel_info() instead
|
||||
- remove deprecated fluid_settings_getstr()
|
||||
|
@ -85,15 +86,28 @@ Changes in FluidSynth @NEXT_RELEASE@ concerning developers:
|
|||
- remove struct _fluid_gen_t, fluid_gen_set_default_values() and enum fluid_gen_flags from public API
|
||||
|
||||
- all public \c fluid_settings_* functions that return an integer which is not meant to be interpreted as bool consistently return either FLUID_OK or FLUID_FAILED
|
||||
- all public delete_* functions return void and are safe when called with NULL
|
||||
- the shell command handler was decoupled internally, as a consequence the param list of new_fluid_server() and new_fluid_cmd_handler() was adapted
|
||||
|
||||
- add "synth.volenv" a setting for volume envelope processing
|
||||
- add "midi.autoconnect" a setting for automatically connecting fluidsynth to available MIDI input ports
|
||||
- add support for polyonic key pressure events, see fluid_event_key_pressure()
|
||||
- add fluid_synth_add_default_mod() for manipulating default modulators
|
||||
- add individual reverb setters: fluid_synth_set_reverb_roomsize(), fluid_synth_set_reverb_damp(), fluid_synth_set_reverb_width(), fluid_synth_set_reverb_level()
|
||||
- add individual chorus setters: fluid_synth_set_chorus_nr(), fluid_synth_set_chorus_level(), fluid_synth_set_chorus_speed(), fluid_synth_set_chorus_depth(), fluid_synth_set_chorus_type()
|
||||
- introduce a separate data type for sequencer client IDs: #fluid_seq_id_t
|
||||
|
||||
|
||||
\section NewIn1_1_9 Whats new in 1.1.9?
|
||||
|
||||
Changes in FluidSynth 1.1.9 concerning developers:
|
||||
|
||||
- implement handling of #FLUID_SEQ_ALLSOUNDSOFF events in fluid_seq_fluidsynth_callback()
|
||||
- fix return value of fluid_file_set_encoding_quality()
|
||||
|
||||
- For a full list of bug fixes, see
|
||||
https://github.com/FluidSynth/fluidsynth/wiki/ChangeLog#fluidsynth-119
|
||||
|
||||
\section NewIn1_1_8 Whats new in 1.1.8?
|
||||
|
||||
Changes in FluidSynth 1.1.8 concerning developers:
|
||||
|
|
|
@ -56,7 +56,7 @@ enum fluid_seq_event_type {
|
|||
FLUID_SEQ_TIMER, /**< Timer event (useful for giving a callback at a certain time) */
|
||||
FLUID_SEQ_ANYCONTROLCHANGE, /**< DOCME (used for remove_events only) */
|
||||
FLUID_SEQ_CHANNELPRESSURE, /**< Channel aftertouch event @since 1.1.0 */
|
||||
FLUID_SEQ_KEYPRESSURE, /**< Polyphonic aftertouch event @since @NEXT_RELEASE@ */
|
||||
FLUID_SEQ_KEYPRESSURE, /**< Polyphonic aftertouch event @since 2.0.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 @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. */
|
||||
|
@ -67,8 +67,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);
|
||||
|
|
|
@ -31,7 +31,7 @@ extern "C" {
|
|||
*/
|
||||
|
||||
FLUIDSYNTH_API fluid_midi_event_t* new_fluid_midi_event(void);
|
||||
FLUIDSYNTH_API int delete_fluid_midi_event(fluid_midi_event_t* event);
|
||||
FLUIDSYNTH_API void delete_fluid_midi_event(fluid_midi_event_t* event);
|
||||
|
||||
FLUIDSYNTH_API int fluid_midi_event_set_type(fluid_midi_event_t* evt, int type);
|
||||
FLUIDSYNTH_API int fluid_midi_event_get_type(fluid_midi_event_t* evt);
|
||||
|
@ -84,7 +84,7 @@ typedef int (*handle_midi_event_func_t)(void* data, fluid_midi_event_t* event);
|
|||
FLUIDSYNTH_API fluid_midi_router_t* new_fluid_midi_router(fluid_settings_t* settings,
|
||||
handle_midi_event_func_t handler,
|
||||
void* event_handler_data);
|
||||
FLUIDSYNTH_API int delete_fluid_midi_router(fluid_midi_router_t* handler);
|
||||
FLUIDSYNTH_API void delete_fluid_midi_router(fluid_midi_router_t* handler);
|
||||
FLUIDSYNTH_API int fluid_midi_router_set_default_rules (fluid_midi_router_t *router);
|
||||
FLUIDSYNTH_API int fluid_midi_router_clear_rules (fluid_midi_router_t *router);
|
||||
FLUIDSYNTH_API int fluid_midi_router_add_rule (fluid_midi_router_t *router,
|
||||
|
@ -122,7 +122,7 @@ enum fluid_player_status
|
|||
};
|
||||
|
||||
FLUIDSYNTH_API fluid_player_t* new_fluid_player(fluid_synth_t* synth);
|
||||
FLUIDSYNTH_API int delete_fluid_player(fluid_player_t* player);
|
||||
FLUIDSYNTH_API void delete_fluid_player(fluid_player_t* player);
|
||||
FLUIDSYNTH_API int fluid_player_add(fluid_player_t* player, const char *midifile);
|
||||
FLUIDSYNTH_API int fluid_player_add_mem(fluid_player_t* player, const void *buffer, size_t len);
|
||||
FLUIDSYNTH_API int fluid_player_play(fluid_player_t* player);
|
||||
|
@ -138,7 +138,8 @@ 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);
|
||||
|
||||
FLUIDSYNTH_API int fluid_player_seek(fluid_player_t *player, int ticks);
|
||||
|
||||
///
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -76,18 +76,18 @@ FLUIDSYNTH_API void fluid_mod_set_source2(fluid_mod_t* mod, int src, int flags);
|
|||
FLUIDSYNTH_API void fluid_mod_set_dest(fluid_mod_t* mod, int dst);
|
||||
FLUIDSYNTH_API void fluid_mod_set_amount(fluid_mod_t* mod, double amount);
|
||||
|
||||
FLUIDSYNTH_API int fluid_mod_get_source1(fluid_mod_t* mod);
|
||||
FLUIDSYNTH_API int fluid_mod_get_flags1(fluid_mod_t* mod);
|
||||
FLUIDSYNTH_API int fluid_mod_get_source2(fluid_mod_t* mod);
|
||||
FLUIDSYNTH_API int fluid_mod_get_flags2(fluid_mod_t* mod);
|
||||
FLUIDSYNTH_API int fluid_mod_get_dest(fluid_mod_t* mod);
|
||||
FLUIDSYNTH_API double fluid_mod_get_amount(fluid_mod_t* mod);
|
||||
FLUIDSYNTH_API int fluid_mod_get_source1(const fluid_mod_t* mod);
|
||||
FLUIDSYNTH_API int fluid_mod_get_flags1(const fluid_mod_t* mod);
|
||||
FLUIDSYNTH_API int fluid_mod_get_source2(const fluid_mod_t* mod);
|
||||
FLUIDSYNTH_API int fluid_mod_get_flags2(const fluid_mod_t* mod);
|
||||
FLUIDSYNTH_API int fluid_mod_get_dest(const fluid_mod_t* mod);
|
||||
FLUIDSYNTH_API double fluid_mod_get_amount(const fluid_mod_t* mod);
|
||||
|
||||
FLUIDSYNTH_API int fluid_mod_test_identity(fluid_mod_t * mod1, fluid_mod_t * mod2);
|
||||
FLUIDSYNTH_API int fluid_mod_has_source(fluid_mod_t * mod, int cc, int ctrl);
|
||||
FLUIDSYNTH_API int fluid_mod_has_dest(fluid_mod_t * mod, int gen);
|
||||
FLUIDSYNTH_API int fluid_mod_test_identity(const fluid_mod_t * mod1, const fluid_mod_t * mod2);
|
||||
FLUIDSYNTH_API int fluid_mod_has_source(const fluid_mod_t * mod, int cc, int ctrl);
|
||||
FLUIDSYNTH_API int fluid_mod_has_dest(const fluid_mod_t * mod, int gen);
|
||||
|
||||
FLUIDSYNTH_API void fluid_mod_clone(fluid_mod_t* mod, fluid_mod_t* src);
|
||||
FLUIDSYNTH_API void fluid_mod_clone(fluid_mod_t* mod, const fluid_mod_t* src);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ int fluid_ramsfont_izone_set_loop(fluid_ramsfont_t* sfont,
|
|||
int on, float loopstart, float loopend);
|
||||
|
||||
FLUIDSYNTH_API fluid_sample_t* new_fluid_ramsample(void);
|
||||
FLUIDSYNTH_API int delete_fluid_ramsample(fluid_sample_t* sample);
|
||||
FLUIDSYNTH_API void delete_fluid_ramsample(fluid_sample_t* sample);
|
||||
FLUIDSYNTH_API int fluid_sample_set_name(fluid_sample_t* sample, const char *name);
|
||||
FLUIDSYNTH_API
|
||||
int fluid_sample_set_sound_data(fluid_sample_t* sample, short *data,
|
||||
|
|
|
@ -46,20 +46,20 @@ 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 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 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, fluid_seq_id_t id);
|
||||
FLUIDSYNTH_API int fluid_sequencer_client_is_dest(fluid_sequencer_t* seq, fluid_seq_id_t id);
|
||||
FLUIDSYNTH_API void fluid_sequencer_process(fluid_sequencer_t* seq, unsigned int msec);
|
||||
FLUIDSYNTH_API void fluid_sequencer_send_now(fluid_sequencer_t* seq, fluid_event_t* evt);
|
||||
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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ int fluid_settings_getint_range(fluid_settings_t* settings, const char *name,
|
|||
* @param name Setting name
|
||||
* @param option A string option for this setting (iterates through the list)
|
||||
*/
|
||||
typedef void (*fluid_settings_foreach_option_t)(void *data, char *name, char *option);
|
||||
typedef void (*fluid_settings_foreach_option_t)(void *data, const char *name, const char *option);
|
||||
|
||||
FLUIDSYNTH_API
|
||||
void fluid_settings_foreach_option(fluid_settings_t* settings,
|
||||
|
@ -193,7 +193,7 @@ FLUIDSYNTH_API char *fluid_settings_option_concat (fluid_settings_t* settings,
|
|||
* @param name Setting name
|
||||
* @param type Setting type (#fluid_types_enum)
|
||||
*/
|
||||
typedef void (*fluid_settings_foreach_t)(void *data, char *name, int type);
|
||||
typedef void (*fluid_settings_foreach_t)(void *data, const char *name, int type);
|
||||
|
||||
FLUIDSYNTH_API
|
||||
void fluid_settings_foreach(fluid_settings_t* settings, void* data,
|
||||
|
|
|
@ -49,7 +49,7 @@ extern "C" {
|
|||
|
||||
/**
|
||||
* Channel information structure for fluid_synth_get_channel_info().
|
||||
* @since @NEXT_RELEASE@
|
||||
* @since 2.0.0
|
||||
*/
|
||||
struct _fluid_synth_channel_info_t
|
||||
{
|
||||
|
@ -63,7 +63,7 @@ struct _fluid_synth_channel_info_t
|
|||
};
|
||||
|
||||
FLUIDSYNTH_API fluid_synth_t* new_fluid_synth(fluid_settings_t* settings);
|
||||
FLUIDSYNTH_API int delete_fluid_synth(fluid_synth_t* synth);
|
||||
FLUIDSYNTH_API void delete_fluid_synth(fluid_synth_t* synth);
|
||||
FLUIDSYNTH_API fluid_settings_t* fluid_synth_get_settings(fluid_synth_t* synth);
|
||||
|
||||
|
||||
|
@ -295,6 +295,7 @@ enum fluid_synth_add_mod {
|
|||
};
|
||||
|
||||
FLUIDSYNTH_API int fluid_synth_add_default_mod(fluid_synth_t* synth, fluid_mod_t* mod, int mode);
|
||||
FLUIDSYNTH_API int fluid_synth_remove_default_mod(fluid_synth_t* synth, const fluid_mod_t* mod);
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -61,6 +61,7 @@ typedef struct _fluid_cmd_handler_t fluid_cmd_handler_t; /**< Shell Comma
|
|||
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 use by the sequencer and #fluid_event_t, obtained by fluid_sequencer_register_client() and fluid_sequencer_register_fluidsynth() */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -108,11 +108,6 @@ if ( MIDISHARE_SUPPORT )
|
|||
endif ( MIDISHARE_SUPPORT )
|
||||
|
||||
set ( config_SOURCES ${CMAKE_BINARY_DIR}/config.h )
|
||||
if ( MSVC )
|
||||
set ( config_SOURCES
|
||||
${config_SOURCES}
|
||||
${CMAKE_BINARY_DIR}/config_win32.h )
|
||||
endif ( MSVC )
|
||||
|
||||
set ( libfluidsynth_SOURCES
|
||||
utils/fluid_conv.c
|
||||
|
@ -268,6 +263,15 @@ elseif ( OS2 )
|
|||
VERSION ${LIB_VERSION_INFO}
|
||||
SOVERSION ${LIB_VERSION_CURRENT}
|
||||
)
|
||||
elseif ( WIN32 )
|
||||
set_target_properties ( libfluidsynth
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_NAME "fluidsynth"
|
||||
PREFIX "lib"
|
||||
OUTPUT_NAME "fluidsynth-${LIB_VERSION_CURRENT}"
|
||||
VERSION ${LIB_VERSION_INFO}
|
||||
SOVERSION ${LIB_VERSION_CURRENT}
|
||||
)
|
||||
else ( MACOSX_FRAMEWORK )
|
||||
set_target_properties ( libfluidsynth
|
||||
PROPERTIES
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
* 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include "fluidsynth_priv.h"
|
||||
#include "fluid_cmd.h"
|
||||
#include "fluid_synth.h"
|
||||
|
@ -303,6 +301,8 @@ fluid_shell_init(fluid_shell_t* shell,
|
|||
void
|
||||
delete_fluid_shell(fluid_shell_t* shell)
|
||||
{
|
||||
fluid_return_if_fail(shell != NULL);
|
||||
|
||||
if (shell->thread != NULL) {
|
||||
delete_fluid_thread(shell->thread);
|
||||
}
|
||||
|
@ -345,7 +345,7 @@ fluid_shell_run(void* data)
|
|||
break;
|
||||
|
||||
case FLUID_FAILED: /* erronous command */
|
||||
errors |= TRUE;
|
||||
errors = TRUE;
|
||||
case FLUID_OK: /* valid command */
|
||||
break;
|
||||
|
||||
|
@ -1442,7 +1442,7 @@ struct _fluid_handle_settings_data_t {
|
|||
fluid_ostream_t out;
|
||||
};
|
||||
|
||||
static void fluid_handle_settings_iter1(void* data, char* name, int type)
|
||||
static void fluid_handle_settings_iter1(void* data, const char* name, int type)
|
||||
{
|
||||
struct _fluid_handle_settings_data_t* d = (struct _fluid_handle_settings_data_t*) data;
|
||||
|
||||
|
@ -1452,7 +1452,7 @@ static void fluid_handle_settings_iter1(void* data, char* name, int type)
|
|||
}
|
||||
}
|
||||
|
||||
static void fluid_handle_settings_iter2(void* data, char* name, int type)
|
||||
static void fluid_handle_settings_iter2(void* data, const char* name, int type)
|
||||
{
|
||||
struct _fluid_handle_settings_data_t* d = (struct _fluid_handle_settings_data_t*) data;
|
||||
|
||||
|
@ -1515,7 +1515,7 @@ struct _fluid_handle_option_data_t {
|
|||
fluid_ostream_t out;
|
||||
};
|
||||
|
||||
void fluid_handle_print_option(void* data, char* name, char* option)
|
||||
void fluid_handle_print_option(void* data, const char* name, const char* option)
|
||||
{
|
||||
struct _fluid_handle_option_data_t* d = (struct _fluid_handle_option_data_t*) data;
|
||||
|
||||
|
@ -2240,16 +2240,11 @@ fluid_cmd_t* fluid_cmd_copy(fluid_cmd_t* cmd)
|
|||
|
||||
void delete_fluid_cmd(fluid_cmd_t* cmd)
|
||||
{
|
||||
if (cmd->name) {
|
||||
fluid_return_if_fail(cmd != NULL);
|
||||
FLUID_FREE(cmd->name);
|
||||
}
|
||||
if (cmd->topic) {
|
||||
FLUID_FREE(cmd->topic);
|
||||
}
|
||||
if (cmd->help) {
|
||||
FLUID_FREE(cmd->help);
|
||||
}
|
||||
FLUID_FREE(cmd);
|
||||
FLUID_FREE(cmd);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2316,6 +2311,8 @@ fluid_cmd_handler_t* new_fluid_cmd_handler(fluid_synth_t* synth, fluid_midi_rout
|
|||
void
|
||||
delete_fluid_cmd_handler(fluid_cmd_handler_t* handler)
|
||||
{
|
||||
fluid_return_if_fail(handler != NULL);
|
||||
|
||||
delete_fluid_hashtable(handler->commands);
|
||||
FLUID_FREE(handler);
|
||||
}
|
||||
|
@ -2426,9 +2423,7 @@ new_fluid_server(fluid_settings_t* settings,
|
|||
void
|
||||
delete_fluid_server(fluid_server_t* server)
|
||||
{
|
||||
if (server == NULL) {
|
||||
return;
|
||||
}
|
||||
fluid_return_if_fail(server != NULL);
|
||||
|
||||
fluid_server_close(server);
|
||||
|
||||
|
@ -2441,9 +2436,7 @@ static void fluid_server_close(fluid_server_t* server)
|
|||
fluid_list_t* clients;
|
||||
fluid_client_t* client;
|
||||
|
||||
if (server == NULL) {
|
||||
return;
|
||||
}
|
||||
fluid_return_if_fail(server != NULL);
|
||||
|
||||
fluid_mutex_lock(server->mutex);
|
||||
clients = server->clients;
|
||||
|
@ -2565,10 +2558,8 @@ error_recovery:
|
|||
|
||||
void fluid_client_quit(fluid_client_t* client)
|
||||
{
|
||||
if (client->socket != INVALID_SOCKET) {
|
||||
fluid_socket_close(client->socket);
|
||||
client->socket = INVALID_SOCKET;
|
||||
}
|
||||
|
||||
FLUID_LOG(FLUID_DBG, "fluid_client_quit: joining");
|
||||
fluid_thread_join(client->thread);
|
||||
FLUID_LOG(FLUID_DBG, "fluid_client_quit: done");
|
||||
|
@ -2576,20 +2567,12 @@ void fluid_client_quit(fluid_client_t* client)
|
|||
|
||||
void delete_fluid_client(fluid_client_t* client)
|
||||
{
|
||||
if(client->handler != NULL)
|
||||
{
|
||||
fluid_return_if_fail(client != NULL);
|
||||
|
||||
delete_fluid_cmd_handler(client->handler);
|
||||
client->handler = NULL;
|
||||
}
|
||||
|
||||
if (client->socket != INVALID_SOCKET) {
|
||||
fluid_socket_close(client->socket);
|
||||
client->socket = INVALID_SOCKET;
|
||||
}
|
||||
if (client->thread != NULL) {
|
||||
delete_fluid_thread(client->thread);
|
||||
client->thread = NULL;
|
||||
}
|
||||
|
||||
FLUID_FREE(client);
|
||||
}
|
||||
|
||||
|
|
|
@ -326,9 +326,7 @@ fluid_file_set_encoding_quality(fluid_file_renderer_t* r, double q)
|
|||
*/
|
||||
void delete_fluid_file_renderer(fluid_file_renderer_t* dev)
|
||||
{
|
||||
if (dev == NULL) {
|
||||
return;
|
||||
}
|
||||
fluid_return_if_fail(dev != NULL);
|
||||
|
||||
#if LIBSNDFILE_SUPPORT
|
||||
if (dev->sndfile != NULL) {
|
||||
|
@ -342,12 +340,8 @@ void delete_fluid_file_renderer(fluid_file_renderer_t* dev)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (dev->buf != NULL) {
|
||||
FLUID_FREE(dev->buf);
|
||||
}
|
||||
|
||||
FLUID_FREE(dev->buf);
|
||||
FLUID_FREE(dev);
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -203,14 +203,12 @@ fluid_ladspa_fx_t *new_fluid_ladspa_fx(fluid_real_t sample_rate, int audio_group
|
|||
fx->run_finished_mutex = new_fluid_cond_mutex();
|
||||
if (fx->run_finished_mutex == NULL)
|
||||
{
|
||||
delete_fluid_ladspa_fx(fx);
|
||||
return NULL;
|
||||
goto error_recovery;
|
||||
}
|
||||
fx->run_finished_cond = new_fluid_cond();
|
||||
if (fx->run_finished_cond == NULL)
|
||||
{
|
||||
delete_fluid_ladspa_fx(fx);
|
||||
return NULL;
|
||||
goto error_recovery;
|
||||
}
|
||||
|
||||
/* Finally, create the nodes that carry audio in and out of the LADSPA unit.
|
||||
|
@ -218,11 +216,14 @@ fluid_ladspa_fx_t *new_fluid_ladspa_fx(fluid_real_t sample_rate, int audio_group
|
|||
* fluid_ladspa_reset but only when this LADSPA fx instance is deleted. */
|
||||
if (create_input_output_nodes(fx) != FLUID_OK)
|
||||
{
|
||||
delete_fluid_ladspa_fx(fx);
|
||||
return NULL;
|
||||
goto error_recovery;
|
||||
}
|
||||
|
||||
return fx;
|
||||
|
||||
error_recovery:
|
||||
delete_fluid_ladspa_fx(fx);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -239,6 +240,7 @@ fluid_ladspa_fx_t *new_fluid_ladspa_fx(fluid_real_t sample_rate, int audio_group
|
|||
void delete_fluid_ladspa_fx(fluid_ladspa_fx_t *fx)
|
||||
{
|
||||
int i;
|
||||
fluid_return_if_fail (fx != NULL);
|
||||
|
||||
clear_ladspa(fx);
|
||||
|
||||
|
@ -1224,15 +1226,9 @@ new_fluid_ladspa_plugin(fluid_ladspa_fx_t *fx, const fluid_ladspa_lib_t *lib, co
|
|||
|
||||
static void delete_fluid_ladspa_plugin(fluid_ladspa_plugin_t *plugin)
|
||||
{
|
||||
if (plugin == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
fluid_return_if_fail (plugin != NULL);
|
||||
|
||||
if (plugin->port_nodes != NULL)
|
||||
{
|
||||
FLUID_FREE(plugin->port_nodes);
|
||||
}
|
||||
FLUID_FREE(plugin->port_nodes);
|
||||
|
||||
if (plugin->handle != NULL && plugin->desc != NULL && plugin->desc->cleanup != NULL)
|
||||
{
|
||||
|
@ -1299,16 +1295,10 @@ static fluid_ladspa_node_t *new_fluid_ladspa_node(fluid_ladspa_fx_t *fx, const c
|
|||
|
||||
static void delete_fluid_ladspa_node(fluid_ladspa_node_t *node)
|
||||
{
|
||||
if (node->buf != NULL)
|
||||
{
|
||||
FLUID_FREE(node->buf);
|
||||
}
|
||||
|
||||
if (node->name != NULL)
|
||||
{
|
||||
FLUID_FREE(node->name);
|
||||
}
|
||||
fluid_return_if_fail(node != NULL);
|
||||
|
||||
FLUID_FREE(node->buf);
|
||||
FLUID_FREE(node->name);
|
||||
FLUID_FREE(node);
|
||||
}
|
||||
|
||||
|
@ -1374,11 +1364,9 @@ static fluid_ladspa_lib_t *new_fluid_ladspa_lib(fluid_ladspa_fx_t *fx, const cha
|
|||
|
||||
static void delete_fluid_ladspa_lib(fluid_ladspa_lib_t *lib)
|
||||
{
|
||||
if (lib->filename != NULL)
|
||||
{
|
||||
FLUID_FREE(lib->filename);
|
||||
}
|
||||
|
||||
fluid_return_if_fail(lib != NULL);
|
||||
|
||||
FLUID_FREE(lib->filename);
|
||||
FLUID_FREE(lib);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,8 +29,6 @@
|
|||
|
||||
#ifdef DBUS_SUPPORT
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include "fluid_rtkit.h"
|
||||
|
||||
|
||||
|
@ -41,9 +39,6 @@
|
|||
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
|
|
|
@ -43,6 +43,9 @@
|
|||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#cmakedefine HAVE_INTTYPES_H @HAVE_INTTYPES_H@
|
||||
|
||||
/* Define to 1 if you have the <io.h> header file. */
|
||||
#cmakedefine HAVE_IO_H @HAVE_IO_H@
|
||||
|
||||
/* whether or not we are supporting lash */
|
||||
#cmakedefine HAVE_LASH @HAVE_LASH@
|
||||
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
#cmakedefine HAVE_IO_H @HAVE_IO_H@
|
||||
|
||||
#define DSOUND_SUPPORT 1
|
||||
#define WINMIDI_SUPPORT 1
|
||||
|
||||
#define STDIN_FILENO 0
|
||||
#define STDOUT_FILENO 1
|
||||
#define STDERR_FILENO 2
|
||||
|
||||
#pragma warning(disable : 4244)
|
||||
#pragma warning(disable : 4101)
|
||||
#pragma warning(disable : 4305)
|
||||
#pragma warning(disable : 4996)
|
||||
|
||||
typedef int socklen_t;
|
|
@ -32,7 +32,7 @@ typedef struct _fluid_audriver_definition_t
|
|||
fluid_audio_driver_t* (*new2)(fluid_settings_t* settings,
|
||||
fluid_audio_func_t func,
|
||||
void* data);
|
||||
int (*free)(fluid_audio_driver_t* driver);
|
||||
void (*free)(fluid_audio_driver_t* driver);
|
||||
void (*settings)(fluid_settings_t* settings);
|
||||
} fluid_audriver_definition_t;
|
||||
|
||||
|
@ -42,7 +42,7 @@ fluid_audio_driver_t* new_fluid_pulse_audio_driver(fluid_settings_t* settings,
|
|||
fluid_synth_t* synth);
|
||||
fluid_audio_driver_t* new_fluid_pulse_audio_driver2(fluid_settings_t* settings,
|
||||
fluid_audio_func_t func, void* data);
|
||||
int delete_fluid_pulse_audio_driver(fluid_audio_driver_t* p);
|
||||
void delete_fluid_pulse_audio_driver(fluid_audio_driver_t* p);
|
||||
void fluid_pulse_audio_driver_settings(fluid_settings_t* settings);
|
||||
#endif
|
||||
|
||||
|
@ -51,7 +51,7 @@ fluid_audio_driver_t* new_fluid_alsa_audio_driver(fluid_settings_t* settings,
|
|||
fluid_synth_t* synth);
|
||||
fluid_audio_driver_t* new_fluid_alsa_audio_driver2(fluid_settings_t* settings,
|
||||
fluid_audio_func_t func, void* data);
|
||||
int delete_fluid_alsa_audio_driver(fluid_audio_driver_t* p);
|
||||
void delete_fluid_alsa_audio_driver(fluid_audio_driver_t* p);
|
||||
void fluid_alsa_audio_driver_settings(fluid_settings_t* settings);
|
||||
#endif
|
||||
|
||||
|
@ -60,7 +60,7 @@ fluid_audio_driver_t* new_fluid_oss_audio_driver(fluid_settings_t* settings,
|
|||
fluid_synth_t* synth);
|
||||
fluid_audio_driver_t* new_fluid_oss_audio_driver2(fluid_settings_t* settings,
|
||||
fluid_audio_func_t func, void* data);
|
||||
int delete_fluid_oss_audio_driver(fluid_audio_driver_t* p);
|
||||
void delete_fluid_oss_audio_driver(fluid_audio_driver_t* p);
|
||||
void fluid_oss_audio_driver_settings(fluid_settings_t* settings);
|
||||
#endif
|
||||
|
||||
|
@ -70,14 +70,14 @@ fluid_audio_driver_t* new_fluid_core_audio_driver(fluid_settings_t* settings,
|
|||
fluid_audio_driver_t* new_fluid_core_audio_driver2(fluid_settings_t* settings,
|
||||
fluid_audio_func_t func,
|
||||
void* data);
|
||||
int delete_fluid_core_audio_driver(fluid_audio_driver_t* p);
|
||||
void delete_fluid_core_audio_driver(fluid_audio_driver_t* p);
|
||||
void fluid_core_audio_driver_settings(fluid_settings_t* settings);
|
||||
#endif
|
||||
|
||||
#if DSOUND_SUPPORT
|
||||
fluid_audio_driver_t* new_fluid_dsound_audio_driver(fluid_settings_t* settings,
|
||||
fluid_synth_t* synth);
|
||||
int delete_fluid_dsound_audio_driver(fluid_audio_driver_t* p);
|
||||
void delete_fluid_dsound_audio_driver(fluid_audio_driver_t* p);
|
||||
void fluid_dsound_audio_driver_settings(fluid_settings_t* settings);
|
||||
#endif
|
||||
|
||||
|
@ -85,14 +85,14 @@ void fluid_dsound_audio_driver_settings(fluid_settings_t* settings);
|
|||
void fluid_portaudio_driver_settings (fluid_settings_t *settings);
|
||||
fluid_audio_driver_t* new_fluid_portaudio_driver(fluid_settings_t* settings,
|
||||
fluid_synth_t* synth);
|
||||
int delete_fluid_portaudio_driver(fluid_audio_driver_t* p);
|
||||
void delete_fluid_portaudio_driver(fluid_audio_driver_t* p);
|
||||
#endif
|
||||
|
||||
#if JACK_SUPPORT
|
||||
fluid_audio_driver_t* new_fluid_jack_audio_driver(fluid_settings_t* settings, fluid_synth_t* synth);
|
||||
fluid_audio_driver_t* new_fluid_jack_audio_driver2(fluid_settings_t* settings,
|
||||
fluid_audio_func_t func, void* data);
|
||||
int delete_fluid_jack_audio_driver(fluid_audio_driver_t* p);
|
||||
void delete_fluid_jack_audio_driver(fluid_audio_driver_t* p);
|
||||
void fluid_jack_audio_driver_settings(fluid_settings_t* settings);
|
||||
#endif
|
||||
|
||||
|
@ -102,20 +102,20 @@ fluid_audio_driver_t* new_fluid_sndmgr_audio_driver(fluid_settings_t* settings,
|
|||
fluid_audio_driver_t* new_fluid_sndmgr_audio_driver2(fluid_settings_t* settings,
|
||||
fluid_audio_func_t func,
|
||||
void* data);
|
||||
int delete_fluid_sndmgr_audio_driver(fluid_audio_driver_t* p);
|
||||
void delete_fluid_sndmgr_audio_driver(fluid_audio_driver_t* p);
|
||||
#endif
|
||||
|
||||
#if DART_SUPPORT
|
||||
fluid_audio_driver_t* new_fluid_dart_audio_driver(fluid_settings_t* settings,
|
||||
fluid_synth_t* synth);
|
||||
int delete_fluid_dart_audio_driver(fluid_audio_driver_t* p);
|
||||
void delete_fluid_dart_audio_driver(fluid_audio_driver_t* p);
|
||||
void fluid_dart_audio_driver_settings(fluid_settings_t* settings);
|
||||
#endif
|
||||
|
||||
#if AUFILE_SUPPORT
|
||||
fluid_audio_driver_t* new_fluid_file_audio_driver(fluid_settings_t* settings,
|
||||
fluid_synth_t* synth);
|
||||
int delete_fluid_file_audio_driver(fluid_audio_driver_t* p);
|
||||
void delete_fluid_file_audio_driver(fluid_audio_driver_t* p);
|
||||
#endif
|
||||
|
||||
/* Available audio drivers, listed in order of preference */
|
||||
|
@ -369,6 +369,7 @@ void
|
|||
delete_fluid_audio_driver(fluid_audio_driver_t* driver)
|
||||
{
|
||||
unsigned int i;
|
||||
fluid_return_if_fail(driver != NULL);
|
||||
|
||||
for (i = 0; i < FLUID_N_ELEMENTS(fluid_audio_drivers); i++) {
|
||||
if (fluid_audio_drivers[i].name == driver->name) {
|
||||
|
|
|
@ -70,7 +70,7 @@ fluid_audio_driver_t* new_fluid_alsa_audio_driver(fluid_settings_t* settings,
|
|||
fluid_audio_driver_t* new_fluid_alsa_audio_driver2(fluid_settings_t* settings,
|
||||
fluid_audio_func_t func, void* data);
|
||||
|
||||
int delete_fluid_alsa_audio_driver(fluid_audio_driver_t* p);
|
||||
void delete_fluid_alsa_audio_driver(fluid_audio_driver_t* p);
|
||||
void fluid_alsa_audio_driver_settings(fluid_settings_t* settings);
|
||||
static fluid_thread_return_t fluid_alsa_audio_run_float(void* d);
|
||||
static fluid_thread_return_t fluid_alsa_audio_run_s16(void* d);
|
||||
|
@ -117,7 +117,7 @@ fluid_midi_driver_t* new_fluid_alsa_rawmidi_driver(fluid_settings_t* settings,
|
|||
handle_midi_event_func_t handler,
|
||||
void* event_handler_data);
|
||||
|
||||
int delete_fluid_alsa_rawmidi_driver(fluid_midi_driver_t* p);
|
||||
void delete_fluid_alsa_rawmidi_driver(fluid_midi_driver_t* p);
|
||||
static fluid_thread_return_t fluid_alsa_midi_run(void* d);
|
||||
|
||||
|
||||
|
@ -133,12 +133,14 @@ typedef struct {
|
|||
fluid_thread_t *thread;
|
||||
fluid_atomic_int_t should_quit;
|
||||
int port_count;
|
||||
int autoconn_inputs;
|
||||
snd_seq_addr_t autoconn_dest;
|
||||
} fluid_alsa_seq_driver_t;
|
||||
|
||||
fluid_midi_driver_t* new_fluid_alsa_seq_driver(fluid_settings_t* settings,
|
||||
handle_midi_event_func_t handler,
|
||||
void* data);
|
||||
int delete_fluid_alsa_seq_driver(fluid_midi_driver_t* p);
|
||||
void delete_fluid_alsa_seq_driver(fluid_midi_driver_t* p);
|
||||
static fluid_thread_return_t fluid_alsa_seq_run(void* d);
|
||||
|
||||
/**************************************************************
|
||||
|
@ -318,13 +320,10 @@ new_fluid_alsa_audio_driver2(fluid_settings_t* settings,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
int delete_fluid_alsa_audio_driver(fluid_audio_driver_t* p)
|
||||
void delete_fluid_alsa_audio_driver(fluid_audio_driver_t* p)
|
||||
{
|
||||
fluid_alsa_audio_driver_t* dev = (fluid_alsa_audio_driver_t*) p;
|
||||
|
||||
if (dev == NULL) {
|
||||
return FLUID_OK;
|
||||
}
|
||||
fluid_return_if_fail(dev != NULL);
|
||||
|
||||
dev->cont = 0;
|
||||
|
||||
|
@ -335,8 +334,6 @@ int delete_fluid_alsa_audio_driver(fluid_audio_driver_t* p)
|
|||
snd_pcm_close (dev->pcm);
|
||||
|
||||
FLUID_FREE(dev);
|
||||
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
/* handle error after an ALSA write call */
|
||||
|
@ -649,15 +646,11 @@ new_fluid_alsa_rawmidi_driver(fluid_settings_t* settings,
|
|||
/*
|
||||
* delete_fluid_alsa_rawmidi_driver
|
||||
*/
|
||||
int
|
||||
void
|
||||
delete_fluid_alsa_rawmidi_driver(fluid_midi_driver_t* p)
|
||||
{
|
||||
fluid_alsa_rawmidi_driver_t* dev;
|
||||
|
||||
dev = (fluid_alsa_rawmidi_driver_t*) p;
|
||||
if (dev == NULL) {
|
||||
return FLUID_OK;
|
||||
}
|
||||
fluid_alsa_rawmidi_driver_t* dev = (fluid_alsa_rawmidi_driver_t*) p;
|
||||
fluid_return_if_fail(dev != NULL);
|
||||
|
||||
/* cancel the thread and wait for it before cleaning up */
|
||||
fluid_atomic_int_set(&dev->should_quit, 1);
|
||||
|
@ -672,7 +665,6 @@ delete_fluid_alsa_rawmidi_driver(fluid_midi_driver_t* p)
|
|||
delete_fluid_midi_parser(dev->parser);
|
||||
}
|
||||
FLUID_FREE(dev);
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -757,47 +749,75 @@ static char* fluid_alsa_seq_full_name(char* id, int port, char* buf, int len)
|
|||
return buf;
|
||||
}
|
||||
|
||||
// Connect available ALSA MIDI inputs to port_info
|
||||
static void fluid_alsa_seq_autoconnect(fluid_alsa_seq_driver_t* dev, const snd_seq_port_info_t *port_info)
|
||||
// Connect a single port_info to autoconnect_dest if it has right type/capabilities
|
||||
static void fluid_alsa_seq_autoconnect_port_info(fluid_alsa_seq_driver_t* dev, snd_seq_port_info_t *pinfo)
|
||||
{
|
||||
snd_seq_t *seq = dev->seq_handle;
|
||||
snd_seq_port_subscribe_t *subs;
|
||||
snd_seq_t *seq = dev->seq_handle;
|
||||
const unsigned int needed_type = SND_SEQ_PORT_TYPE_MIDI_GENERIC;
|
||||
const unsigned int needed_cap = SND_SEQ_PORT_CAP_READ|SND_SEQ_PORT_CAP_SUBS_READ;
|
||||
const snd_seq_addr_t *sender = snd_seq_port_info_get_addr(pinfo);
|
||||
const char *pname = snd_seq_port_info_get_name(pinfo);
|
||||
if ((snd_seq_port_info_get_type(pinfo) & needed_type) != needed_type)
|
||||
return;
|
||||
if ((snd_seq_port_info_get_capability(pinfo) & needed_cap) != needed_cap)
|
||||
return;
|
||||
snd_seq_port_subscribe_alloca(&subs);
|
||||
snd_seq_port_subscribe_set_sender(subs, sender);
|
||||
snd_seq_port_subscribe_set_dest(subs, &dev->autoconn_dest);
|
||||
|
||||
if (snd_seq_get_port_subscription(seq, subs) == 0) {
|
||||
FLUID_LOG(FLUID_WARN, "Connection %s is already subscribed", pname);
|
||||
return;
|
||||
}
|
||||
if (snd_seq_subscribe_port(seq, subs) < 0) {
|
||||
FLUID_LOG(FLUID_ERR, "Connection of %s failed (%s)", pname, snd_strerror(errno));
|
||||
return;
|
||||
}
|
||||
FLUID_LOG(FLUID_INFO, "Connection of %s succeeded", pname);
|
||||
}
|
||||
|
||||
// Autoconnect a single client port (by id) to autoconnect_dest if it has right type/capabilities
|
||||
static void fluid_alsa_seq_autoconnect_port(fluid_alsa_seq_driver_t* dev, int client_id, int port_id)
|
||||
{
|
||||
int err;
|
||||
snd_seq_t *seq = dev->seq_handle;
|
||||
snd_seq_port_info_t *pinfo;
|
||||
|
||||
snd_seq_port_info_alloca(&pinfo);
|
||||
|
||||
if ((err = snd_seq_get_any_port_info(seq, client_id, port_id, pinfo)) < 0) {
|
||||
FLUID_LOG(FLUID_ERR, "snd_seq_get_any_port_info() failed: %s", snd_strerror(err));
|
||||
return;
|
||||
}
|
||||
fluid_alsa_seq_autoconnect_port_info(dev, pinfo);
|
||||
}
|
||||
|
||||
// Connect available ALSA MIDI inputs to the provided port_info
|
||||
static void fluid_alsa_seq_autoconnect(fluid_alsa_seq_driver_t* dev, const snd_seq_port_info_t *dest_pinfo)
|
||||
{
|
||||
int err;
|
||||
snd_seq_t *seq = dev->seq_handle;
|
||||
snd_seq_client_info_t *cinfo;
|
||||
snd_seq_port_info_t *pinfo;
|
||||
|
||||
snd_seq_port_subscribe_alloca(&subs);
|
||||
// subscribe to future new clients/ports showing up
|
||||
if ((err = snd_seq_connect_from(seq, snd_seq_port_info_get_port(dest_pinfo),
|
||||
SND_SEQ_CLIENT_SYSTEM, SND_SEQ_PORT_SYSTEM_ANNOUNCE)) < 0) {
|
||||
FLUID_LOG(FLUID_ERR, "snd_seq_connect_from() failed: %s", snd_strerror(err));
|
||||
}
|
||||
|
||||
snd_seq_client_info_alloca(&cinfo);
|
||||
snd_seq_port_info_alloca(&pinfo);
|
||||
|
||||
dev->autoconn_dest = *snd_seq_port_info_get_addr(dest_pinfo);
|
||||
|
||||
snd_seq_client_info_set_client(cinfo, -1);
|
||||
while (snd_seq_query_next_client(seq, cinfo) >= 0) {
|
||||
const snd_seq_addr_t *dest = snd_seq_port_info_get_addr(port_info);
|
||||
|
||||
snd_seq_port_info_set_client(pinfo, snd_seq_client_info_get_client(cinfo));
|
||||
snd_seq_port_info_set_port(pinfo, -1);
|
||||
while (snd_seq_query_next_port(seq, pinfo) >= 0) {
|
||||
const unsigned int needed_type = SND_SEQ_PORT_TYPE_MIDI_GENERIC;
|
||||
const unsigned int needed_cap = SND_SEQ_PORT_CAP_READ|SND_SEQ_PORT_CAP_SUBS_READ;
|
||||
const snd_seq_addr_t *sender = snd_seq_port_info_get_addr(pinfo);
|
||||
const char *pname = snd_seq_port_info_get_name(pinfo);
|
||||
|
||||
if ((snd_seq_port_info_get_type(pinfo) & needed_type) != needed_type)
|
||||
continue;
|
||||
if ((snd_seq_port_info_get_capability(pinfo) & needed_cap) != needed_cap)
|
||||
continue;
|
||||
|
||||
snd_seq_port_subscribe_set_sender(subs, sender);
|
||||
snd_seq_port_subscribe_set_dest(subs, dest);
|
||||
|
||||
if (snd_seq_get_port_subscription(seq, subs) == 0) {
|
||||
FLUID_LOG(FLUID_WARN, "Connection %s is already subscribed\n", pname);
|
||||
continue;
|
||||
}
|
||||
if (snd_seq_subscribe_port(seq, subs) < 0) {
|
||||
FLUID_LOG(FLUID_ERR, "Connection of %s failed (%s)\n", pname, snd_strerror(errno));
|
||||
continue;
|
||||
}
|
||||
FLUID_LOG(FLUID_INFO, "Connection of %s succeeded\n", pname);
|
||||
fluid_alsa_seq_autoconnect_port_info(dev, pinfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -810,7 +830,6 @@ new_fluid_alsa_seq_driver(fluid_settings_t* settings,
|
|||
handle_midi_event_func_t handler, void* data)
|
||||
{
|
||||
int i, err;
|
||||
int autoconn_inputs = 0;
|
||||
fluid_alsa_seq_driver_t* dev;
|
||||
int realtime_prio = 0;
|
||||
int count;
|
||||
|
@ -940,8 +959,8 @@ new_fluid_alsa_seq_driver(fluid_settings_t* settings,
|
|||
}
|
||||
}
|
||||
|
||||
fluid_settings_getint(settings, "midi.autoconnect", &autoconn_inputs);
|
||||
if (autoconn_inputs)
|
||||
fluid_settings_getint(settings, "midi.autoconnect", &dev->autoconn_inputs);
|
||||
if (dev->autoconn_inputs)
|
||||
fluid_alsa_seq_autoconnect(dev, port_info);
|
||||
|
||||
/* tell the lash server our client id */
|
||||
|
@ -979,15 +998,11 @@ new_fluid_alsa_seq_driver(fluid_settings_t* settings,
|
|||
/*
|
||||
* delete_fluid_alsa_seq_driver
|
||||
*/
|
||||
int
|
||||
void
|
||||
delete_fluid_alsa_seq_driver(fluid_midi_driver_t* p)
|
||||
{
|
||||
fluid_alsa_seq_driver_t* dev;
|
||||
|
||||
dev = (fluid_alsa_seq_driver_t*) p;
|
||||
if (dev == NULL) {
|
||||
return FLUID_OK;
|
||||
}
|
||||
fluid_alsa_seq_driver_t* dev = (fluid_alsa_seq_driver_t*) p;
|
||||
fluid_return_if_fail(dev != NULL);
|
||||
|
||||
/* cancel the thread and wait for it before cleaning up */
|
||||
fluid_atomic_int_set(&dev->should_quit, 1);
|
||||
|
@ -1002,7 +1017,6 @@ delete_fluid_alsa_seq_driver(fluid_midi_driver_t* p)
|
|||
if (dev->pfd) FLUID_FREE (dev->pfd);
|
||||
|
||||
FLUID_FREE(dev);
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1091,6 +1105,12 @@ fluid_alsa_seq_run(void* d)
|
|||
fluid_midi_event_set_sysex (&evt, (char *)(seq_ev->data.ext.ptr) + 1,
|
||||
seq_ev->data.ext.len - 2, FALSE);
|
||||
break;
|
||||
case SND_SEQ_EVENT_PORT_START: {
|
||||
if (dev->autoconn_inputs) {
|
||||
fluid_alsa_seq_autoconnect_port(dev, seq_ev->data.addr.client, seq_ev->data.addr.port);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
continue; /* unhandled event, next loop iteration */
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ typedef struct {
|
|||
fluid_audio_driver_t* new_fluid_file_audio_driver(fluid_settings_t* settings,
|
||||
fluid_synth_t* synth);
|
||||
|
||||
int delete_fluid_file_audio_driver(fluid_audio_driver_t* p);
|
||||
void delete_fluid_file_audio_driver(fluid_audio_driver_t* p);
|
||||
static int fluid_file_audio_run_s16(void* d, unsigned int msec);
|
||||
|
||||
/**************************************************************
|
||||
|
@ -100,24 +100,15 @@ new_fluid_file_audio_driver(fluid_settings_t* settings,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
int delete_fluid_file_audio_driver(fluid_audio_driver_t* p)
|
||||
void delete_fluid_file_audio_driver(fluid_audio_driver_t* p)
|
||||
{
|
||||
fluid_file_audio_driver_t* dev = (fluid_file_audio_driver_t*) p;
|
||||
fluid_return_if_fail(dev != NULL);
|
||||
|
||||
if (dev == NULL) {
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
if (dev->timer != NULL) {
|
||||
delete_fluid_timer(dev->timer);
|
||||
}
|
||||
|
||||
if (dev->renderer != NULL) {
|
||||
delete_fluid_file_renderer(dev->renderer);
|
||||
}
|
||||
|
||||
|
||||
FLUID_FREE(dev);
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
static int fluid_file_audio_run_s16(void* d, unsigned int clock_time)
|
||||
|
|
|
@ -66,7 +66,7 @@ OSStatus fluid_core_audio_callback (void *data,
|
|||
UInt32 inNumberFrames,
|
||||
AudioBufferList *ioData);
|
||||
|
||||
int delete_fluid_core_audio_driver (fluid_audio_driver_t* p);
|
||||
void delete_fluid_core_audio_driver (fluid_audio_driver_t* p);
|
||||
|
||||
|
||||
/**************************************************************
|
||||
|
@ -315,14 +315,11 @@ error_recovery:
|
|||
/*
|
||||
* delete_fluid_core_audio_driver
|
||||
*/
|
||||
int
|
||||
void
|
||||
delete_fluid_core_audio_driver(fluid_audio_driver_t* p)
|
||||
{
|
||||
fluid_core_audio_driver_t* dev = (fluid_core_audio_driver_t*) p;
|
||||
|
||||
if (dev == NULL) {
|
||||
return FLUID_OK;
|
||||
}
|
||||
fluid_return_if_fail(dev != NULL);
|
||||
|
||||
CloseComponent (dev->outputUnit);
|
||||
|
||||
|
@ -334,8 +331,6 @@ delete_fluid_core_audio_driver(fluid_audio_driver_t* p)
|
|||
}
|
||||
|
||||
FLUID_FREE(dev);
|
||||
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
OSStatus
|
||||
|
|
|
@ -61,7 +61,7 @@ typedef struct {
|
|||
|
||||
fluid_midi_driver_t* new_fluid_coremidi_driver(fluid_settings_t* settings,
|
||||
handle_midi_event_func_t handler, void* data);
|
||||
int delete_fluid_coremidi_driver(fluid_midi_driver_t* p);
|
||||
void delete_fluid_coremidi_driver(fluid_midi_driver_t* p);
|
||||
void fluid_coremidi_callback(const MIDIPacketList *list, void *p, void *src);
|
||||
|
||||
void fluid_coremidi_driver_settings(fluid_settings_t* settings)
|
||||
|
@ -158,10 +158,12 @@ error_recovery:
|
|||
/*
|
||||
* delete_fluid_coremidi_driver
|
||||
*/
|
||||
int
|
||||
void
|
||||
delete_fluid_coremidi_driver(fluid_midi_driver_t* p)
|
||||
{
|
||||
fluid_coremidi_driver_t* dev = (fluid_coremidi_driver_t*) p;
|
||||
fluid_return_if_fail(dev != NULL);
|
||||
|
||||
if (dev->client != NULL) {
|
||||
MIDIClientDispose(dev->client);
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ static ULONG (APIENTRY *m_pfnmciSendCommand)(USHORT, USHORT, ULONG, PVOID, USHOR
|
|||
fluid_audio_driver_t* new_fluid_dart_audio_driver(fluid_settings_t* settings,
|
||||
fluid_synth_t* synth);
|
||||
|
||||
int delete_fluid_dart_audio_driver(fluid_audio_driver_t* p);
|
||||
void delete_fluid_dart_audio_driver(fluid_audio_driver_t* p);
|
||||
void fluid_dart_audio_driver_settings(fluid_settings_t* settings);
|
||||
|
||||
static LONG APIENTRY fluid_dart_audio_run( ULONG ulStatus, PMCI_MIX_BUFFER pBuffer, ULONG ulFlags );
|
||||
|
@ -212,13 +212,10 @@ error_recovery:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
int delete_fluid_dart_audio_driver(fluid_audio_driver_t* p)
|
||||
void delete_fluid_dart_audio_driver(fluid_audio_driver_t* p)
|
||||
{
|
||||
fluid_dart_audio_driver_t* dev = (fluid_dart_audio_driver_t*) p;
|
||||
|
||||
if (dev == NULL) {
|
||||
return FLUID_OK;
|
||||
}
|
||||
fluid_return_if_fail(dev != NULL);
|
||||
|
||||
if (dev->usDeviceID != 0) {
|
||||
MCI_GENERIC_PARMS GenericParms;
|
||||
|
@ -241,7 +238,6 @@ int delete_fluid_dart_audio_driver(fluid_audio_driver_t* p)
|
|||
}
|
||||
|
||||
FLUID_FREE(dev);
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
static LONG APIENTRY fluid_dart_audio_run( ULONG ulStatus, PMCI_MIX_BUFFER pBuffer, ULONG ulFlags )
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
fluid_audio_driver_t*
|
||||
new_fluid_dsound_audio_driver(fluid_settings_t* settings, fluid_synth_t* synth);
|
||||
|
||||
int delete_fluid_dsound_audio_driver(fluid_audio_driver_t* data);
|
||||
void delete_fluid_dsound_audio_driver(fluid_audio_driver_t* data);
|
||||
DWORD WINAPI fluid_dsound_audio_run(LPVOID lpParameter);
|
||||
|
||||
HWND fluid_win32_get_window(void);
|
||||
|
@ -270,13 +270,10 @@ new_fluid_dsound_audio_driver(fluid_settings_t* settings, fluid_synth_t* synth)
|
|||
}
|
||||
|
||||
|
||||
int delete_fluid_dsound_audio_driver(fluid_audio_driver_t* d)
|
||||
void delete_fluid_dsound_audio_driver(fluid_audio_driver_t* d)
|
||||
{
|
||||
fluid_dsound_audio_driver_t* dev = (fluid_dsound_audio_driver_t*) d;
|
||||
|
||||
if (dev == NULL) {
|
||||
return FLUID_OK;
|
||||
}
|
||||
fluid_return_if_fail(dev != NULL);
|
||||
|
||||
/* tell the audio thread to stop its loop */
|
||||
dev->cont = 0;
|
||||
|
@ -292,9 +289,7 @@ int delete_fluid_dsound_audio_driver(fluid_audio_driver_t* d)
|
|||
|
||||
/* release all the allocated ressources */
|
||||
|
||||
if (dev->format != NULL) {
|
||||
FLUID_FREE(dev->format);
|
||||
}
|
||||
|
||||
if (dev->sec_buffer != NULL) {
|
||||
IDirectSoundBuffer_Stop(dev->sec_buffer);
|
||||
|
@ -308,10 +303,6 @@ int delete_fluid_dsound_audio_driver(fluid_audio_driver_t* d)
|
|||
}
|
||||
|
||||
FLUID_FREE(dev);
|
||||
|
||||
// fluid_win32_destroy_window();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
DWORD WINAPI fluid_dsound_audio_run(LPVOID lpParameter)
|
||||
|
|
|
@ -91,12 +91,12 @@ static int fluid_jack_client_register_ports (void *driver, int isaudio,
|
|||
fluid_settings_t *settings);
|
||||
fluid_audio_driver_t*
|
||||
new_fluid_jack_audio_driver2(fluid_settings_t* settings, fluid_audio_func_t func, void* data);
|
||||
int delete_fluid_jack_audio_driver(fluid_audio_driver_t* p);
|
||||
void delete_fluid_jack_audio_driver(fluid_audio_driver_t* p);
|
||||
void fluid_jack_driver_shutdown(void *arg);
|
||||
int fluid_jack_driver_srate(jack_nframes_t nframes, void *arg);
|
||||
int fluid_jack_driver_bufsize(jack_nframes_t nframes, void *arg);
|
||||
int fluid_jack_driver_process(jack_nframes_t nframes, void *arg);
|
||||
int delete_fluid_jack_midi_driver(fluid_midi_driver_t *p);
|
||||
void delete_fluid_jack_midi_driver(fluid_midi_driver_t *p);
|
||||
|
||||
|
||||
static fluid_mutex_t last_client_mutex = G_STATIC_MUTEX_INIT; /* Probably not necessary, but just in case drivers are created by multiple threads */
|
||||
|
@ -491,30 +491,20 @@ new_fluid_jack_audio_driver2(fluid_settings_t* settings, fluid_audio_func_t func
|
|||
/*
|
||||
* delete_fluid_jack_audio_driver
|
||||
*/
|
||||
int
|
||||
void
|
||||
delete_fluid_jack_audio_driver(fluid_audio_driver_t* p)
|
||||
{
|
||||
fluid_jack_audio_driver_t* dev = (fluid_jack_audio_driver_t*) p;
|
||||
|
||||
if (dev == NULL) return 0;
|
||||
fluid_return_if_fail (dev != NULL);
|
||||
|
||||
if (dev->client_ref != NULL)
|
||||
fluid_jack_client_close (dev->client_ref, dev);
|
||||
|
||||
if (dev->output_bufs)
|
||||
FLUID_FREE (dev->output_bufs);
|
||||
|
||||
if (dev->output_ports)
|
||||
FLUID_FREE (dev->output_ports);
|
||||
|
||||
if (dev->fx_bufs)
|
||||
FLUID_FREE(dev->fx_bufs);
|
||||
|
||||
if (dev->fx_ports)
|
||||
FLUID_FREE(dev->fx_ports);
|
||||
|
||||
FLUID_FREE(dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Process function for audio and MIDI Jack drivers */
|
||||
|
@ -674,20 +664,16 @@ new_fluid_jack_midi_driver (fluid_settings_t *settings,
|
|||
return (fluid_midi_driver_t *)dev;
|
||||
}
|
||||
|
||||
int
|
||||
void
|
||||
delete_fluid_jack_midi_driver(fluid_midi_driver_t *p)
|
||||
{
|
||||
fluid_jack_midi_driver_t *dev = (fluid_jack_midi_driver_t *)p;
|
||||
|
||||
if (dev == NULL) return FLUID_OK;
|
||||
fluid_return_if_fail (dev != NULL);
|
||||
|
||||
if (dev->client_ref != NULL)
|
||||
fluid_jack_client_close (dev->client_ref, dev);
|
||||
|
||||
if (dev->parser != NULL)
|
||||
delete_fluid_midi_parser (dev->parser);
|
||||
|
||||
|
||||
FLUID_FREE (dev);
|
||||
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
|
|
@ -27,13 +27,13 @@
|
|||
fluid_midi_driver_t* new_fluid_alsa_rawmidi_driver(fluid_settings_t* settings,
|
||||
handle_midi_event_func_t handler,
|
||||
void* event_handler_data);
|
||||
int delete_fluid_alsa_rawmidi_driver(fluid_midi_driver_t* p);
|
||||
void delete_fluid_alsa_rawmidi_driver(fluid_midi_driver_t* p);
|
||||
void fluid_alsa_rawmidi_driver_settings(fluid_settings_t* settings);
|
||||
|
||||
fluid_midi_driver_t* new_fluid_alsa_seq_driver(fluid_settings_t* settings,
|
||||
handle_midi_event_func_t handler,
|
||||
void* event_handler_data);
|
||||
int delete_fluid_alsa_seq_driver(fluid_midi_driver_t* p);
|
||||
void delete_fluid_alsa_seq_driver(fluid_midi_driver_t* p);
|
||||
void fluid_alsa_seq_driver_settings(fluid_settings_t* settings);
|
||||
#endif
|
||||
|
||||
|
@ -43,7 +43,7 @@ void fluid_jack_midi_driver_settings (fluid_settings_t *settings);
|
|||
fluid_midi_driver_t *new_fluid_jack_midi_driver (fluid_settings_t *settings,
|
||||
handle_midi_event_func_t handler,
|
||||
void *data);
|
||||
int delete_fluid_jack_midi_driver(fluid_midi_driver_t *p);
|
||||
void delete_fluid_jack_midi_driver(fluid_midi_driver_t *p);
|
||||
#endif
|
||||
|
||||
/* OSS */
|
||||
|
@ -51,7 +51,7 @@ int delete_fluid_jack_midi_driver(fluid_midi_driver_t *p);
|
|||
fluid_midi_driver_t* new_fluid_oss_midi_driver(fluid_settings_t* settings,
|
||||
handle_midi_event_func_t handler,
|
||||
void* event_handler_data);
|
||||
int delete_fluid_oss_midi_driver(fluid_midi_driver_t* p);
|
||||
void delete_fluid_oss_midi_driver(fluid_midi_driver_t* p);
|
||||
void fluid_oss_midi_driver_settings(fluid_settings_t* settings);
|
||||
#endif
|
||||
|
||||
|
@ -60,7 +60,7 @@ void fluid_oss_midi_driver_settings(fluid_settings_t* settings);
|
|||
fluid_midi_driver_t* new_fluid_winmidi_driver(fluid_settings_t* settings,
|
||||
handle_midi_event_func_t handler,
|
||||
void* event_handler_data);
|
||||
int delete_fluid_winmidi_driver(fluid_midi_driver_t* p);
|
||||
void delete_fluid_winmidi_driver(fluid_midi_driver_t* p);
|
||||
void fluid_winmidi_midi_driver_settings(fluid_settings_t* settings);
|
||||
#endif
|
||||
|
||||
|
@ -69,7 +69,7 @@ void fluid_winmidi_midi_driver_settings(fluid_settings_t* settings);
|
|||
fluid_midi_driver_t* new_fluid_midishare_midi_driver(fluid_settings_t* settings,
|
||||
handle_midi_event_func_t handler,
|
||||
void* event_handler_data);
|
||||
int delete_fluid_midishare_midi_driver(fluid_midi_driver_t* p);
|
||||
void delete_fluid_midishare_midi_driver(fluid_midi_driver_t* p);
|
||||
#endif
|
||||
|
||||
/* definitions for the CoreMidi driver */
|
||||
|
@ -77,7 +77,7 @@ int delete_fluid_midishare_midi_driver(fluid_midi_driver_t* p);
|
|||
fluid_midi_driver_t* new_fluid_coremidi_driver(fluid_settings_t* settings,
|
||||
handle_midi_event_func_t handler,
|
||||
void* event_handler_data);
|
||||
int delete_fluid_coremidi_driver(fluid_midi_driver_t* p);
|
||||
void delete_fluid_coremidi_driver(fluid_midi_driver_t* p);
|
||||
void fluid_coremidi_driver_settings(fluid_settings_t* settings);
|
||||
#endif
|
||||
|
||||
|
@ -90,7 +90,7 @@ struct fluid_mdriver_definition_t {
|
|||
fluid_midi_driver_t* (*new)(fluid_settings_t* settings,
|
||||
handle_midi_event_func_t event_handler,
|
||||
void* event_handler_data);
|
||||
int (*free)(fluid_midi_driver_t* p);
|
||||
void (*free)(fluid_midi_driver_t* p);
|
||||
void (*settings)(fluid_settings_t* settings);
|
||||
};
|
||||
|
||||
|
@ -234,6 +234,7 @@ fluid_midi_driver_t* new_fluid_midi_driver(fluid_settings_t* settings, handle_mi
|
|||
void delete_fluid_midi_driver(fluid_midi_driver_t* driver)
|
||||
{
|
||||
unsigned int i;
|
||||
fluid_return_if_fail(driver != NULL);
|
||||
|
||||
for (i = 0; i < FLUID_N_ELEMENTS(fluid_midi_drivers); i++) {
|
||||
if (fluid_midi_drivers[i].name == driver->name) {
|
||||
|
|
|
@ -69,7 +69,7 @@ fluid_midi_driver_t* new_fluid_midishare_midi_driver(fluid_settings_t* settings,
|
|||
handle_midi_event_func_t handler,
|
||||
void* data);
|
||||
|
||||
int delete_fluid_midishare_midi_driver(fluid_midi_driver_t* p);
|
||||
void delete_fluid_midishare_midi_driver(fluid_midi_driver_t* p);
|
||||
int fluid_midishare_midi_driver_status(fluid_midi_driver_t* p);
|
||||
|
||||
static void fluid_midishare_midi_driver_receive(short ref);
|
||||
|
@ -156,14 +156,10 @@ new_fluid_midishare_midi_driver(fluid_settings_t* settings,
|
|||
/*
|
||||
* delete_fluid_midishare_midi_driver
|
||||
*/
|
||||
int delete_fluid_midishare_midi_driver(fluid_midi_driver_t* p)
|
||||
void delete_fluid_midishare_midi_driver(fluid_midi_driver_t* p)
|
||||
{
|
||||
fluid_midishare_midi_driver_t* dev;
|
||||
|
||||
dev = (fluid_midishare_midi_driver_t*) p;
|
||||
if (dev == NULL) {
|
||||
return FLUID_OK;
|
||||
}
|
||||
fluid_midishare_midi_driver_t* dev = (fluid_midishare_midi_driver_t*) p;
|
||||
fluid_return_if_fail(dev != NULL);
|
||||
|
||||
if (dev->filter) MidiFreeFilter(dev->filter);
|
||||
|
||||
|
@ -183,7 +179,6 @@ int delete_fluid_midishare_midi_driver(fluid_midi_driver_t* p)
|
|||
dev->status = FLUID_MIDI_DONE;
|
||||
|
||||
FLUID_FREE(dev);
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ typedef struct {
|
|||
float* buffers[2];
|
||||
} fluid_oss_audio_driver_t;
|
||||
|
||||
int delete_fluid_oss_audio_driver(fluid_audio_driver_t* p);
|
||||
void delete_fluid_oss_audio_driver(fluid_audio_driver_t* p);
|
||||
|
||||
/* local utilities */
|
||||
static int fluid_oss_set_queue_size(fluid_oss_audio_driver_t* dev, int ss, int ch, int qs, int bs);
|
||||
|
@ -93,7 +93,7 @@ typedef struct {
|
|||
fluid_midi_driver_t*
|
||||
new_fluid_oss_midi_driver(fluid_settings_t* settings,
|
||||
handle_midi_event_func_t handler, void* data);
|
||||
int delete_fluid_oss_midi_driver(fluid_midi_driver_t* p);
|
||||
void delete_fluid_oss_midi_driver(fluid_midi_driver_t* p);
|
||||
int fluid_oss_midi_driver_status(fluid_midi_driver_t* p);
|
||||
static fluid_thread_return_t fluid_oss_midi_run(void* d);
|
||||
|
||||
|
@ -368,14 +368,11 @@ error_recovery:
|
|||
/*
|
||||
* delete_fluid_oss_audio_driver
|
||||
*/
|
||||
int
|
||||
void
|
||||
delete_fluid_oss_audio_driver(fluid_audio_driver_t* p)
|
||||
{
|
||||
fluid_oss_audio_driver_t* dev = (fluid_oss_audio_driver_t*) p;
|
||||
|
||||
if (dev == NULL) {
|
||||
return FLUID_OK;
|
||||
}
|
||||
fluid_return_if_fail(dev != NULL);
|
||||
|
||||
dev->cont = 0;
|
||||
|
||||
|
@ -385,11 +382,9 @@ delete_fluid_oss_audio_driver(fluid_audio_driver_t* p)
|
|||
if (dev->dspfd >= 0) {
|
||||
close(dev->dspfd);
|
||||
}
|
||||
if (dev->buffer != NULL) {
|
||||
FLUID_FREE(dev->buffer);
|
||||
}
|
||||
|
||||
FLUID_FREE(dev->buffer);
|
||||
FLUID_FREE(dev);
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -596,15 +591,11 @@ new_fluid_oss_midi_driver(fluid_settings_t* settings,
|
|||
/*
|
||||
* delete_fluid_oss_midi_driver
|
||||
*/
|
||||
int
|
||||
void
|
||||
delete_fluid_oss_midi_driver(fluid_midi_driver_t* p)
|
||||
{
|
||||
fluid_oss_midi_driver_t* dev;
|
||||
|
||||
dev = (fluid_oss_midi_driver_t*) p;
|
||||
if (dev == NULL) {
|
||||
return FLUID_OK;
|
||||
}
|
||||
fluid_oss_midi_driver_t* dev = (fluid_oss_midi_driver_t*) p;
|
||||
fluid_return_if_fail(dev != NULL);
|
||||
|
||||
/* cancel the thread and wait for it before cleaning up */
|
||||
dev->status = FLUID_MIDI_DONE;
|
||||
|
@ -615,11 +606,9 @@ delete_fluid_oss_midi_driver(fluid_midi_driver_t* p)
|
|||
if (dev->fd >= 0) {
|
||||
close(dev->fd);
|
||||
}
|
||||
if (dev->parser != NULL) {
|
||||
delete_fluid_midi_parser(dev->parser);
|
||||
}
|
||||
|
||||
delete_fluid_midi_parser(dev->parser);
|
||||
FLUID_FREE(dev);
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -57,7 +57,7 @@ static int
|
|||
fluid_portaudio_run (const void *input, void *output, unsigned long frameCount,
|
||||
const PaStreamCallbackTimeInfo* timeInfo,
|
||||
PaStreamCallbackFlags statusFlags, void *userData);
|
||||
int delete_fluid_portaudio_driver (fluid_audio_driver_t *p);
|
||||
void delete_fluid_portaudio_driver (fluid_audio_driver_t *p);
|
||||
|
||||
#define PORTAUDIO_DEFAULT_DEVICE "PortAudio Default"
|
||||
|
||||
|
@ -249,14 +249,12 @@ fluid_portaudio_run (const void *input, void *output, unsigned long frameCount,
|
|||
/*
|
||||
* delete_fluid_portaudio_driver
|
||||
*/
|
||||
int
|
||||
void
|
||||
delete_fluid_portaudio_driver(fluid_audio_driver_t *p)
|
||||
{
|
||||
fluid_portaudio_driver_t* dev;
|
||||
fluid_portaudio_driver_t* dev = (fluid_portaudio_driver_t*)p;
|
||||
PaError err;
|
||||
|
||||
dev = (fluid_portaudio_driver_t*)p;
|
||||
if (dev == NULL) return FLUID_OK;
|
||||
fluid_return_if_fail(dev != NULL);
|
||||
|
||||
/* PortAudio section */
|
||||
if (dev->stream) Pa_CloseStream (dev->stream);
|
||||
|
@ -267,7 +265,6 @@ delete_fluid_portaudio_driver(fluid_audio_driver_t *p)
|
|||
printf ("PortAudio termination error: %s\n", Pa_GetErrorText (err) );
|
||||
|
||||
FLUID_FREE (dev);
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
#endif /*#if PORTAUDIO_SUPPORT */
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#if PULSE_SUPPORT
|
||||
|
||||
#include <pulse/simple.h>
|
||||
#include <pulse/error.h>
|
||||
|
||||
|
@ -53,7 +55,7 @@ fluid_audio_driver_t* new_fluid_pulse_audio_driver(fluid_settings_t* settings,
|
|||
fluid_synth_t* synth);
|
||||
fluid_audio_driver_t* new_fluid_pulse_audio_driver2(fluid_settings_t* settings,
|
||||
fluid_audio_func_t func, void* data);
|
||||
int delete_fluid_pulse_audio_driver(fluid_audio_driver_t* p);
|
||||
void delete_fluid_pulse_audio_driver(fluid_audio_driver_t* p);
|
||||
void fluid_pulse_audio_driver_settings(fluid_settings_t* settings);
|
||||
static fluid_thread_return_t fluid_pulse_audio_run(void* d);
|
||||
static fluid_thread_return_t fluid_pulse_audio_run2(void* d);
|
||||
|
@ -174,13 +176,10 @@ new_fluid_pulse_audio_driver2(fluid_settings_t* settings,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
int delete_fluid_pulse_audio_driver(fluid_audio_driver_t* p)
|
||||
void delete_fluid_pulse_audio_driver(fluid_audio_driver_t* p)
|
||||
{
|
||||
fluid_pulse_audio_driver_t* dev = (fluid_pulse_audio_driver_t*) p;
|
||||
|
||||
if (dev == NULL) {
|
||||
return FLUID_OK;
|
||||
}
|
||||
fluid_return_if_fail(dev != NULL);
|
||||
|
||||
dev->cont = 0;
|
||||
|
||||
|
@ -191,8 +190,6 @@ int delete_fluid_pulse_audio_driver(fluid_audio_driver_t* p)
|
|||
pa_simple_free(dev->pa_handle);
|
||||
|
||||
FLUID_FREE(dev);
|
||||
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
/* Thread without audio callback, more efficient */
|
||||
|
@ -287,3 +284,6 @@ fluid_pulse_audio_run2(void* d)
|
|||
|
||||
return FLUID_THREAD_RETURN_VALUE;
|
||||
}
|
||||
|
||||
#endif /* PULSE_SUPPORT */
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ fluid_audio_driver_t* new_fluid_sndmgr_audio_driver2(fluid_settings_t* settings,
|
|||
fluid_audio_func_t func,
|
||||
void* data);
|
||||
|
||||
int delete_fluid_sndmgr_audio_driver(fluid_audio_driver_t* p);
|
||||
void delete_fluid_sndmgr_audio_driver(fluid_audio_driver_t* p);
|
||||
void pascal fluid_sndmgr_callback(SndChannelPtr chan, SndDoubleBufferPtr doubleBuffer);
|
||||
Fixed fluid_sndmgr_double_to_fix(long double theLD);
|
||||
|
||||
|
@ -226,36 +226,29 @@ new_fluid_sndmgr_audio_driver2(fluid_settings_t* settings, fluid_audio_func_t fu
|
|||
/*
|
||||
* delete_fluid_sndmgr_audio_driver
|
||||
*/
|
||||
int delete_fluid_sndmgr_audio_driver(fluid_audio_driver_t* p)
|
||||
void delete_fluid_sndmgr_audio_driver(fluid_audio_driver_t* p)
|
||||
{
|
||||
fluid_sndmgr_audio_driver_t* dev = (fluid_sndmgr_audio_driver_t*) p;
|
||||
fluid_return_if_fail(dev != NULL);
|
||||
|
||||
if (dev != NULL) {
|
||||
if (dev->channel != NULL) {
|
||||
SndDisposeChannel(dev->channel, 1);
|
||||
}
|
||||
|
||||
if (dev->doubleCallbackProc != NULL) {
|
||||
DisposeRoutineDescriptor(dev->doubleCallbackProc);
|
||||
}
|
||||
if (dev->doubleHeader != NULL) {
|
||||
if(dev->doubleHeader->dbhBufferPtr[0] != NULL) {
|
||||
FLUID_FREE(dev->doubleHeader->dbhBufferPtr[0]);
|
||||
}
|
||||
if (dev->doubleHeader->dbhBufferPtr[1] != NULL) {
|
||||
FLUID_FREE(dev->doubleHeader->dbhBufferPtr[1]);
|
||||
}
|
||||
FLUID_FREE(dev->doubleHeader);
|
||||
|
||||
if (dev->doubleHeader != NULL)
|
||||
{
|
||||
FLUID_FREE(dev->doubleHeader->dbhBufferPtr[0]);
|
||||
FLUID_FREE(dev->doubleHeader->dbhBufferPtr[1]);
|
||||
FLUID_FREE(dev->doubleHeader);
|
||||
}
|
||||
if (dev->convbuffers[0] != NULL) {
|
||||
FLUID_FREE(dev->convbuffers[0]);
|
||||
}
|
||||
if (dev->convbuffers[1] != NULL) {
|
||||
FLUID_FREE(dev->convbuffers[1]);
|
||||
}
|
||||
|
||||
|
||||
FLUID_FREE(dev->convbuffers[0]);
|
||||
FLUID_FREE(dev->convbuffers[1]);
|
||||
FLUID_FREE(dev);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -72,7 +72,7 @@ static char fluid_winmidi_error_buffer[256];
|
|||
fluid_midi_driver_t* new_fluid_winmidi_driver(fluid_settings_t* settings,
|
||||
handle_midi_event_func_t handler, void* data);
|
||||
|
||||
int delete_fluid_winmidi_driver(fluid_midi_driver_t* p);
|
||||
void delete_fluid_winmidi_driver(fluid_midi_driver_t* p);
|
||||
|
||||
void CALLBACK fluid_winmidi_callback(HMIDIIN hmi, UINT wMsg, DWORD_PTR dwInstance,
|
||||
DWORD_PTR msg, DWORD_PTR extra);
|
||||
|
@ -243,10 +243,12 @@ new_fluid_winmidi_driver(fluid_settings_t* settings,
|
|||
/*
|
||||
* delete_fluid_winmidi_driver
|
||||
*/
|
||||
int
|
||||
void
|
||||
delete_fluid_winmidi_driver(fluid_midi_driver_t* p)
|
||||
{
|
||||
fluid_winmidi_driver_t* dev = (fluid_winmidi_driver_t*) p;
|
||||
fluid_return_if_fail (dev != NULL);
|
||||
|
||||
if (dev->hmidiin != NULL) {
|
||||
fluid_atomic_int_set (&dev->closing, TRUE);
|
||||
|
||||
|
@ -268,7 +270,6 @@ delete_fluid_winmidi_driver(fluid_midi_driver_t* p)
|
|||
if (dev->cond) delete_fluid_cond (dev->cond);
|
||||
|
||||
FLUID_FREE(dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void CALLBACK
|
||||
|
|
|
@ -39,10 +39,6 @@
|
|||
|
||||
#include "fluidsynth.h"
|
||||
|
||||
#if defined(WIN32) && !defined(MINGW32)
|
||||
#include "config_win32.h"
|
||||
#endif
|
||||
|
||||
#include "fluid_lash.h"
|
||||
|
||||
#ifndef WITH_MIDI
|
||||
|
@ -141,7 +137,7 @@ typedef struct
|
|||
|
||||
/* Function to display each string option value */
|
||||
static void
|
||||
settings_option_foreach_func (void *data, char *name, char *option)
|
||||
settings_option_foreach_func (void *data, const char *name, const char *option)
|
||||
{
|
||||
OptionBag *bag = data;
|
||||
|
||||
|
@ -154,7 +150,7 @@ settings_option_foreach_func (void *data, char *name, char *option)
|
|||
|
||||
/* fluid_settings_foreach function for displaying option help "-o help" */
|
||||
static void
|
||||
settings_foreach_func (void *data, char *name, int type)
|
||||
settings_foreach_func (void *data, const char *name, int type)
|
||||
{
|
||||
fluid_settings_t *settings = (fluid_settings_t *)data;
|
||||
double dmin, dmax, ddef;
|
||||
|
|
|
@ -118,11 +118,9 @@ fluid_file_read_full(fluid_file fp, size_t* length)
|
|||
void
|
||||
delete_fluid_midi_file (fluid_midi_file *mf)
|
||||
{
|
||||
if (mf == NULL) {
|
||||
return;
|
||||
}
|
||||
fluid_return_if_fail(mf != NULL);
|
||||
|
||||
FLUID_FREE(mf);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -801,10 +799,11 @@ new_fluid_midi_event ()
|
|||
* @param evt MIDI event structure
|
||||
* @return Always returns #FLUID_OK
|
||||
*/
|
||||
int
|
||||
void
|
||||
delete_fluid_midi_event(fluid_midi_event_t *evt)
|
||||
{
|
||||
fluid_midi_event_t *temp;
|
||||
fluid_return_if_fail(evt != NULL);
|
||||
|
||||
while (evt) {
|
||||
temp = evt->next;
|
||||
|
@ -816,7 +815,6 @@ delete_fluid_midi_event(fluid_midi_event_t *evt)
|
|||
FLUID_FREE(evt);
|
||||
evt = temp;
|
||||
}
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1061,17 +1059,14 @@ new_fluid_track(int num)
|
|||
/*
|
||||
* delete_fluid_track
|
||||
*/
|
||||
int
|
||||
void
|
||||
delete_fluid_track(fluid_track_t *track)
|
||||
{
|
||||
if (track->name != NULL) {
|
||||
FLUID_FREE(track->name);
|
||||
}
|
||||
if (track->first != NULL) {
|
||||
delete_fluid_midi_event(track->first);
|
||||
}
|
||||
fluid_return_if_fail(track != NULL);
|
||||
|
||||
FLUID_FREE(track->name);
|
||||
delete_fluid_midi_event(track->first);
|
||||
FLUID_FREE(track);
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1202,6 +1197,13 @@ fluid_track_send_events(fluid_track_t *track,
|
|||
{
|
||||
int status = FLUID_OK;
|
||||
fluid_midi_event_t *event;
|
||||
int seeking = player->seek_ticks >= 0;
|
||||
|
||||
if (seeking) {
|
||||
ticks = player->seek_ticks; /* update target ticks */
|
||||
if (track->ticks > ticks)
|
||||
fluid_track_reset (track); /* reset track if seeking backwards */
|
||||
}
|
||||
|
||||
while (1) {
|
||||
|
||||
|
@ -1228,6 +1230,9 @@ fluid_track_send_events(fluid_track_t *track,
|
|||
else if (event->type == MIDI_SET_TEMPO) {
|
||||
fluid_player_set_midi_tempo(player, event->param1);
|
||||
}
|
||||
else if (seeking && (event->type == NOTE_ON || event->type == NOTE_OFF)) {
|
||||
/* skip on/off messages */
|
||||
}
|
||||
else {
|
||||
if (player->playback_callback)
|
||||
player->playback_callback(player->playback_userdata, event);
|
||||
|
@ -1276,6 +1281,7 @@ new_fluid_player(fluid_synth_t *synth)
|
|||
player->deltatime = 4.0;
|
||||
player->cur_msec = 0;
|
||||
player->cur_ticks = 0;
|
||||
player->seek_ticks = -1;
|
||||
fluid_player_set_playback_callback(player, fluid_synth_handle_midi_event, synth);
|
||||
|
||||
player->use_system_timer = fluid_settings_str_equal(synth->settings,
|
||||
|
@ -1292,15 +1298,14 @@ new_fluid_player(fluid_synth_t *synth)
|
|||
* @param player MIDI player instance
|
||||
* @return Always returns #FLUID_OK
|
||||
*/
|
||||
int
|
||||
void
|
||||
delete_fluid_player(fluid_player_t *player)
|
||||
{
|
||||
fluid_list_t *q;
|
||||
fluid_playlist_item* pi;
|
||||
|
||||
if (player == NULL) {
|
||||
return FLUID_OK;
|
||||
}
|
||||
fluid_return_if_fail(player != NULL);
|
||||
|
||||
fluid_player_stop(player);
|
||||
fluid_player_reset(player);
|
||||
|
||||
|
@ -1315,7 +1320,6 @@ delete_fluid_player(fluid_player_t *player)
|
|||
}
|
||||
|
||||
FLUID_FREE(player);
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1596,7 +1600,6 @@ fluid_player_playlist_load(fluid_player_t *player, unsigned int msec)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* fluid_player_callback
|
||||
*/
|
||||
|
@ -1626,6 +1629,10 @@ fluid_player_callback(void *data, unsigned int msec)
|
|||
+ (int) ((double) (player->cur_msec - player->start_msec)
|
||||
/ player->deltatime + 0.5)); /* 0.5 to average overall error when casting */
|
||||
|
||||
if (player->seek_ticks >= 0) {
|
||||
fluid_synth_all_sounds_off(synth, -1); /* avoid hanging notes */
|
||||
}
|
||||
|
||||
for (i = 0; i < player->ntracks; i++) {
|
||||
if (!fluid_track_eot(player->track[i])) {
|
||||
status = FLUID_PLAYER_PLAYING;
|
||||
|
@ -1636,6 +1643,14 @@ fluid_player_callback(void *data, unsigned int msec)
|
|||
}
|
||||
}
|
||||
|
||||
if (player->seek_ticks >= 0) {
|
||||
player->start_ticks = player->seek_ticks; /* tick position of last tempo value (which is now) */
|
||||
player->cur_ticks = player->seek_ticks;
|
||||
player->begin_msec = msec; /* only used to calculate the duration of playing */
|
||||
player->start_msec = msec; /* should be the (synth)-time of the last tempo change */
|
||||
player->seek_ticks = -1; /* clear seek_ticks */
|
||||
}
|
||||
|
||||
if (status == FLUID_PLAYER_DONE) {
|
||||
FLUID_LOG(FLUID_DBG, "%s: %d: Duration=%.3f sec", __FILE__,
|
||||
__LINE__, (msec - player->begin_msec) / 1000.0);
|
||||
|
@ -1715,6 +1730,26 @@ fluid_player_get_status(fluid_player_t *player)
|
|||
return player->status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Seek in the currently playing file.
|
||||
* @param player MIDI player instance
|
||||
* @param ticks the position to seek to in the current file
|
||||
* @return #FLUID_FAILED if ticks is negative or after the latest tick of the file,
|
||||
* #FLUID_OK otherwise
|
||||
* @since 2.0.0
|
||||
*
|
||||
* The actual seek is performed during the player_callback.
|
||||
*/
|
||||
int fluid_player_seek(fluid_player_t *player, int ticks)
|
||||
{
|
||||
if (ticks < 0 || ticks > fluid_player_get_total_ticks(player)) {
|
||||
return FLUID_FAILED;
|
||||
}
|
||||
player->seek_ticks = ticks;
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Enable looping of a MIDI player
|
||||
* @param player MIDI player instance
|
||||
|
@ -1862,11 +1897,12 @@ new_fluid_midi_parser ()
|
|||
/*
|
||||
* delete_fluid_midi_parser
|
||||
*/
|
||||
int
|
||||
void
|
||||
delete_fluid_midi_parser(fluid_midi_parser_t *parser)
|
||||
{
|
||||
fluid_return_if_fail(parser != NULL);
|
||||
|
||||
FLUID_FREE(parser);
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
typedef struct _fluid_midi_parser_t fluid_midi_parser_t;
|
||||
|
||||
fluid_midi_parser_t* new_fluid_midi_parser(void);
|
||||
int delete_fluid_midi_parser(fluid_midi_parser_t* parser);
|
||||
void delete_fluid_midi_parser(fluid_midi_parser_t* parser);
|
||||
fluid_midi_event_t* fluid_midi_parser_parse(fluid_midi_parser_t* parser, unsigned char c);
|
||||
|
||||
|
||||
|
@ -248,7 +248,7 @@ struct _fluid_track_t {
|
|||
typedef struct _fluid_track_t fluid_track_t;
|
||||
|
||||
fluid_track_t* new_fluid_track(int num);
|
||||
int delete_fluid_track(fluid_track_t* track);
|
||||
void delete_fluid_track(fluid_track_t* track);
|
||||
int fluid_track_set_name(fluid_track_t* track, char* name);
|
||||
char* fluid_track_get_name(fluid_track_t* track);
|
||||
int fluid_track_add_event(fluid_track_t* track, fluid_midi_event_t* evt);
|
||||
|
@ -296,6 +296,7 @@ struct _fluid_player_t {
|
|||
char send_program_change; /* should we ignore the program changes? */
|
||||
char use_system_timer; /* if zero, use sample timers, otherwise use system clock timer */
|
||||
char reset_synth_between_songs; /* 1 if system reset should be sent to the synth between songs. */
|
||||
int seek_ticks; /* new position in tempo ticks (midi ticks) for seeking */
|
||||
int start_ticks; /* the number of tempo ticks passed at the last tempo change */
|
||||
int cur_ticks; /* the number of tempo ticks passed */
|
||||
int begin_msec; /* the time (msec) of the beginning of the file */
|
||||
|
|
|
@ -32,8 +32,6 @@
|
|||
* fluid_midi_router
|
||||
*/
|
||||
struct _fluid_midi_router_t {
|
||||
fluid_synth_t* synth;
|
||||
|
||||
fluid_mutex_t rules_mutex;
|
||||
fluid_midi_router_rule_t *rules[FLUID_MIDI_ROUTER_RULE_COUNT]; /* List of rules for each rule type */
|
||||
fluid_midi_router_rule_t *free_rules; /* List of rules to free (was waiting for final events which were received) */
|
||||
|
@ -100,8 +98,7 @@ new_fluid_midi_router(fluid_settings_t *settings, handle_midi_event_func_t handl
|
|||
fluid_settings_getint(settings, "synth.midi-channels", &router->nr_midi_channels);
|
||||
|
||||
fluid_mutex_init (router->rules_mutex);
|
||||
|
||||
router->synth = (fluid_synth_t *)event_handler_data;
|
||||
|
||||
router->event_handler = handler;
|
||||
router->event_handler_data = event_handler_data;
|
||||
|
||||
|
@ -125,14 +122,14 @@ new_fluid_midi_router(fluid_settings_t *settings, handle_midi_event_func_t handl
|
|||
* @return Returns #FLUID_OK on success, #FLUID_FAILED otherwise (only if NULL
|
||||
* \a router passed really)
|
||||
*/
|
||||
int
|
||||
void
|
||||
delete_fluid_midi_router (fluid_midi_router_t *router)
|
||||
{
|
||||
fluid_midi_router_rule_t *rule;
|
||||
fluid_midi_router_rule_t *next_rule;
|
||||
int i;
|
||||
|
||||
fluid_return_val_if_fail (router != NULL, FLUID_FAILED);
|
||||
fluid_return_if_fail (router != NULL);
|
||||
|
||||
for (i = 0; i < FLUID_MIDI_ROUTER_RULE_COUNT; i++)
|
||||
{
|
||||
|
@ -145,8 +142,6 @@ delete_fluid_midi_router (fluid_midi_router_t *router)
|
|||
|
||||
fluid_mutex_destroy (router->rules_mutex);
|
||||
FLUID_FREE (router);
|
||||
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -46,7 +46,7 @@ struct _fluid_sequencer_t {
|
|||
int useSystemTimer;
|
||||
double scale; // ticks per second
|
||||
fluid_list_t* clients;
|
||||
short clientsID;
|
||||
fluid_seq_id_t clientsID;
|
||||
/* for queue + heap */
|
||||
fluid_evt_entry* preQueue;
|
||||
fluid_evt_entry* preQueueLast;
|
||||
|
@ -67,7 +67,7 @@ struct _fluid_sequencer_t {
|
|||
|
||||
/* Private data for clients */
|
||||
typedef struct _fluid_sequencer_client_t {
|
||||
short id;
|
||||
fluid_seq_id_t id;
|
||||
char* name;
|
||||
fluid_event_callback_t callback;
|
||||
void* data;
|
||||
|
@ -77,7 +77,7 @@ typedef struct _fluid_sequencer_client_t {
|
|||
static short _fluid_seq_queue_init(fluid_sequencer_t* seq, int nbEvents);
|
||||
static void _fluid_seq_queue_end(fluid_sequencer_t* seq);
|
||||
static short _fluid_seq_queue_pre_insert(fluid_sequencer_t* seq, fluid_event_t * evt);
|
||||
static void _fluid_seq_queue_pre_remove(fluid_sequencer_t* seq, short src, short dest, int type);
|
||||
static void _fluid_seq_queue_pre_remove(fluid_sequencer_t* seq, fluid_seq_id_t src, fluid_seq_id_t dest, int type);
|
||||
static int _fluid_seq_queue_process(void* data, unsigned int msec); // callback from timer
|
||||
static void _fluid_seq_queue_insert_entry(fluid_sequencer_t* seq, fluid_evt_entry * evtentry);
|
||||
static void _fluid_seq_queue_remove_entries_matching(fluid_sequencer_t* seq, fluid_evt_entry* temp);
|
||||
|
@ -154,10 +154,7 @@ new_fluid_sequencer2 (int use_system_timer)
|
|||
void
|
||||
delete_fluid_sequencer (fluid_sequencer_t* seq)
|
||||
{
|
||||
|
||||
if (seq == NULL) {
|
||||
return;
|
||||
}
|
||||
fluid_return_if_fail(seq != NULL);
|
||||
|
||||
/* cleanup clients */
|
||||
while (seq->clients) {
|
||||
|
@ -265,7 +262,7 @@ void fluid_seq_dotrace(fluid_sequencer_t* seq, char *fmt, ...) {}
|
|||
* Clients can be sources or destinations of events. Sources don't need to
|
||||
* register a callback.
|
||||
*/
|
||||
short
|
||||
fluid_seq_id_t
|
||||
fluid_sequencer_register_client (fluid_sequencer_t* seq, const char *name,
|
||||
fluid_event_callback_t callback, void* data)
|
||||
{
|
||||
|
@ -303,7 +300,7 @@ fluid_sequencer_register_client (fluid_sequencer_t* seq, const char *name,
|
|||
* @param id Client ID as returned by fluid_sequencer_register_client().
|
||||
*/
|
||||
void
|
||||
fluid_sequencer_unregister_client (fluid_sequencer_t* seq, short id)
|
||||
fluid_sequencer_unregister_client (fluid_sequencer_t* seq, fluid_seq_id_t id)
|
||||
{
|
||||
fluid_list_t *tmp;
|
||||
fluid_event_t* evt;
|
||||
|
@ -358,7 +355,7 @@ fluid_sequencer_count_clients(fluid_sequencer_t* seq)
|
|||
* @param index Index of register client
|
||||
* @return Client ID or #FLUID_FAILED if not found
|
||||
*/
|
||||
short fluid_sequencer_get_client_id (fluid_sequencer_t* seq, int index)
|
||||
fluid_seq_id_t fluid_sequencer_get_client_id (fluid_sequencer_t* seq, int index)
|
||||
{
|
||||
fluid_list_t *tmp = fluid_list_nth(seq->clients, index);
|
||||
if (tmp == NULL) {
|
||||
|
@ -377,7 +374,7 @@ short fluid_sequencer_get_client_id (fluid_sequencer_t* seq, int index)
|
|||
* be modified or freed.
|
||||
*/
|
||||
char *
|
||||
fluid_sequencer_get_client_name(fluid_sequencer_t* seq, int id)
|
||||
fluid_sequencer_get_client_name(fluid_sequencer_t* seq, fluid_seq_id_t id)
|
||||
{
|
||||
fluid_list_t *tmp;
|
||||
|
||||
|
@ -403,7 +400,7 @@ fluid_sequencer_get_client_name(fluid_sequencer_t* seq, int id)
|
|||
* @return TRUE if client is a destination client, FALSE otherwise or if not found
|
||||
*/
|
||||
int
|
||||
fluid_sequencer_client_is_dest(fluid_sequencer_t* seq, int id)
|
||||
fluid_sequencer_client_is_dest(fluid_sequencer_t* seq, fluid_seq_id_t id)
|
||||
{
|
||||
fluid_list_t *tmp;
|
||||
|
||||
|
@ -430,7 +427,7 @@ fluid_sequencer_client_is_dest(fluid_sequencer_t* seq, int id)
|
|||
void
|
||||
fluid_sequencer_send_now(fluid_sequencer_t* seq, fluid_event_t* evt)
|
||||
{
|
||||
short destID = fluid_event_get_dest(evt);
|
||||
fluid_seq_id_t destID = fluid_event_get_dest(evt);
|
||||
|
||||
/* find callback */
|
||||
fluid_list_t *tmp = seq->clients;
|
||||
|
@ -481,8 +478,8 @@ fluid_sequencer_send_at (fluid_sequencer_t* seq, fluid_event_t* evt,
|
|||
* @param type Event type to match or -1 for wildcard (#fluid_seq_event_type)
|
||||
*/
|
||||
void
|
||||
fluid_sequencer_remove_events (fluid_sequencer_t* seq, short source,
|
||||
short dest, int type)
|
||||
fluid_sequencer_remove_events (fluid_sequencer_t* seq, fluid_seq_id_t source,
|
||||
fluid_seq_id_t dest, int type)
|
||||
{
|
||||
_fluid_seq_queue_pre_remove(seq, source, dest, type);
|
||||
}
|
||||
|
@ -750,7 +747,7 @@ _fluid_seq_queue_pre_insert(fluid_sequencer_t* seq, fluid_event_t * evt)
|
|||
* May be called from the main thread (usually) but also recursively
|
||||
* from the queue thread, when a callback itself does an insert... */
|
||||
static void
|
||||
_fluid_seq_queue_pre_remove(fluid_sequencer_t* seq, short src, short dest, int type)
|
||||
_fluid_seq_queue_pre_remove(fluid_sequencer_t* seq, fluid_seq_id_t src, fluid_seq_id_t dest, int type)
|
||||
{
|
||||
fluid_evt_entry * evtentry = _fluid_seq_heap_get_free(seq->heap);
|
||||
if (evtentry == NULL) {
|
||||
|
@ -982,7 +979,7 @@ _fluid_seq_queue_insert_entry(fluid_sequencer_t* seq, fluid_evt_entry * evtentry
|
|||
}
|
||||
|
||||
static int
|
||||
_fluid_seq_queue_matchevent(fluid_event_t* evt, int templType, short templSrc, short templDest)
|
||||
_fluid_seq_queue_matchevent(fluid_event_t* evt, int templType, fluid_seq_id_t templSrc, fluid_seq_id_t templDest)
|
||||
{
|
||||
int eventType;
|
||||
|
||||
|
@ -1019,7 +1016,7 @@ _fluid_seq_queue_remove_entries_matching(fluid_sequencer_t* seq, fluid_evt_entry
|
|||
{
|
||||
/* we walk everything : this is slow, but that is life */
|
||||
int i, type;
|
||||
short src, dest;
|
||||
fluid_seq_id_t src, dest;
|
||||
|
||||
src = templ->evt.src;
|
||||
dest = templ->evt.dest;
|
||||
|
|
|
@ -41,7 +41,7 @@ struct _fluid_seqbind_t {
|
|||
fluid_synth_t* synth;
|
||||
fluid_sequencer_t* seq;
|
||||
fluid_sample_timer_t* sample_timer;
|
||||
short client_id;
|
||||
fluid_seq_id_t client_id;
|
||||
};
|
||||
typedef struct _fluid_seqbind_t fluid_seqbind_t;
|
||||
|
||||
|
@ -53,9 +53,7 @@ void fluid_seq_fluidsynth_callback(unsigned int time, fluid_event_t* event, flui
|
|||
void
|
||||
delete_fluid_seqbind(fluid_seqbind_t* seqbind)
|
||||
{
|
||||
if (seqbind == NULL) {
|
||||
return;
|
||||
}
|
||||
fluid_return_if_fail(seqbind != NULL);
|
||||
|
||||
if ((seqbind->client_id != -1) && (seqbind->seq != NULL)) {
|
||||
fluid_sequencer_unregister_client(seqbind->seq, seqbind->client_id);
|
||||
|
@ -77,7 +75,7 @@ delete_fluid_seqbind(fluid_seqbind_t* seqbind)
|
|||
* @param synth Synthesizer instance
|
||||
* @returns Sequencer client ID, or #FLUID_FAILED on error.
|
||||
*/
|
||||
short
|
||||
fluid_seq_id_t
|
||||
fluid_sequencer_register_fluidsynth (fluid_sequencer_t* seq, fluid_synth_t* synth)
|
||||
{
|
||||
fluid_seqbind_t* seqbind;
|
||||
|
@ -153,11 +151,11 @@ fluid_seq_fluidsynth_callback(unsigned int time, fluid_event_t* evt, fluid_seque
|
|||
break;
|
||||
|
||||
case FLUID_SEQ_ALLSOUNDSOFF:
|
||||
/* NYI */
|
||||
fluid_synth_all_sounds_off(synth, fluid_event_get_channel(evt));
|
||||
break;
|
||||
|
||||
case FLUID_SEQ_ALLNOTESOFF:
|
||||
fluid_synth_cc(synth, fluid_event_get_channel(evt), ALL_NOTES_OFF, 0);
|
||||
fluid_synth_all_notes_off(synth, fluid_event_get_channel(evt));
|
||||
break;
|
||||
|
||||
case FLUID_SEQ_BANKSELECT:
|
||||
|
@ -245,9 +243,10 @@ fluid_seq_fluidsynth_callback(unsigned int time, fluid_event_t* evt, fluid_seque
|
|||
}
|
||||
}
|
||||
|
||||
static int get_fluidsynth_dest(fluid_sequencer_t* seq)
|
||||
static fluid_seq_id_t get_fluidsynth_dest(fluid_sequencer_t* seq)
|
||||
{
|
||||
int i, id;
|
||||
int i;
|
||||
fluid_seq_id_t id;
|
||||
char* name;
|
||||
int j = fluid_sequencer_count_clients(seq);
|
||||
for (i = 0; i < j; i++) {
|
||||
|
|
|
@ -205,19 +205,11 @@ new_fluid_chorus(fluid_real_t sample_rate)
|
|||
void
|
||||
delete_fluid_chorus(fluid_chorus_t* chorus)
|
||||
{
|
||||
if (chorus == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (chorus->chorusbuf != NULL) {
|
||||
fluid_return_if_fail(chorus != NULL);
|
||||
|
||||
FLUID_FREE(chorus->chorusbuf);
|
||||
}
|
||||
|
||||
if (chorus->lookup_tab != NULL) {
|
||||
FLUID_FREE(chorus->lookup_tab);
|
||||
}
|
||||
|
||||
FLUID_FREE(chorus);
|
||||
FLUID_FREE(chorus);
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
* It is a 64 bit number. The higher 32 bits contain the 'index' (number of
|
||||
* the current sample), the lower 32 bits the fractional part.
|
||||
*/
|
||||
typedef unsigned long long fluid_phase_t;
|
||||
typedef uint64_t fluid_phase_t;
|
||||
|
||||
/* Purpose:
|
||||
* Set a to b.
|
||||
|
@ -56,26 +56,26 @@ typedef unsigned long long fluid_phase_t;
|
|||
*/
|
||||
#define fluid_phase_set(a,b) a=b;
|
||||
|
||||
#define fluid_phase_set_int(a, b) ((a) = ((unsigned long long)(b)) << 32)
|
||||
#define fluid_phase_set_int(a, b) ((a) = ((uint64_t)(b)) << 32)
|
||||
|
||||
/* Purpose:
|
||||
* Sets the phase a to a phase increment given in b.
|
||||
* For example, assume b is 0.9. After setting a to it, adding a to
|
||||
* the playing pointer will advance it by 0.9 samples. */
|
||||
#define fluid_phase_set_float(a, b) \
|
||||
(a) = (((unsigned long long)(b)) << 32) \
|
||||
| (uint32) (((double)(b) - (int)(b)) * (double)FLUID_FRACT_MAX)
|
||||
(a) = (((uint64_t)(b)) << 32) \
|
||||
| (uint32_t) (((double)(b) - (int)(b)) * (double)FLUID_FRACT_MAX)
|
||||
|
||||
/* create a fluid_phase_t from an index and a fraction value */
|
||||
#define fluid_phase_from_index_fract(index, fract) \
|
||||
((((unsigned long long)(index)) << 32) + (fract))
|
||||
((((uint64_t)(index)) << 32) + (fract))
|
||||
|
||||
/* Purpose:
|
||||
* Return the index and the fractional part, respectively. */
|
||||
#define fluid_phase_index(_x) \
|
||||
((unsigned int)((_x) >> 32))
|
||||
#define fluid_phase_fract(_x) \
|
||||
((uint32)((_x) & 0xFFFFFFFF))
|
||||
((uint32_t)((_x) & 0xFFFFFFFF))
|
||||
|
||||
/* Get the phase index with fractional rounding */
|
||||
#define fluid_phase_index_round(_x) \
|
||||
|
@ -108,7 +108,7 @@ typedef unsigned long long fluid_phase_t;
|
|||
/* Purpose:
|
||||
* Subtract b samples from a.
|
||||
*/
|
||||
#define fluid_phase_sub_int(a, b) ((a) -= (unsigned long long)(b) << 32)
|
||||
#define fluid_phase_sub_int(a, b) ((a) -= (uint64_t)(b) << 32)
|
||||
|
||||
/* Purpose:
|
||||
* Creates the expression a.index++. */
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
Translated to C by Peter Hanappe, Mai 2001
|
||||
*/
|
||||
|
||||
#include "fluid_sys.h"
|
||||
#include "fluid_rev.h"
|
||||
|
||||
/***************************************************************
|
||||
|
@ -334,6 +335,8 @@ void
|
|||
delete_fluid_revmodel(fluid_revmodel_t* rev)
|
||||
{
|
||||
int i;
|
||||
fluid_return_if_fail(rev != NULL);
|
||||
|
||||
for (i = 0; i < numcombs;i++) {
|
||||
fluid_comb_release(&rev->combL[i]);
|
||||
fluid_comb_release(&rev->combR[i]);
|
||||
|
|
|
@ -263,7 +263,7 @@ fluid_rvoice_check_sample_sanity(fluid_rvoice_t* voice)
|
|||
* quiet, 0 .. #FLUID_BUFSIZE-1 means voice finished.)
|
||||
*
|
||||
* Panning, reverb and chorus are processed separately. The dsp interpolation
|
||||
* routine is in (fluid_dsp_float.c).
|
||||
* routine is in (fluid_rvoice_dsp.c).
|
||||
*/
|
||||
int
|
||||
fluid_rvoice_write (fluid_rvoice_t* voice, fluid_real_t *dsp_buf)
|
||||
|
|
|
@ -280,7 +280,8 @@ fluid_rvoice_eventhandler_dispatch_all(fluid_rvoice_eventhandler_t* handler)
|
|||
void
|
||||
delete_fluid_rvoice_eventhandler(fluid_rvoice_eventhandler_t* handler)
|
||||
{
|
||||
if (handler == NULL) return;
|
||||
fluid_return_if_fail(handler != NULL);
|
||||
|
||||
delete_fluid_rvoice_mixer(handler->mixer);
|
||||
delete_fluid_ringbuffer(handler->queue);
|
||||
delete_fluid_ringbuffer(handler->finished_voices);
|
||||
|
|
|
@ -603,8 +603,8 @@ fluid_mixer_buffers_free(fluid_mixer_buffers_t* buffers)
|
|||
|
||||
void delete_fluid_rvoice_mixer(fluid_rvoice_mixer_t* mixer)
|
||||
{
|
||||
if (!mixer)
|
||||
return;
|
||||
fluid_return_if_fail(mixer != NULL);
|
||||
|
||||
fluid_rvoice_mixer_set_threads(mixer, 0, 0);
|
||||
#ifdef ENABLE_MIXER_THREADS
|
||||
if (mixer->thread_ready)
|
||||
|
|
|
@ -54,10 +54,10 @@ fluid_sfloader_t* new_fluid_defsfloader(fluid_settings_t* settings)
|
|||
|
||||
int delete_fluid_defsfloader(fluid_sfloader_t* loader)
|
||||
{
|
||||
if (loader) {
|
||||
fluid_return_val_if_fail(loader != NULL, 0);
|
||||
|
||||
FLUID_FREE(loader);
|
||||
}
|
||||
return FLUID_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
fluid_sfont_t* fluid_defsfloader_load(fluid_sfloader_t* loader, const char* filename)
|
||||
|
@ -101,7 +101,7 @@ fluid_sfont_t* fluid_defsfloader_load(fluid_sfloader_t* loader, const char* file
|
|||
|
||||
int fluid_defsfont_sfont_delete(fluid_sfont_t* sfont)
|
||||
{
|
||||
if (delete_fluid_defsfont(sfont->data) != 0) {
|
||||
if (delete_fluid_defsfont(sfont->data) != FLUID_OK) {
|
||||
return -1;
|
||||
}
|
||||
FLUID_FREE(sfont);
|
||||
|
@ -113,12 +113,6 @@ const char* fluid_defsfont_sfont_get_name(fluid_sfont_t* sfont)
|
|||
return fluid_defsfont_get_name((fluid_defsfont_t*) sfont->data);
|
||||
}
|
||||
|
||||
fluid_sample_t* fluid_defsfont_get_sample(fluid_defsfont_t* sfont, char *s)
|
||||
{
|
||||
/* This function is here just to avoid an ABI/SONAME bump, see ticket #98. Should never be used. */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
fluid_preset_t*
|
||||
fluid_defsfont_sfont_get_preset(fluid_sfont_t* sfont, unsigned int bank, unsigned int prenum)
|
||||
{
|
||||
|
@ -503,11 +497,13 @@ int delete_fluid_defsfont(fluid_defsfont_t* sfont)
|
|||
fluid_defpreset_t* preset;
|
||||
fluid_sample_t* sample;
|
||||
|
||||
fluid_return_val_if_fail(sfont != NULL, FLUID_OK);
|
||||
|
||||
/* Check that no samples are currently used */
|
||||
for (list = sfont->sample; list; list = fluid_list_next(list)) {
|
||||
sample = (fluid_sample_t*) fluid_list_get(list);
|
||||
if (fluid_sample_refcount(sample) != 0) {
|
||||
return -1;
|
||||
return FLUID_FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -627,8 +623,7 @@ int fluid_defsfont_load(fluid_defsfont_t* sfont, const char* file)
|
|||
|
||||
err_exit:
|
||||
sfont_close (sfdata);
|
||||
if (preset != NULL)
|
||||
delete_fluid_defpreset(preset);
|
||||
delete_fluid_defpreset(preset);
|
||||
return FLUID_FAILED;
|
||||
}
|
||||
|
||||
|
@ -753,27 +748,23 @@ new_fluid_defpreset(fluid_defsfont_t* sfont)
|
|||
/*
|
||||
* delete_fluid_defpreset
|
||||
*/
|
||||
int
|
||||
void
|
||||
delete_fluid_defpreset(fluid_defpreset_t* preset)
|
||||
{
|
||||
int err = FLUID_OK;
|
||||
fluid_preset_zone_t* zone;
|
||||
if (preset->global_zone != NULL) {
|
||||
if (delete_fluid_preset_zone(preset->global_zone) != FLUID_OK) {
|
||||
err = FLUID_FAILED;
|
||||
}
|
||||
|
||||
fluid_return_if_fail(preset != NULL);
|
||||
|
||||
delete_fluid_preset_zone(preset->global_zone);
|
||||
preset->global_zone = NULL;
|
||||
}
|
||||
|
||||
zone = preset->zone;
|
||||
while (zone != NULL) {
|
||||
preset->zone = zone->next;
|
||||
if (delete_fluid_preset_zone(zone) != FLUID_OK) {
|
||||
err = FLUID_FAILED;
|
||||
}
|
||||
delete_fluid_preset_zone(zone);
|
||||
zone = preset->zone;
|
||||
}
|
||||
FLUID_FREE(preset);
|
||||
return err;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1171,11 +1162,13 @@ new_fluid_preset_zone(char *name)
|
|||
/*
|
||||
* delete_fluid_preset_zone
|
||||
*/
|
||||
int
|
||||
void
|
||||
delete_fluid_preset_zone(fluid_preset_zone_t* zone)
|
||||
{
|
||||
fluid_mod_t *mod, *tmp;
|
||||
|
||||
fluid_return_if_fail(zone != NULL);
|
||||
|
||||
mod = zone->mod;
|
||||
while (mod) /* delete the modulators */
|
||||
{
|
||||
|
@ -1184,10 +1177,9 @@ delete_fluid_preset_zone(fluid_preset_zone_t* zone)
|
|||
fluid_mod_delete (tmp);
|
||||
}
|
||||
|
||||
if (zone->name) FLUID_FREE (zone->name);
|
||||
if (zone->inst) delete_fluid_inst (zone->inst);
|
||||
FLUID_FREE (zone->name);
|
||||
delete_fluid_inst (zone->inst);
|
||||
FLUID_FREE(zone);
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1408,27 +1400,23 @@ new_fluid_inst()
|
|||
/*
|
||||
* delete_fluid_inst
|
||||
*/
|
||||
int
|
||||
void
|
||||
delete_fluid_inst(fluid_inst_t* inst)
|
||||
{
|
||||
fluid_inst_zone_t* zone;
|
||||
int err = FLUID_OK;
|
||||
if (inst->global_zone != NULL) {
|
||||
if (delete_fluid_inst_zone(inst->global_zone) != FLUID_OK) {
|
||||
err = FLUID_FAILED;
|
||||
}
|
||||
|
||||
fluid_return_if_fail(inst != NULL);
|
||||
|
||||
delete_fluid_inst_zone(inst->global_zone);
|
||||
inst->global_zone = NULL;
|
||||
}
|
||||
|
||||
zone = inst->zone;
|
||||
while (zone != NULL) {
|
||||
inst->zone = zone->next;
|
||||
if (delete_fluid_inst_zone(zone) != FLUID_OK) {
|
||||
err = FLUID_FAILED;
|
||||
}
|
||||
delete_fluid_inst_zone(zone);
|
||||
zone = inst->zone;
|
||||
}
|
||||
FLUID_FREE(inst);
|
||||
return err;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1566,11 +1554,13 @@ new_fluid_inst_zone(char* name)
|
|||
/*
|
||||
* delete_fluid_inst_zone
|
||||
*/
|
||||
int
|
||||
void
|
||||
delete_fluid_inst_zone(fluid_inst_zone_t* zone)
|
||||
{
|
||||
fluid_mod_t *mod, *tmp;
|
||||
|
||||
fluid_return_if_fail(zone != NULL);
|
||||
|
||||
mod = zone->mod;
|
||||
while (mod) /* delete the modulators */
|
||||
{
|
||||
|
@ -1579,9 +1569,8 @@ delete_fluid_inst_zone(fluid_inst_zone_t* zone)
|
|||
fluid_mod_delete (tmp);
|
||||
}
|
||||
|
||||
if (zone->name) FLUID_FREE (zone->name);
|
||||
FLUID_FREE (zone->name);
|
||||
FLUID_FREE(zone);
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1812,19 +1801,19 @@ new_fluid_sample()
|
|||
/*
|
||||
* delete_fluid_sample
|
||||
*/
|
||||
int
|
||||
void
|
||||
delete_fluid_sample(fluid_sample_t* sample)
|
||||
{
|
||||
fluid_return_if_fail(sample != NULL);
|
||||
|
||||
if (sample->sampletype & FLUID_SAMPLETYPE_OGG_VORBIS)
|
||||
{
|
||||
#if LIBSNDFILE_SUPPORT
|
||||
if (sample->data)
|
||||
FLUID_FREE(sample->data);
|
||||
#endif
|
||||
}
|
||||
|
||||
FLUID_FREE(sample);
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1997,6 +1986,8 @@ fluid_sample_import_sfont(fluid_sample_t* sample, SFSample* sfsample, fluid_defs
|
|||
{
|
||||
FLUID_LOG (FLUID_WARN, _("Vorbis sample '%s' has invalid loop points"), sample->name);
|
||||
}
|
||||
#else
|
||||
return FLUID_FAILED;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -2047,14 +2038,14 @@ fluid_sample_import_sfont(fluid_sample_t* sample, SFSample* sfsample, fluid_defs
|
|||
} while(0)
|
||||
|
||||
#define READD(var,fd) do { \
|
||||
uint32 _temp; \
|
||||
uint32_t _temp; \
|
||||
if (!safe_fread(&_temp, 4, fd)) \
|
||||
return(FAIL); \
|
||||
var = FLUID_LE32TOH(_temp); \
|
||||
} while(0)
|
||||
|
||||
#define READW(var,fd) do { \
|
||||
uint16 _temp; \
|
||||
uint16_t _temp; \
|
||||
if (!safe_fread(&_temp, 2, fd)) \
|
||||
return(FAIL); \
|
||||
var = FLUID_LE16TOH(_temp); \
|
||||
|
|
|
@ -428,7 +428,7 @@ struct _fluid_defpreset_t
|
|||
};
|
||||
|
||||
fluid_defpreset_t* new_fluid_defpreset(fluid_defsfont_t* sfont);
|
||||
int delete_fluid_defpreset(fluid_defpreset_t* preset);
|
||||
void delete_fluid_defpreset(fluid_defpreset_t* preset);
|
||||
fluid_defpreset_t* fluid_defpreset_next(fluid_defpreset_t* preset);
|
||||
int fluid_defpreset_import_sfont(fluid_defpreset_t* preset, SFPreset* sfpreset, fluid_defsfont_t* sfont);
|
||||
int fluid_defpreset_set_global_zone(fluid_defpreset_t* preset, fluid_preset_zone_t* zone);
|
||||
|
@ -457,7 +457,7 @@ struct _fluid_preset_zone_t
|
|||
};
|
||||
|
||||
fluid_preset_zone_t* new_fluid_preset_zone(char* name);
|
||||
int delete_fluid_preset_zone(fluid_preset_zone_t* zone);
|
||||
void delete_fluid_preset_zone(fluid_preset_zone_t* zone);
|
||||
fluid_preset_zone_t* fluid_preset_zone_next(fluid_preset_zone_t* preset);
|
||||
int fluid_preset_zone_import_sfont(fluid_preset_zone_t* zone, SFZone* sfzone, fluid_defsfont_t* sfont);
|
||||
int fluid_preset_zone_inside_range(fluid_preset_zone_t* zone, int key, int vel);
|
||||
|
@ -474,7 +474,7 @@ struct _fluid_inst_t
|
|||
};
|
||||
|
||||
fluid_inst_t* new_fluid_inst(void);
|
||||
int delete_fluid_inst(fluid_inst_t* inst);
|
||||
void delete_fluid_inst(fluid_inst_t* inst);
|
||||
int fluid_inst_import_sfont(fluid_inst_t* inst, SFInst *sfinst, fluid_defsfont_t* sfont);
|
||||
int fluid_inst_set_global_zone(fluid_inst_t* inst, fluid_inst_zone_t* zone);
|
||||
int fluid_inst_add_zone(fluid_inst_t* inst, fluid_inst_zone_t* zone);
|
||||
|
@ -498,7 +498,7 @@ struct _fluid_inst_zone_t
|
|||
};
|
||||
|
||||
fluid_inst_zone_t* new_fluid_inst_zone(char* name);
|
||||
int delete_fluid_inst_zone(fluid_inst_zone_t* zone);
|
||||
void delete_fluid_inst_zone(fluid_inst_zone_t* zone);
|
||||
fluid_inst_zone_t* fluid_inst_zone_next(fluid_inst_zone_t* zone);
|
||||
int fluid_inst_zone_import_sfont(fluid_inst_zone_t* zone, SFZone *sfzone, fluid_defsfont_t* sfont);
|
||||
int fluid_inst_zone_inside_range(fluid_inst_zone_t* zone, int key, int vel);
|
||||
|
@ -507,7 +507,7 @@ fluid_sample_t* fluid_inst_zone_get_sample(fluid_inst_zone_t* zone);
|
|||
|
||||
|
||||
fluid_sample_t* new_fluid_sample(void);
|
||||
int delete_fluid_sample(fluid_sample_t* sample);
|
||||
void delete_fluid_sample(fluid_sample_t* sample);
|
||||
int fluid_sample_import_sfont(fluid_sample_t* sample, SFSample* sfsample, fluid_defsfont_t* sfont);
|
||||
int fluid_sample_in_rom(fluid_sample_t* sample);
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ static void fluid_ramsfont_iteration_start (fluid_ramsfont_t* sfont);
|
|||
static int fluid_ramsfont_iteration_next (fluid_ramsfont_t* sfont,
|
||||
fluid_preset_t* preset);
|
||||
static fluid_rampreset_t* new_fluid_rampreset(fluid_ramsfont_t* sfont);
|
||||
static int delete_fluid_rampreset (fluid_rampreset_t* preset);
|
||||
static void delete_fluid_rampreset (fluid_rampreset_t* preset);
|
||||
static int fluid_rampreset_get_banknum (fluid_rampreset_t* preset);
|
||||
static int fluid_rampreset_get_num (fluid_rampreset_t* preset);
|
||||
static const char *fluid_rampreset_get_name (fluid_rampreset_t* preset);
|
||||
|
@ -251,6 +251,7 @@ delete_fluid_ramsfont (fluid_ramsfont_t* sfont)
|
|||
{
|
||||
fluid_list_t *list;
|
||||
fluid_rampreset_t* preset;
|
||||
fluid_return_val_if_fail(sfont != NULL, FLUID_OK);
|
||||
|
||||
/* Check that no samples are currently used */
|
||||
for (list = sfont->sample; list; list = fluid_list_next(list)) {
|
||||
|
@ -534,25 +535,21 @@ new_fluid_rampreset(fluid_ramsfont_t* sfont)
|
|||
}
|
||||
|
||||
/* Delete a RAM SoundFont preset */
|
||||
static int
|
||||
static void
|
||||
delete_fluid_rampreset (fluid_rampreset_t* preset)
|
||||
{
|
||||
int err = FLUID_OK;
|
||||
fluid_preset_zone_t* zone;
|
||||
fluid_rampreset_voice_t *data;
|
||||
fluid_return_if_fail(preset != NULL);
|
||||
|
||||
if (preset->global_zone != NULL) {
|
||||
if (delete_fluid_preset_zone(preset->global_zone) != FLUID_OK) {
|
||||
err = FLUID_FAILED;
|
||||
}
|
||||
delete_fluid_preset_zone(preset->global_zone);
|
||||
preset->global_zone = NULL;
|
||||
}
|
||||
zone = preset->zone;
|
||||
while (zone != NULL) {
|
||||
preset->zone = zone->next;
|
||||
if (delete_fluid_preset_zone(zone) != FLUID_OK) {
|
||||
err = FLUID_FAILED;
|
||||
}
|
||||
delete_fluid_preset_zone(zone);
|
||||
zone = preset->zone;
|
||||
}
|
||||
|
||||
|
@ -570,7 +567,6 @@ delete_fluid_rampreset (fluid_rampreset_t* preset)
|
|||
preset->presetvoices = NULL;
|
||||
|
||||
FLUID_FREE(preset);
|
||||
return err;
|
||||
}
|
||||
|
||||
/* Get a RAM SoundFont preset bank */
|
||||
|
@ -1217,14 +1213,12 @@ new_fluid_ramsample (void)
|
|||
* @param sample Sample to delete
|
||||
* @return #FLUID_OK
|
||||
*/
|
||||
int
|
||||
void
|
||||
delete_fluid_ramsample (fluid_sample_t* sample)
|
||||
{
|
||||
fluid_return_if_fail(sample != NULL);
|
||||
|
||||
/* same as delete_fluid_sample, plus frees the data */
|
||||
if (sample->data != NULL) {
|
||||
FLUID_FREE(sample->data);
|
||||
}
|
||||
sample->data = NULL;
|
||||
FLUID_FREE(sample);
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
|
|
@ -174,12 +174,13 @@ fluid_channel_init_ctrl(fluid_channel_t* chan, int is_all_ctrl_off)
|
|||
}
|
||||
|
||||
/* Only called by delete_fluid_synth(), so no need to queue a preset free event */
|
||||
int
|
||||
void
|
||||
delete_fluid_channel(fluid_channel_t* chan)
|
||||
{
|
||||
if (chan->preset) delete_fluid_preset (chan->preset);
|
||||
fluid_return_if_fail(chan != NULL);
|
||||
|
||||
delete_fluid_preset (chan->preset);
|
||||
FLUID_FREE(chan);
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
/* FIXME - Calls fluid_channel_init() potentially in synthesis context */
|
||||
|
|
|
@ -87,7 +87,7 @@ struct _fluid_channel_t
|
|||
|
||||
fluid_channel_t* new_fluid_channel(fluid_synth_t* synth, int num);
|
||||
void fluid_channel_init_ctrl(fluid_channel_t* chan, int is_all_ctrl_off);
|
||||
int delete_fluid_channel(fluid_channel_t* chan);
|
||||
void delete_fluid_channel(fluid_channel_t* chan);
|
||||
void fluid_channel_reset(fluid_channel_t* chan);
|
||||
int fluid_channel_set_preset(fluid_channel_t* chan, fluid_preset_t* preset);
|
||||
fluid_preset_t* fluid_channel_get_preset(fluid_channel_t* chan);
|
||||
|
|
|
@ -75,10 +75,7 @@ new_fluid_event()
|
|||
void
|
||||
delete_fluid_event(fluid_event_t* evt)
|
||||
{
|
||||
|
||||
if (evt == NULL) {
|
||||
return;
|
||||
}
|
||||
fluid_return_if_fail(evt != NULL);
|
||||
|
||||
FLUID_FREE(evt);
|
||||
}
|
||||
|
@ -96,23 +93,23 @@ fluid_event_set_time(fluid_event_t* evt, unsigned int time)
|
|||
}
|
||||
|
||||
/**
|
||||
* Set source of a sequencer event (DOCME).
|
||||
* Set source of a sequencer event. \c src must be a unique sequencer ID or -1 if not set.
|
||||
* @param evt Sequencer event structure
|
||||
* @param src DOCME
|
||||
* @param src Unique sequencer ID
|
||||
*/
|
||||
void
|
||||
fluid_event_set_source(fluid_event_t* evt, short src)
|
||||
fluid_event_set_source(fluid_event_t* evt, fluid_seq_id_t src)
|
||||
{
|
||||
evt->src = src;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set destination of a sequencer event (DOCME).
|
||||
* Set destination of this sequencer event, i.e. the sequencer client this event will be sent to. \c dest must be a unique sequencer ID.
|
||||
* @param evt Sequencer event structure
|
||||
* @param dest DOCME
|
||||
* @param dest The destination unique sequencer ID
|
||||
*/
|
||||
void
|
||||
fluid_event_set_dest(fluid_event_t* evt, short dest)
|
||||
fluid_event_set_dest(fluid_event_t* evt, fluid_seq_id_t dest)
|
||||
{
|
||||
evt->dest = dest;
|
||||
}
|
||||
|
@ -438,7 +435,7 @@ fluid_event_channel_pressure(fluid_event_t* evt, int channel, short val)
|
|||
* @param channel MIDI channel number
|
||||
* @param key MIDI note number (0-127)
|
||||
* @param val Aftertouch amount (0-127)
|
||||
* @since @NEXT_RELEASE@
|
||||
* @since 2.0.0
|
||||
*/
|
||||
void
|
||||
fluid_event_key_pressure(fluid_event_t* evt, int channel, short key, short val)
|
||||
|
@ -491,21 +488,21 @@ unsigned int fluid_event_get_time(fluid_event_t* evt)
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the source field from a sequencer event structure.
|
||||
* Get the source sequencer client from a sequencer event structure.
|
||||
* @param evt Sequencer event structure
|
||||
* @return DOCME
|
||||
* @return source field of the sequencer event
|
||||
*/
|
||||
short fluid_event_get_source(fluid_event_t* evt)
|
||||
fluid_seq_id_t fluid_event_get_source(fluid_event_t* evt)
|
||||
{
|
||||
return evt->src;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the dest field from a sequencer event structure.
|
||||
* Get the dest sequencer client from a sequencer event structure.
|
||||
* @param evt Sequencer event structure
|
||||
* @return DOCME
|
||||
* @return dest field of the sequencer event
|
||||
*/
|
||||
short fluid_event_get_dest(fluid_event_t* evt)
|
||||
fluid_seq_id_t fluid_event_get_dest(fluid_event_t* evt)
|
||||
{
|
||||
return evt->dest;
|
||||
}
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
struct _fluid_event_t {
|
||||
unsigned int time;
|
||||
int type;
|
||||
short src;
|
||||
short dest;
|
||||
fluid_seq_id_t src;
|
||||
fluid_seq_id_t dest;
|
||||
int channel;
|
||||
short key;
|
||||
short vel;
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
* @note The \c next member of \c mod will be left unchanged.
|
||||
*/
|
||||
void
|
||||
fluid_mod_clone(fluid_mod_t* mod, fluid_mod_t* src)
|
||||
fluid_mod_clone(fluid_mod_t* mod, const fluid_mod_t* src)
|
||||
{
|
||||
mod->dest = src->dest;
|
||||
mod->src1 = src->src1;
|
||||
|
@ -97,7 +97,7 @@ fluid_mod_set_amount(fluid_mod_t* mod, double amount)
|
|||
* @return The primary source value (#fluid_mod_src or a MIDI CC controller value).
|
||||
*/
|
||||
int
|
||||
fluid_mod_get_source1(fluid_mod_t* mod)
|
||||
fluid_mod_get_source1(const fluid_mod_t* mod)
|
||||
{
|
||||
return mod->src1;
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ fluid_mod_get_source1(fluid_mod_t* mod)
|
|||
* @return The primary source flags (#fluid_mod_flags).
|
||||
*/
|
||||
int
|
||||
fluid_mod_get_flags1(fluid_mod_t* mod)
|
||||
fluid_mod_get_flags1(const fluid_mod_t* mod)
|
||||
{
|
||||
return mod->flags1;
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ fluid_mod_get_flags1(fluid_mod_t* mod)
|
|||
* @return The secondary source value (#fluid_mod_src or a MIDI CC controller value).
|
||||
*/
|
||||
int
|
||||
fluid_mod_get_source2(fluid_mod_t* mod)
|
||||
fluid_mod_get_source2(const fluid_mod_t* mod)
|
||||
{
|
||||
return mod->src2;
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ fluid_mod_get_source2(fluid_mod_t* mod)
|
|||
* @return The secondary source flags (#fluid_mod_flags).
|
||||
*/
|
||||
int
|
||||
fluid_mod_get_flags2(fluid_mod_t* mod)
|
||||
fluid_mod_get_flags2(const fluid_mod_t* mod)
|
||||
{
|
||||
return mod->flags2;
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ fluid_mod_get_flags2(fluid_mod_t* mod)
|
|||
* @return Destination generator (#fluid_gen_type)
|
||||
*/
|
||||
int
|
||||
fluid_mod_get_dest(fluid_mod_t* mod)
|
||||
fluid_mod_get_dest(const fluid_mod_t* mod)
|
||||
{
|
||||
return mod->dest;
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ fluid_mod_get_dest(fluid_mod_t* mod)
|
|||
* @return Scale amount
|
||||
*/
|
||||
double
|
||||
fluid_mod_get_amount(fluid_mod_t* mod)
|
||||
fluid_mod_get_amount(const fluid_mod_t* mod)
|
||||
{
|
||||
return (double) mod->amount;
|
||||
}
|
||||
|
@ -412,7 +412,7 @@ fluid_mod_delete (fluid_mod_t *mod)
|
|||
* SF2.01 section 9.5.1 page 69, 'bullet' 3 defines 'identical'.
|
||||
*/
|
||||
int
|
||||
fluid_mod_test_identity (fluid_mod_t *mod1, fluid_mod_t *mod2)
|
||||
fluid_mod_test_identity (const fluid_mod_t *mod1, const fluid_mod_t *mod2)
|
||||
{
|
||||
return mod1->dest == mod2->dest
|
||||
&& mod1->src1 == mod2->src1
|
||||
|
@ -429,7 +429,7 @@ fluid_mod_test_identity (fluid_mod_t *mod1, fluid_mod_t *mod2)
|
|||
*
|
||||
* @return TRUE if the modulator has the given source, FALSE otherwise.
|
||||
*/
|
||||
int fluid_mod_has_source(fluid_mod_t * mod, int cc, int ctrl)
|
||||
int fluid_mod_has_source(const fluid_mod_t * mod, int cc, int ctrl)
|
||||
{
|
||||
return
|
||||
(
|
||||
|
@ -450,7 +450,7 @@ int fluid_mod_has_source(fluid_mod_t * mod, int cc, int ctrl)
|
|||
* @param gen The destination generator of type #fluid_gen_type to check for
|
||||
* @return TRUE if the modulator has the given destination, FALSE otherwise.
|
||||
*/
|
||||
int fluid_mod_has_dest(fluid_mod_t * mod, int gen)
|
||||
int fluid_mod_has_dest(const fluid_mod_t * mod, int gen)
|
||||
{
|
||||
return mod->dest == gen;
|
||||
}
|
||||
|
|
|
@ -501,19 +501,21 @@ fluid_sample_timer_t* new_fluid_sample_timer(fluid_synth_t* synth, fluid_timer_c
|
|||
return result;
|
||||
}
|
||||
|
||||
int delete_fluid_sample_timer(fluid_synth_t* synth, fluid_sample_timer_t* timer)
|
||||
void delete_fluid_sample_timer(fluid_synth_t* synth, fluid_sample_timer_t* timer)
|
||||
{
|
||||
fluid_sample_timer_t** ptr = &synth->sample_timers;
|
||||
fluid_sample_timer_t** ptr;
|
||||
fluid_return_if_fail(synth != NULL);
|
||||
fluid_return_if_fail(timer != NULL);
|
||||
|
||||
ptr = &synth->sample_timers;
|
||||
while (*ptr) {
|
||||
if (*ptr == timer) {
|
||||
*ptr = timer->next;
|
||||
FLUID_FREE(timer);
|
||||
return FLUID_OK;
|
||||
return;
|
||||
}
|
||||
ptr = &((*ptr)->next);
|
||||
}
|
||||
FLUID_LOG(FLUID_ERR,"delete_fluid_sample_timer failed, no timer found");
|
||||
return FLUID_FAILED;
|
||||
}
|
||||
|
||||
|
||||
|
@ -821,7 +823,7 @@ new_fluid_synth(fluid_settings_t *settings)
|
|||
* @note Other users of a synthesizer instance, such as audio and MIDI drivers,
|
||||
* should be deleted prior to freeing the FluidSynth instance.
|
||||
*/
|
||||
int
|
||||
void
|
||||
delete_fluid_synth(fluid_synth_t* synth)
|
||||
{
|
||||
int i, k;
|
||||
|
@ -831,9 +833,7 @@ delete_fluid_synth(fluid_synth_t* synth)
|
|||
fluid_mod_t* default_mod;
|
||||
fluid_mod_t* mod;
|
||||
|
||||
if (synth == NULL) {
|
||||
return FLUID_OK;
|
||||
}
|
||||
fluid_return_if_fail(synth != NULL);
|
||||
|
||||
fluid_profiling_print();
|
||||
|
||||
|
@ -863,10 +863,8 @@ delete_fluid_synth(fluid_synth_t* synth)
|
|||
/* also unset all presets for clean SoundFont unload */
|
||||
if (synth->channel != NULL)
|
||||
for (i = 0; i < synth->midi_channels; i++)
|
||||
if (synth->channel[i] != NULL)
|
||||
fluid_channel_set_preset(synth->channel[i], NULL);
|
||||
|
||||
if (synth->eventhandler)
|
||||
delete_fluid_rvoice_eventhandler(synth->eventhandler);
|
||||
|
||||
/* delete all the SoundFonts */
|
||||
|
@ -880,7 +878,7 @@ delete_fluid_synth(fluid_synth_t* synth)
|
|||
|
||||
|
||||
/* Delete the SoundFont info hash */
|
||||
if (synth->sfont_hash) delete_fluid_hashtable (synth->sfont_hash);
|
||||
delete_fluid_hashtable (synth->sfont_hash);
|
||||
|
||||
|
||||
/* delete all the SoundFont loaders */
|
||||
|
@ -895,18 +893,14 @@ delete_fluid_synth(fluid_synth_t* synth)
|
|||
|
||||
if (synth->channel != NULL) {
|
||||
for (i = 0; i < synth->midi_channels; i++) {
|
||||
if (synth->channel[i] != NULL) {
|
||||
delete_fluid_channel(synth->channel[i]);
|
||||
}
|
||||
}
|
||||
FLUID_FREE(synth->channel);
|
||||
}
|
||||
|
||||
if (synth->voice != NULL) {
|
||||
for (i = 0; i < synth->nvoice; i++) {
|
||||
if (synth->voice[i] != NULL) {
|
||||
delete_fluid_voice(synth->voice[i]);
|
||||
}
|
||||
}
|
||||
FLUID_FREE(synth->voice);
|
||||
}
|
||||
|
@ -917,9 +911,7 @@ delete_fluid_synth(fluid_synth_t* synth)
|
|||
for (i = 0; i < 128; i++) {
|
||||
if (synth->tuning[i] != NULL) {
|
||||
for (k = 0; k < 128; k++) {
|
||||
if (synth->tuning[i][k] != NULL) {
|
||||
delete_fluid_tuning(synth->tuning[i][k]);
|
||||
}
|
||||
}
|
||||
FLUID_FREE(synth->tuning[i]);
|
||||
}
|
||||
|
@ -931,9 +923,7 @@ delete_fluid_synth(fluid_synth_t* synth)
|
|||
|
||||
#ifdef LADSPA
|
||||
/* Release the LADSPA effects unit */
|
||||
if (synth->ladspa_fx) {
|
||||
delete_fluid_ladspa_fx(synth->ladspa_fx);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* delete all default modulators */
|
||||
|
@ -947,8 +937,6 @@ delete_fluid_synth(fluid_synth_t* synth)
|
|||
fluid_rec_mutex_destroy(synth->mutex);
|
||||
|
||||
FLUID_FREE(synth);
|
||||
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1157,6 +1145,46 @@ fluid_synth_add_default_mod(fluid_synth_t* synth, fluid_mod_t* mod, int mode)
|
|||
FLUID_API_RETURN(FLUID_OK);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the specified modulator \c mod from the synth's default modulator list.
|
||||
* fluid_mod_test_identity() will be used to test modulator matching.
|
||||
* @param synth synth instance
|
||||
* @param mod The modulator to remove
|
||||
* @return FLUID_OK if a matching modulator was found and successfully removed, FLUID_FAILED otherwise
|
||||
*/
|
||||
int
|
||||
fluid_synth_remove_default_mod(fluid_synth_t* synth, const fluid_mod_t* mod)
|
||||
{
|
||||
fluid_mod_t* default_mod;
|
||||
fluid_mod_t* last_mod;
|
||||
|
||||
fluid_return_val_if_fail (synth != NULL, FLUID_FAILED);
|
||||
fluid_return_val_if_fail (mod != NULL, FLUID_FAILED);
|
||||
fluid_synth_api_enter(synth);
|
||||
|
||||
last_mod = default_mod = synth->default_mod;
|
||||
|
||||
while (default_mod != NULL) {
|
||||
if (fluid_mod_test_identity(default_mod, mod))
|
||||
{
|
||||
if(synth->default_mod == default_mod)
|
||||
{
|
||||
synth->default_mod = synth->default_mod->next;
|
||||
}
|
||||
else
|
||||
{
|
||||
last_mod->next = default_mod->next;
|
||||
}
|
||||
fluid_mod_delete(default_mod);
|
||||
FLUID_API_RETURN(FLUID_OK);
|
||||
}
|
||||
last_mod = default_mod;
|
||||
default_mod = default_mod->next;
|
||||
}
|
||||
|
||||
FLUID_API_RETURN(FLUID_FAILED);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Send a MIDI controller event on a MIDI channel.
|
||||
|
@ -1410,7 +1438,7 @@ fluid_synth_sysex_midi_tuning (fluid_synth_t *synth, const char *data, int len,
|
|||
int keys[128];
|
||||
char name[17];
|
||||
int note, frac, frac2;
|
||||
uint8 chksum;
|
||||
uint8_t chksum;
|
||||
int i, count, index;
|
||||
const char *dataptr;
|
||||
char *resptr;;
|
||||
|
@ -1834,7 +1862,7 @@ fluid_synth_update_channel_pressure_LOCAL(fluid_synth_t* synth, int chan)
|
|||
* @param key MIDI key number (0-127)
|
||||
* @param val MIDI key pressure value (0-127)
|
||||
* @return FLUID_OK on success, FLUID_FAILED otherwise
|
||||
* @since @NEXT_RELEASE@
|
||||
* @since 2.0.0
|
||||
*/
|
||||
int
|
||||
fluid_synth_key_pressure(fluid_synth_t* synth, int chan, int key, int val)
|
||||
|
@ -4974,7 +5002,7 @@ fluid_synth_get_settings(fluid_synth_t* synth)
|
|||
* TRUE to take the value as a 0.0-1.0 range and apply it to the valid
|
||||
* generator effect range (scaled and shifted as necessary).
|
||||
* @return FLUID_OK on success, FLUID_FAILED otherwise
|
||||
* @since @NEXT_RELEASE@
|
||||
* @since 2.0.0
|
||||
*
|
||||
* This function allows for setting all effect parameters in real time on a
|
||||
* MIDI channel. Setting absolute to non-zero will cause the value to override
|
||||
|
|
|
@ -200,7 +200,7 @@ int fluid_synth_set_chorus_full(fluid_synth_t* synth, int set, int nr, double le
|
|||
double speed, double depth_ms, int type);
|
||||
|
||||
fluid_sample_timer_t* new_fluid_sample_timer(fluid_synth_t* synth, fluid_timer_callback_t callback, void* data);
|
||||
int delete_fluid_sample_timer(fluid_synth_t* synth, fluid_sample_timer_t* timer);
|
||||
void delete_fluid_sample_timer(fluid_synth_t* synth, fluid_sample_timer_t* timer);
|
||||
|
||||
void fluid_synth_api_enter(fluid_synth_t* synth);
|
||||
void fluid_synth_api_exit(fluid_synth_t* synth);
|
||||
|
|
|
@ -94,8 +94,10 @@ fluid_tuning_duplicate (fluid_tuning_t *tuning)
|
|||
void
|
||||
delete_fluid_tuning (fluid_tuning_t *tuning)
|
||||
{
|
||||
if (tuning->name) FLUID_FREE (tuning->name);
|
||||
FLUID_FREE (tuning);
|
||||
fluid_return_if_fail(tuning != NULL);
|
||||
|
||||
FLUID_FREE (tuning->name);
|
||||
FLUID_FREE (tuning);
|
||||
}
|
||||
|
||||
/* Add a reference to a tuning object */
|
||||
|
|
|
@ -217,20 +217,17 @@ new_fluid_voice(fluid_real_t output_rate)
|
|||
/*
|
||||
* delete_fluid_voice
|
||||
*/
|
||||
int
|
||||
void
|
||||
delete_fluid_voice(fluid_voice_t* voice)
|
||||
{
|
||||
if (voice == NULL) {
|
||||
return FLUID_OK;
|
||||
}
|
||||
fluid_return_if_fail(voice != NULL);
|
||||
|
||||
if (!voice->can_access_rvoice || !voice->can_access_overflow_rvoice) {
|
||||
/* stop rvoice before deleting voice! */
|
||||
return FLUID_FAILED;
|
||||
FLUID_LOG(FLUID_WARN, "Deleting voice %u which has locked rvoices!", voice->id);
|
||||
}
|
||||
FLUID_FREE(voice->overflow_rvoice);
|
||||
FLUID_FREE(voice->rvoice);
|
||||
FLUID_FREE(voice);
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
/* fluid_voice_init
|
||||
|
@ -392,7 +389,7 @@ fluid_real_t fluid_voice_gen_value(fluid_voice_t* voice, int num)
|
|||
* @return Count of samples written to dsp_buf (can be 0)
|
||||
*
|
||||
* Panning, reverb and chorus are processed separately. The dsp interpolation
|
||||
* routine is in (fluid_dsp_float.c).
|
||||
* routine is in (fluid_rvoice_dsp.c).
|
||||
*/
|
||||
int
|
||||
fluid_voice_write (fluid_voice_t* voice, fluid_real_t *dsp_buf)
|
||||
|
|
|
@ -111,7 +111,7 @@ struct _fluid_voice_t
|
|||
|
||||
|
||||
fluid_voice_t* new_fluid_voice(fluid_real_t output_rate);
|
||||
int delete_fluid_voice(fluid_voice_t* voice);
|
||||
void delete_fluid_voice(fluid_voice_t* voice);
|
||||
|
||||
void fluid_voice_start(fluid_voice_t* voice);
|
||||
void fluid_voice_calculate_gen_pitch(fluid_voice_t* voice);
|
||||
|
@ -192,12 +192,5 @@ fluid_real_t fluid_voice_gen_value(fluid_voice_t* voice, int num);
|
|||
+ (fluid_real_t)(_voice)->gen[_n].mod \
|
||||
+ (fluid_real_t)(_voice)->gen[_n].nrpn)
|
||||
|
||||
/* defined in fluid_dsp_float.c */
|
||||
|
||||
void fluid_dsp_float_config (void);
|
||||
int fluid_dsp_float_interpolate_none (fluid_voice_t *voice);
|
||||
int fluid_dsp_float_interpolate_linear (fluid_voice_t *voice);
|
||||
int fluid_dsp_float_interpolate_4th_order (fluid_voice_t *voice);
|
||||
int fluid_dsp_float_interpolate_7th_order (fluid_voice_t *voice);
|
||||
|
||||
#endif /* _FLUID_VOICE_H */
|
||||
|
|
|
@ -1,687 +0,0 @@
|
|||
/* FluidSynth - A Software Synthesizer
|
||||
*
|
||||
* 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 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#include "fluidsynth_priv.h"
|
||||
#include "fluid_phase.h"
|
||||
|
||||
/* Purpose:
|
||||
*
|
||||
* Interpolates audio data (obtains values between the samples of the original
|
||||
* waveform data).
|
||||
*
|
||||
* Variables loaded from the voice structure (assigned in fluid_voice_write()):
|
||||
* - dsp_data: Pointer to the original waveform data
|
||||
* - dsp_phase: The position in the original waveform data.
|
||||
* This has an integer and a fractional part (between samples).
|
||||
* - dsp_phase_incr: For each output sample, the position in the original
|
||||
* waveform advances by dsp_phase_incr. This also has an integer
|
||||
* part and a fractional part.
|
||||
* If a sample is played at root pitch (no pitch change),
|
||||
* dsp_phase_incr is integer=1 and fractional=0.
|
||||
* - dsp_amp: The current amplitude envelope value.
|
||||
* - dsp_amp_incr: The changing rate of the amplitude envelope.
|
||||
*
|
||||
* A couple of variables are used internally, their results are discarded:
|
||||
* - dsp_i: Index through the output buffer
|
||||
* - dsp_buf: Output buffer of floating point values (FLUID_BUFSIZE in length)
|
||||
*/
|
||||
|
||||
#include "fluidsynth_priv.h"
|
||||
#include "fluid_synth.h"
|
||||
#include "fluid_voice.h"
|
||||
|
||||
|
||||
/* Interpolation (find a value between two samples of the original waveform) */
|
||||
|
||||
/* Linear interpolation table (2 coefficients centered on 1st) */
|
||||
static fluid_real_t interp_coeff_linear[FLUID_INTERP_MAX][2];
|
||||
|
||||
/* 4th order (cubic) interpolation table (4 coefficients centered on 2nd) */
|
||||
static fluid_real_t interp_coeff[FLUID_INTERP_MAX][4];
|
||||
|
||||
/* 7th order interpolation (7 coefficients centered on 3rd) */
|
||||
static fluid_real_t sinc_table7[FLUID_INTERP_MAX][7];
|
||||
|
||||
|
||||
#define SINC_INTERP_ORDER 7 /* 7th order constant */
|
||||
|
||||
|
||||
/* Initializes interpolation tables */
|
||||
void fluid_dsp_float_config (void)
|
||||
{
|
||||
int i, i2;
|
||||
double x, v;
|
||||
double i_shifted;
|
||||
|
||||
/* Initialize the coefficients for the interpolation. The math comes
|
||||
* from a mail, posted by Olli Niemitalo to the music-dsp mailing
|
||||
* list (I found it in the music-dsp archives
|
||||
* http://www.smartelectronix.com/musicdsp/). */
|
||||
|
||||
for (i = 0; i < FLUID_INTERP_MAX; i++)
|
||||
{
|
||||
x = (double) i / (double) FLUID_INTERP_MAX;
|
||||
|
||||
interp_coeff[i][0] = (fluid_real_t)(x * (-0.5 + x * (1 - 0.5 * x)));
|
||||
interp_coeff[i][1] = (fluid_real_t)(1.0 + x * x * (1.5 * x - 2.5));
|
||||
interp_coeff[i][2] = (fluid_real_t)(x * (0.5 + x * (2.0 - 1.5 * x)));
|
||||
interp_coeff[i][3] = (fluid_real_t)(0.5 * x * x * (x - 1.0));
|
||||
|
||||
interp_coeff_linear[i][0] = (fluid_real_t)(1.0 - x);
|
||||
interp_coeff_linear[i][1] = (fluid_real_t)x;
|
||||
}
|
||||
|
||||
/* i: Offset in terms of whole samples */
|
||||
for (i = 0; i < SINC_INTERP_ORDER; i++)
|
||||
{ /* i2: Offset in terms of fractional samples ('subsamples') */
|
||||
for (i2 = 0; i2 < FLUID_INTERP_MAX; i2++)
|
||||
{
|
||||
/* center on middle of table */
|
||||
i_shifted = (double)i - ((double)SINC_INTERP_ORDER / 2.0)
|
||||
+ (double)i2 / (double)FLUID_INTERP_MAX;
|
||||
|
||||
/* sinc(0) cannot be calculated straightforward (limit needed for 0/0) */
|
||||
if (fabs (i_shifted) > 0.000001)
|
||||
{
|
||||
v = (fluid_real_t)sin (i_shifted * M_PI) / (M_PI * i_shifted);
|
||||
/* Hamming window */
|
||||
v *= (fluid_real_t)0.5 * (1.0 + cos (2.0 * M_PI * i_shifted / (fluid_real_t)SINC_INTERP_ORDER));
|
||||
}
|
||||
else v = 1.0;
|
||||
|
||||
sinc_table7[FLUID_INTERP_MAX - i2 - 1][i] = v;
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
for (i = 0; i < FLUID_INTERP_MAX; i++)
|
||||
{
|
||||
printf ("%d %0.3f %0.3f %0.3f %0.3f %0.3f %0.3f %0.3f\n",
|
||||
i, sinc_table7[0][i], sinc_table7[1][i], sinc_table7[2][i],
|
||||
sinc_table7[3][i], sinc_table7[4][i], sinc_table7[5][i], sinc_table7[6][i]);
|
||||
}
|
||||
#endif
|
||||
|
||||
fluid_check_fpe("interpolation table calculation");
|
||||
}
|
||||
|
||||
|
||||
static FLUID_INLINE int
|
||||
fluid_voice_is_looping(fluid_voice_t *voice)
|
||||
{
|
||||
return _SAMPLEMODE (voice) == FLUID_LOOP_DURING_RELEASE
|
||||
|| (_SAMPLEMODE (voice) == FLUID_LOOP_UNTIL_RELEASE
|
||||
&& fluid_adsr_env_get_section(&voice->volenv) < FLUID_VOICE_ENVRELEASE);
|
||||
}
|
||||
|
||||
/* No interpolation. Just take the sample, which is closest to
|
||||
* the playback pointer. Questionable quality, but very
|
||||
* efficient. */
|
||||
int
|
||||
fluid_dsp_float_interpolate_none (fluid_voice_t *voice)
|
||||
{
|
||||
fluid_phase_t dsp_phase = voice->phase;
|
||||
fluid_phase_t dsp_phase_incr;
|
||||
short int *dsp_data = voice->sample->data;
|
||||
fluid_real_t *dsp_buf = voice->dsp_buf;
|
||||
fluid_real_t dsp_amp = voice->amp;
|
||||
fluid_real_t dsp_amp_incr = voice->amp_incr;
|
||||
unsigned int dsp_i = 0;
|
||||
unsigned int dsp_phase_index;
|
||||
unsigned int end_index;
|
||||
int looping;
|
||||
|
||||
/* Convert playback "speed" floating point value to phase index/fract */
|
||||
fluid_phase_set_float (dsp_phase_incr, voice->phase_incr);
|
||||
|
||||
/* voice is currently looping? */
|
||||
looping = fluid_voice_is_looping(voice);
|
||||
|
||||
end_index = looping ? voice->loopend - 1 : voice->end;
|
||||
|
||||
while (1)
|
||||
{
|
||||
dsp_phase_index = fluid_phase_index_round (dsp_phase); /* round to nearest point */
|
||||
|
||||
/* interpolate sequence of sample points */
|
||||
for ( ; dsp_i < FLUID_BUFSIZE && dsp_phase_index <= end_index; dsp_i++)
|
||||
{
|
||||
dsp_buf[dsp_i] = dsp_amp * dsp_data[dsp_phase_index];
|
||||
|
||||
/* increment phase and amplitude */
|
||||
fluid_phase_incr (dsp_phase, dsp_phase_incr);
|
||||
dsp_phase_index = fluid_phase_index_round (dsp_phase); /* round to nearest point */
|
||||
dsp_amp += dsp_amp_incr;
|
||||
}
|
||||
|
||||
/* break out if not looping (buffer may not be full) */
|
||||
if (!looping) break;
|
||||
|
||||
/* go back to loop start */
|
||||
if (dsp_phase_index > end_index)
|
||||
{
|
||||
fluid_phase_sub_int (dsp_phase, voice->loopend - voice->loopstart);
|
||||
voice->has_looped = 1;
|
||||
}
|
||||
|
||||
/* break out if filled buffer */
|
||||
if (dsp_i >= FLUID_BUFSIZE) break;
|
||||
}
|
||||
|
||||
voice->phase = dsp_phase;
|
||||
voice->amp = dsp_amp;
|
||||
|
||||
return (dsp_i);
|
||||
}
|
||||
|
||||
/* Straight line interpolation.
|
||||
* Returns number of samples processed (usually FLUID_BUFSIZE but could be
|
||||
* smaller if end of sample occurs).
|
||||
*/
|
||||
int
|
||||
fluid_dsp_float_interpolate_linear (fluid_voice_t *voice)
|
||||
{
|
||||
fluid_phase_t dsp_phase = voice->phase;
|
||||
fluid_phase_t dsp_phase_incr;
|
||||
short int *dsp_data = voice->sample->data;
|
||||
fluid_real_t *dsp_buf = voice->dsp_buf;
|
||||
fluid_real_t dsp_amp = voice->amp;
|
||||
fluid_real_t dsp_amp_incr = voice->amp_incr;
|
||||
unsigned int dsp_i = 0;
|
||||
unsigned int dsp_phase_index;
|
||||
unsigned int end_index;
|
||||
short int point;
|
||||
fluid_real_t *coeffs;
|
||||
int looping;
|
||||
|
||||
/* Convert playback "speed" floating point value to phase index/fract */
|
||||
fluid_phase_set_float (dsp_phase_incr, voice->phase_incr);
|
||||
|
||||
/* voice is currently looping? */
|
||||
looping = fluid_voice_is_looping(voice);
|
||||
|
||||
/* last index before 2nd interpolation point must be specially handled */
|
||||
end_index = (looping ? voice->loopend - 1 : voice->end) - 1;
|
||||
|
||||
/* 2nd interpolation point to use at end of loop or sample */
|
||||
if (looping) point = dsp_data[voice->loopstart]; /* loop start */
|
||||
else point = dsp_data[voice->end]; /* duplicate end for samples no longer looping */
|
||||
|
||||
while (1)
|
||||
{
|
||||
dsp_phase_index = fluid_phase_index (dsp_phase);
|
||||
|
||||
/* interpolate the sequence of sample points */
|
||||
for ( ; dsp_i < FLUID_BUFSIZE && dsp_phase_index <= end_index; dsp_i++)
|
||||
{
|
||||
coeffs = interp_coeff_linear[fluid_phase_fract_to_tablerow (dsp_phase)];
|
||||
dsp_buf[dsp_i] = dsp_amp * (coeffs[0] * dsp_data[dsp_phase_index]
|
||||
+ coeffs[1] * dsp_data[dsp_phase_index+1]);
|
||||
|
||||
/* increment phase and amplitude */
|
||||
fluid_phase_incr (dsp_phase, dsp_phase_incr);
|
||||
dsp_phase_index = fluid_phase_index (dsp_phase);
|
||||
dsp_amp += dsp_amp_incr;
|
||||
}
|
||||
|
||||
/* break out if buffer filled */
|
||||
if (dsp_i >= FLUID_BUFSIZE) break;
|
||||
|
||||
end_index++; /* we're now interpolating the last point */
|
||||
|
||||
/* interpolate within last point */
|
||||
for (; dsp_phase_index <= end_index && dsp_i < FLUID_BUFSIZE; dsp_i++)
|
||||
{
|
||||
coeffs = interp_coeff_linear[fluid_phase_fract_to_tablerow (dsp_phase)];
|
||||
dsp_buf[dsp_i] = dsp_amp * (coeffs[0] * dsp_data[dsp_phase_index]
|
||||
+ coeffs[1] * point);
|
||||
|
||||
/* increment phase and amplitude */
|
||||
fluid_phase_incr (dsp_phase, dsp_phase_incr);
|
||||
dsp_phase_index = fluid_phase_index (dsp_phase);
|
||||
dsp_amp += dsp_amp_incr; /* increment amplitude */
|
||||
}
|
||||
|
||||
if (!looping) break; /* break out if not looping (end of sample) */
|
||||
|
||||
/* go back to loop start (if past */
|
||||
if (dsp_phase_index > end_index)
|
||||
{
|
||||
fluid_phase_sub_int (dsp_phase, voice->loopend - voice->loopstart);
|
||||
voice->has_looped = 1;
|
||||
}
|
||||
|
||||
/* break out if filled buffer */
|
||||
if (dsp_i >= FLUID_BUFSIZE) break;
|
||||
|
||||
end_index--; /* set end back to second to last sample point */
|
||||
}
|
||||
|
||||
voice->phase = dsp_phase;
|
||||
voice->amp = dsp_amp;
|
||||
|
||||
return (dsp_i);
|
||||
}
|
||||
|
||||
/* 4th order (cubic) interpolation.
|
||||
* Returns number of samples processed (usually FLUID_BUFSIZE but could be
|
||||
* smaller if end of sample occurs).
|
||||
*/
|
||||
int
|
||||
fluid_dsp_float_interpolate_4th_order (fluid_voice_t *voice)
|
||||
{
|
||||
fluid_phase_t dsp_phase = voice->phase;
|
||||
fluid_phase_t dsp_phase_incr;
|
||||
short int *dsp_data = voice->sample->data;
|
||||
fluid_real_t *dsp_buf = voice->dsp_buf;
|
||||
fluid_real_t dsp_amp = voice->amp;
|
||||
fluid_real_t dsp_amp_incr = voice->amp_incr;
|
||||
unsigned int dsp_i = 0;
|
||||
unsigned int dsp_phase_index;
|
||||
unsigned int start_index, end_index;
|
||||
short int start_point, end_point1, end_point2;
|
||||
fluid_real_t *coeffs;
|
||||
int looping;
|
||||
|
||||
/* Convert playback "speed" floating point value to phase index/fract */
|
||||
fluid_phase_set_float (dsp_phase_incr, voice->phase_incr);
|
||||
|
||||
/* voice is currently looping? */
|
||||
looping = fluid_voice_is_looping(voice);
|
||||
|
||||
/* last index before 4th interpolation point must be specially handled */
|
||||
end_index = (looping ? voice->loopend - 1 : voice->end) - 2;
|
||||
|
||||
if (voice->has_looped) /* set start_index and start point if looped or not */
|
||||
{
|
||||
start_index = voice->loopstart;
|
||||
start_point = dsp_data[voice->loopend - 1]; /* last point in loop (wrap around) */
|
||||
}
|
||||
else
|
||||
{
|
||||
start_index = voice->start;
|
||||
start_point = dsp_data[voice->start]; /* just duplicate the point */
|
||||
}
|
||||
|
||||
/* get points off the end (loop start if looping, duplicate point if end) */
|
||||
if (looping)
|
||||
{
|
||||
end_point1 = dsp_data[voice->loopstart];
|
||||
end_point2 = dsp_data[voice->loopstart + 1];
|
||||
}
|
||||
else
|
||||
{
|
||||
end_point1 = dsp_data[voice->end];
|
||||
end_point2 = end_point1;
|
||||
}
|
||||
|
||||
while (1)
|
||||
{
|
||||
dsp_phase_index = fluid_phase_index (dsp_phase);
|
||||
|
||||
/* interpolate first sample point (start or loop start) if needed */
|
||||
for ( ; dsp_phase_index == start_index && dsp_i < FLUID_BUFSIZE; dsp_i++)
|
||||
{
|
||||
coeffs = interp_coeff[fluid_phase_fract_to_tablerow (dsp_phase)];
|
||||
dsp_buf[dsp_i] = dsp_amp * (coeffs[0] * start_point
|
||||
+ coeffs[1] * dsp_data[dsp_phase_index]
|
||||
+ coeffs[2] * dsp_data[dsp_phase_index+1]
|
||||
+ coeffs[3] * dsp_data[dsp_phase_index+2]);
|
||||
|
||||
/* increment phase and amplitude */
|
||||
fluid_phase_incr (dsp_phase, dsp_phase_incr);
|
||||
dsp_phase_index = fluid_phase_index (dsp_phase);
|
||||
dsp_amp += dsp_amp_incr;
|
||||
}
|
||||
|
||||
/* interpolate the sequence of sample points */
|
||||
for ( ; dsp_i < FLUID_BUFSIZE && dsp_phase_index <= end_index; dsp_i++)
|
||||
{
|
||||
coeffs = interp_coeff[fluid_phase_fract_to_tablerow (dsp_phase)];
|
||||
dsp_buf[dsp_i] = dsp_amp * (coeffs[0] * dsp_data[dsp_phase_index-1]
|
||||
+ coeffs[1] * dsp_data[dsp_phase_index]
|
||||
+ coeffs[2] * dsp_data[dsp_phase_index+1]
|
||||
+ coeffs[3] * dsp_data[dsp_phase_index+2]);
|
||||
|
||||
/* increment phase and amplitude */
|
||||
fluid_phase_incr (dsp_phase, dsp_phase_incr);
|
||||
dsp_phase_index = fluid_phase_index (dsp_phase);
|
||||
dsp_amp += dsp_amp_incr;
|
||||
}
|
||||
|
||||
/* break out if buffer filled */
|
||||
if (dsp_i >= FLUID_BUFSIZE) break;
|
||||
|
||||
end_index++; /* we're now interpolating the 2nd to last point */
|
||||
|
||||
/* interpolate within 2nd to last point */
|
||||
for (; dsp_phase_index <= end_index && dsp_i < FLUID_BUFSIZE; dsp_i++)
|
||||
{
|
||||
coeffs = interp_coeff[fluid_phase_fract_to_tablerow (dsp_phase)];
|
||||
dsp_buf[dsp_i] = dsp_amp * (coeffs[0] * dsp_data[dsp_phase_index-1]
|
||||
+ coeffs[1] * dsp_data[dsp_phase_index]
|
||||
+ coeffs[2] * dsp_data[dsp_phase_index+1]
|
||||
+ coeffs[3] * end_point1);
|
||||
|
||||
/* increment phase and amplitude */
|
||||
fluid_phase_incr (dsp_phase, dsp_phase_incr);
|
||||
dsp_phase_index = fluid_phase_index (dsp_phase);
|
||||
dsp_amp += dsp_amp_incr;
|
||||
}
|
||||
|
||||
end_index++; /* we're now interpolating the last point */
|
||||
|
||||
/* interpolate within the last point */
|
||||
for (; dsp_phase_index <= end_index && dsp_i < FLUID_BUFSIZE; dsp_i++)
|
||||
{
|
||||
coeffs = interp_coeff[fluid_phase_fract_to_tablerow (dsp_phase)];
|
||||
dsp_buf[dsp_i] = dsp_amp * (coeffs[0] * dsp_data[dsp_phase_index-1]
|
||||
+ coeffs[1] * dsp_data[dsp_phase_index]
|
||||
+ coeffs[2] * end_point1
|
||||
+ coeffs[3] * end_point2);
|
||||
|
||||
/* increment phase and amplitude */
|
||||
fluid_phase_incr (dsp_phase, dsp_phase_incr);
|
||||
dsp_phase_index = fluid_phase_index (dsp_phase);
|
||||
dsp_amp += dsp_amp_incr;
|
||||
}
|
||||
|
||||
if (!looping) break; /* break out if not looping (end of sample) */
|
||||
|
||||
/* go back to loop start */
|
||||
if (dsp_phase_index > end_index)
|
||||
{
|
||||
fluid_phase_sub_int (dsp_phase, voice->loopend - voice->loopstart);
|
||||
|
||||
if (!voice->has_looped)
|
||||
{
|
||||
voice->has_looped = 1;
|
||||
start_index = voice->loopstart;
|
||||
start_point = dsp_data[voice->loopend - 1];
|
||||
}
|
||||
}
|
||||
|
||||
/* break out if filled buffer */
|
||||
if (dsp_i >= FLUID_BUFSIZE) break;
|
||||
|
||||
end_index -= 2; /* set end back to third to last sample point */
|
||||
}
|
||||
|
||||
voice->phase = dsp_phase;
|
||||
voice->amp = dsp_amp;
|
||||
|
||||
return (dsp_i);
|
||||
}
|
||||
|
||||
/* 7th order interpolation.
|
||||
* Returns number of samples processed (usually FLUID_BUFSIZE but could be
|
||||
* smaller if end of sample occurs).
|
||||
*/
|
||||
int
|
||||
fluid_dsp_float_interpolate_7th_order (fluid_voice_t *voice)
|
||||
{
|
||||
fluid_phase_t dsp_phase = voice->phase;
|
||||
fluid_phase_t dsp_phase_incr;
|
||||
short int *dsp_data = voice->sample->data;
|
||||
fluid_real_t *dsp_buf = voice->dsp_buf;
|
||||
fluid_real_t dsp_amp = voice->amp;
|
||||
fluid_real_t dsp_amp_incr = voice->amp_incr;
|
||||
unsigned int dsp_i = 0;
|
||||
unsigned int dsp_phase_index;
|
||||
unsigned int start_index, end_index;
|
||||
short int start_points[3];
|
||||
short int end_points[3];
|
||||
fluid_real_t *coeffs;
|
||||
int looping;
|
||||
|
||||
/* Convert playback "speed" floating point value to phase index/fract */
|
||||
fluid_phase_set_float (dsp_phase_incr, voice->phase_incr);
|
||||
|
||||
/* add 1/2 sample to dsp_phase since 7th order interpolation is centered on
|
||||
* the 4th sample point */
|
||||
fluid_phase_incr (dsp_phase, (fluid_phase_t)0x80000000);
|
||||
|
||||
/* voice is currently looping? */
|
||||
looping = fluid_voice_is_looping(voice);
|
||||
|
||||
/* last index before 7th interpolation point must be specially handled */
|
||||
end_index = (looping ? voice->loopend - 1 : voice->end) - 3;
|
||||
|
||||
if (voice->has_looped) /* set start_index and start point if looped or not */
|
||||
{
|
||||
start_index = voice->loopstart;
|
||||
start_points[0] = dsp_data[voice->loopend - 1];
|
||||
start_points[1] = dsp_data[voice->loopend - 2];
|
||||
start_points[2] = dsp_data[voice->loopend - 3];
|
||||
}
|
||||
else
|
||||
{
|
||||
start_index = voice->start;
|
||||
start_points[0] = dsp_data[voice->start]; /* just duplicate the start point */
|
||||
start_points[1] = start_points[0];
|
||||
start_points[2] = start_points[0];
|
||||
}
|
||||
|
||||
/* get the 3 points off the end (loop start if looping, duplicate point if end) */
|
||||
if (looping)
|
||||
{
|
||||
end_points[0] = dsp_data[voice->loopstart];
|
||||
end_points[1] = dsp_data[voice->loopstart + 1];
|
||||
end_points[2] = dsp_data[voice->loopstart + 2];
|
||||
}
|
||||
else
|
||||
{
|
||||
end_points[0] = dsp_data[voice->end];
|
||||
end_points[1] = end_points[0];
|
||||
end_points[2] = end_points[0];
|
||||
}
|
||||
|
||||
while (1)
|
||||
{
|
||||
dsp_phase_index = fluid_phase_index (dsp_phase);
|
||||
|
||||
/* interpolate first sample point (start or loop start) if needed */
|
||||
for ( ; dsp_phase_index == start_index && dsp_i < FLUID_BUFSIZE; dsp_i++)
|
||||
{
|
||||
coeffs = sinc_table7[fluid_phase_fract_to_tablerow (dsp_phase)];
|
||||
|
||||
dsp_buf[dsp_i] = dsp_amp
|
||||
* (coeffs[0] * (fluid_real_t)start_points[2]
|
||||
+ coeffs[1] * (fluid_real_t)start_points[1]
|
||||
+ coeffs[2] * (fluid_real_t)start_points[0]
|
||||
+ coeffs[3] * (fluid_real_t)dsp_data[dsp_phase_index]
|
||||
+ coeffs[4] * (fluid_real_t)dsp_data[dsp_phase_index+1]
|
||||
+ coeffs[5] * (fluid_real_t)dsp_data[dsp_phase_index+2]
|
||||
+ coeffs[6] * (fluid_real_t)dsp_data[dsp_phase_index+3]);
|
||||
|
||||
/* increment phase and amplitude */
|
||||
fluid_phase_incr (dsp_phase, dsp_phase_incr);
|
||||
dsp_phase_index = fluid_phase_index (dsp_phase);
|
||||
dsp_amp += dsp_amp_incr;
|
||||
}
|
||||
|
||||
start_index++;
|
||||
|
||||
/* interpolate 2nd to first sample point (start or loop start) if needed */
|
||||
for ( ; dsp_phase_index == start_index && dsp_i < FLUID_BUFSIZE; dsp_i++)
|
||||
{
|
||||
coeffs = sinc_table7[fluid_phase_fract_to_tablerow (dsp_phase)];
|
||||
|
||||
dsp_buf[dsp_i] = dsp_amp
|
||||
* (coeffs[0] * (fluid_real_t)start_points[1]
|
||||
+ coeffs[1] * (fluid_real_t)start_points[0]
|
||||
+ coeffs[2] * (fluid_real_t)dsp_data[dsp_phase_index-1]
|
||||
+ coeffs[3] * (fluid_real_t)dsp_data[dsp_phase_index]
|
||||
+ coeffs[4] * (fluid_real_t)dsp_data[dsp_phase_index+1]
|
||||
+ coeffs[5] * (fluid_real_t)dsp_data[dsp_phase_index+2]
|
||||
+ coeffs[6] * (fluid_real_t)dsp_data[dsp_phase_index+3]);
|
||||
|
||||
/* increment phase and amplitude */
|
||||
fluid_phase_incr (dsp_phase, dsp_phase_incr);
|
||||
dsp_phase_index = fluid_phase_index (dsp_phase);
|
||||
dsp_amp += dsp_amp_incr;
|
||||
}
|
||||
|
||||
start_index++;
|
||||
|
||||
/* interpolate 3rd to first sample point (start or loop start) if needed */
|
||||
for ( ; dsp_phase_index == start_index && dsp_i < FLUID_BUFSIZE; dsp_i++)
|
||||
{
|
||||
coeffs = sinc_table7[fluid_phase_fract_to_tablerow (dsp_phase)];
|
||||
|
||||
dsp_buf[dsp_i] = dsp_amp
|
||||
* (coeffs[0] * (fluid_real_t)start_points[0]
|
||||
+ coeffs[1] * (fluid_real_t)dsp_data[dsp_phase_index-2]
|
||||
+ coeffs[2] * (fluid_real_t)dsp_data[dsp_phase_index-1]
|
||||
+ coeffs[3] * (fluid_real_t)dsp_data[dsp_phase_index]
|
||||
+ coeffs[4] * (fluid_real_t)dsp_data[dsp_phase_index+1]
|
||||
+ coeffs[5] * (fluid_real_t)dsp_data[dsp_phase_index+2]
|
||||
+ coeffs[6] * (fluid_real_t)dsp_data[dsp_phase_index+3]);
|
||||
|
||||
/* increment phase and amplitude */
|
||||
fluid_phase_incr (dsp_phase, dsp_phase_incr);
|
||||
dsp_phase_index = fluid_phase_index (dsp_phase);
|
||||
dsp_amp += dsp_amp_incr;
|
||||
}
|
||||
|
||||
start_index -= 2; /* set back to original start index */
|
||||
|
||||
|
||||
/* interpolate the sequence of sample points */
|
||||
for ( ; dsp_i < FLUID_BUFSIZE && dsp_phase_index <= end_index; dsp_i++)
|
||||
{
|
||||
coeffs = sinc_table7[fluid_phase_fract_to_tablerow (dsp_phase)];
|
||||
|
||||
dsp_buf[dsp_i] = dsp_amp
|
||||
* (coeffs[0] * (fluid_real_t)dsp_data[dsp_phase_index-3]
|
||||
+ coeffs[1] * (fluid_real_t)dsp_data[dsp_phase_index-2]
|
||||
+ coeffs[2] * (fluid_real_t)dsp_data[dsp_phase_index-1]
|
||||
+ coeffs[3] * (fluid_real_t)dsp_data[dsp_phase_index]
|
||||
+ coeffs[4] * (fluid_real_t)dsp_data[dsp_phase_index+1]
|
||||
+ coeffs[5] * (fluid_real_t)dsp_data[dsp_phase_index+2]
|
||||
+ coeffs[6] * (fluid_real_t)dsp_data[dsp_phase_index+3]);
|
||||
|
||||
/* increment phase and amplitude */
|
||||
fluid_phase_incr (dsp_phase, dsp_phase_incr);
|
||||
dsp_phase_index = fluid_phase_index (dsp_phase);
|
||||
dsp_amp += dsp_amp_incr;
|
||||
}
|
||||
|
||||
/* break out if buffer filled */
|
||||
if (dsp_i >= FLUID_BUFSIZE) break;
|
||||
|
||||
end_index++; /* we're now interpolating the 3rd to last point */
|
||||
|
||||
/* interpolate within 3rd to last point */
|
||||
for (; dsp_phase_index <= end_index && dsp_i < FLUID_BUFSIZE; dsp_i++)
|
||||
{
|
||||
coeffs = sinc_table7[fluid_phase_fract_to_tablerow (dsp_phase)];
|
||||
|
||||
dsp_buf[dsp_i] = dsp_amp
|
||||
* (coeffs[0] * (fluid_real_t)dsp_data[dsp_phase_index-3]
|
||||
+ coeffs[1] * (fluid_real_t)dsp_data[dsp_phase_index-2]
|
||||
+ coeffs[2] * (fluid_real_t)dsp_data[dsp_phase_index-1]
|
||||
+ coeffs[3] * (fluid_real_t)dsp_data[dsp_phase_index]
|
||||
+ coeffs[4] * (fluid_real_t)dsp_data[dsp_phase_index+1]
|
||||
+ coeffs[5] * (fluid_real_t)dsp_data[dsp_phase_index+2]
|
||||
+ coeffs[6] * (fluid_real_t)end_points[0]);
|
||||
|
||||
/* increment phase and amplitude */
|
||||
fluid_phase_incr (dsp_phase, dsp_phase_incr);
|
||||
dsp_phase_index = fluid_phase_index (dsp_phase);
|
||||
dsp_amp += dsp_amp_incr;
|
||||
}
|
||||
|
||||
end_index++; /* we're now interpolating the 2nd to last point */
|
||||
|
||||
/* interpolate within 2nd to last point */
|
||||
for (; dsp_phase_index <= end_index && dsp_i < FLUID_BUFSIZE; dsp_i++)
|
||||
{
|
||||
coeffs = sinc_table7[fluid_phase_fract_to_tablerow (dsp_phase)];
|
||||
|
||||
dsp_buf[dsp_i] = dsp_amp
|
||||
* (coeffs[0] * (fluid_real_t)dsp_data[dsp_phase_index-3]
|
||||
+ coeffs[1] * (fluid_real_t)dsp_data[dsp_phase_index-2]
|
||||
+ coeffs[2] * (fluid_real_t)dsp_data[dsp_phase_index-1]
|
||||
+ coeffs[3] * (fluid_real_t)dsp_data[dsp_phase_index]
|
||||
+ coeffs[4] * (fluid_real_t)dsp_data[dsp_phase_index+1]
|
||||
+ coeffs[5] * (fluid_real_t)end_points[0]
|
||||
+ coeffs[6] * (fluid_real_t)end_points[1]);
|
||||
|
||||
/* increment phase and amplitude */
|
||||
fluid_phase_incr (dsp_phase, dsp_phase_incr);
|
||||
dsp_phase_index = fluid_phase_index (dsp_phase);
|
||||
dsp_amp += dsp_amp_incr;
|
||||
}
|
||||
|
||||
end_index++; /* we're now interpolating the last point */
|
||||
|
||||
/* interpolate within last point */
|
||||
for (; dsp_phase_index <= end_index && dsp_i < FLUID_BUFSIZE; dsp_i++)
|
||||
{
|
||||
coeffs = sinc_table7[fluid_phase_fract_to_tablerow (dsp_phase)];
|
||||
|
||||
dsp_buf[dsp_i] = dsp_amp
|
||||
* (coeffs[0] * (fluid_real_t)dsp_data[dsp_phase_index-3]
|
||||
+ coeffs[1] * (fluid_real_t)dsp_data[dsp_phase_index-2]
|
||||
+ coeffs[2] * (fluid_real_t)dsp_data[dsp_phase_index-1]
|
||||
+ coeffs[3] * (fluid_real_t)dsp_data[dsp_phase_index]
|
||||
+ coeffs[4] * (fluid_real_t)end_points[0]
|
||||
+ coeffs[5] * (fluid_real_t)end_points[1]
|
||||
+ coeffs[6] * (fluid_real_t)end_points[2]);
|
||||
|
||||
/* increment phase and amplitude */
|
||||
fluid_phase_incr (dsp_phase, dsp_phase_incr);
|
||||
dsp_phase_index = fluid_phase_index (dsp_phase);
|
||||
dsp_amp += dsp_amp_incr;
|
||||
}
|
||||
|
||||
if (!looping) break; /* break out if not looping (end of sample) */
|
||||
|
||||
/* go back to loop start */
|
||||
if (dsp_phase_index > end_index)
|
||||
{
|
||||
fluid_phase_sub_int (dsp_phase, voice->loopend - voice->loopstart);
|
||||
|
||||
if (!voice->has_looped)
|
||||
{
|
||||
voice->has_looped = 1;
|
||||
start_index = voice->loopstart;
|
||||
start_points[0] = dsp_data[voice->loopend - 1];
|
||||
start_points[1] = dsp_data[voice->loopend - 2];
|
||||
start_points[2] = dsp_data[voice->loopend - 3];
|
||||
}
|
||||
}
|
||||
|
||||
/* break out if filled buffer */
|
||||
if (dsp_i >= FLUID_BUFSIZE) break;
|
||||
|
||||
end_index -= 3; /* set end back to 4th to last sample point */
|
||||
}
|
||||
|
||||
/* sub 1/2 sample from dsp_phase since 7th order interpolation is centered on
|
||||
* the 4th sample point (correct back to real value) */
|
||||
fluid_phase_decr (dsp_phase, (fluid_phase_t)0x80000000);
|
||||
|
||||
voice->phase = dsp_phase;
|
||||
voice->amp = dsp_amp;
|
||||
|
||||
return (dsp_i);
|
||||
}
|
|
@ -1,120 +0,0 @@
|
|||
/* FluidSynth - A Software Synthesizer
|
||||
*
|
||||
* 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 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
|
||||
/* Purpose:
|
||||
* Low-level voice processing:
|
||||
*
|
||||
* - interpolates (obtains values between the samples of the original waveform data)
|
||||
* - filters (applies a lowpass filter with variable cutoff frequency and quality factor)
|
||||
* - mixes the processed sample to left and right output using the pan setting
|
||||
* - sends the processed sample to chorus and reverb
|
||||
*
|
||||
*
|
||||
* This file does -not- generate an object file.
|
||||
* Instead, it is #included in several places in fluid_voice.c.
|
||||
* The motivation for this is
|
||||
* - Calling it as a subroutine may be time consuming, especially with optimization off
|
||||
* - The previous implementation as a macro was clumsy to handle
|
||||
*
|
||||
*
|
||||
* Fluid_voice.c sets a couple of variables before #including this:
|
||||
* - dsp_data: Pointer to the original waveform data
|
||||
* - dsp_left_buf: The generated signal goes here, left channel
|
||||
* - dsp_right_buf: right channel
|
||||
* - dsp_reverb_buf: Send to reverb unit
|
||||
* - dsp_chorus_buf: Send to chorus unit
|
||||
* - dsp_start: Start processing at this output buffer index
|
||||
* - dsp_end: End processing just before this output buffer index
|
||||
* - dsp_a1: Coefficient for the filter
|
||||
* - dsp_a2: same
|
||||
* - dsp_b0: same
|
||||
* - dsp_b1: same
|
||||
* - dsp_b2: same
|
||||
* - dsp_filter_flag: Set, the filter is needed (many sound fonts don't use
|
||||
* the filter at all. If it is left at its default setting
|
||||
* of roughly 20 kHz, there is no need to apply filterling.)
|
||||
* - dsp_interp_method: Which interpolation method to use.
|
||||
* - voice holds the voice structure
|
||||
*
|
||||
* Some variables are set and modified:
|
||||
* - dsp_phase: The position in the original waveform data.
|
||||
* This has an integer and a fractional part (between samples).
|
||||
* - dsp_phase_incr: For each output sample, the position in the original
|
||||
* waveform advances by dsp_phase_incr. This also has an integer
|
||||
* part and a fractional part.
|
||||
* If a sample is played at root pitch (no pitch change),
|
||||
* dsp_phase_incr is integer=1 and fractional=0.
|
||||
* - dsp_amp: The current amplitude envelope value.
|
||||
* - dsp_amp_incr: The changing rate of the amplitude envelope.
|
||||
*
|
||||
* A couple of variables are used internally, their results are discarded:
|
||||
* - dsp_i: Index through the output buffer
|
||||
* - dsp_phase_fractional: The fractional part of dsp_phase
|
||||
* - dsp_coeff: A table of four coefficients, depending on the fractional phase.
|
||||
* Used to interpolate between samples.
|
||||
* - dsp_process_buffer: Holds the processed signal between stages
|
||||
* - dsp_centernode: delay line for the IIR filter
|
||||
* - dsp_hist1: same
|
||||
* - dsp_hist2: same
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/* Nonoptimized DSP loop */
|
||||
#warning "This code is meant for experiments only.";
|
||||
|
||||
/* wave table interpolation */
|
||||
for (dsp_i = dsp_start; dsp_i < dsp_end; dsp_i++) {
|
||||
|
||||
dsp_coeff = &interp_coeff[fluid_phase_fract_to_tablerow(dsp_phase)];
|
||||
dsp_phase_index = fluid_phase_index(dsp_phase);
|
||||
dsp_sample = (dsp_amp *
|
||||
(dsp_coeff->a0 * dsp_data[dsp_phase_index]
|
||||
+ dsp_coeff->a1 * dsp_data[dsp_phase_index+1]
|
||||
+ dsp_coeff->a2 * dsp_data[dsp_phase_index+2]
|
||||
+ dsp_coeff->a3 * dsp_data[dsp_phase_index+3]));
|
||||
|
||||
/* increment phase and amplitude */
|
||||
fluid_phase_incr(dsp_phase, dsp_phase_incr);
|
||||
dsp_amp += dsp_amp_incr;
|
||||
|
||||
/* filter */
|
||||
/* The filter is implemented in Direct-II form. */
|
||||
dsp_centernode = dsp_sample - dsp_a1 * dsp_hist1 - dsp_a2 * dsp_hist2;
|
||||
dsp_sample = dsp_b0 * dsp_centernode + dsp_b1 * dsp_hist1 + dsp_b2 * dsp_hist2;
|
||||
dsp_hist2 = dsp_hist1;
|
||||
dsp_hist1 = dsp_centernode;
|
||||
|
||||
/* pan */
|
||||
dsp_left_buf[dsp_i] += voice->amp_left * dsp_sample;
|
||||
dsp_right_buf[dsp_i] += voice->amp_right * dsp_sample;
|
||||
|
||||
/* reverb */
|
||||
if (dsp_reverb_buf){
|
||||
dsp_reverb_buf[dsp_i] += voice->amp_reverb * dsp_sample;
|
||||
}
|
||||
|
||||
/* chorus */
|
||||
if (dsp_chorus_buf){
|
||||
dsp_chorus_buf[dsp_i] += voice->amp_chorus * dsp_sample;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
/* FluidSynth - A Software Synthesizer
|
||||
*
|
||||
* 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 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
/*
|
||||
* Josh Green <josh@resonance.org>
|
||||
* 2009-05-28
|
||||
*/
|
||||
|
||||
#include "fluid_event_queue.h"
|
||||
#include "fluidsynth_priv.h"
|
||||
|
||||
|
||||
/**
|
||||
* Create a lock free queue with a fixed maximum count and size of elements.
|
||||
* @param count Count of elements in queue (fixed max number of queued elements)
|
||||
* @return New lock free queue or NULL if out of memory (error message logged)
|
||||
*
|
||||
* Lockless FIFO queues don't use any locking mechanisms and can therefore be
|
||||
* advantageous in certain situations, such as passing data between a lower
|
||||
* priority thread and a higher "real time" thread, without potential lock
|
||||
* contention which could stall the high priority thread. Note that there may
|
||||
* only be one producer thread and one consumer thread.
|
||||
*/
|
||||
fluid_event_queue_t *
|
||||
fluid_event_queue_new (int count)
|
||||
{
|
||||
fluid_event_queue_t *queue;
|
||||
|
||||
fluid_return_val_if_fail (count > 0, NULL);
|
||||
|
||||
queue = FLUID_NEW (fluid_event_queue_t);
|
||||
|
||||
if (!queue)
|
||||
{
|
||||
FLUID_LOG (FLUID_ERR, "Out of memory");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
queue->array = FLUID_ARRAY (fluid_event_queue_elem_t, count);
|
||||
|
||||
if (!queue->array)
|
||||
{
|
||||
FLUID_FREE (queue);
|
||||
FLUID_LOG (FLUID_ERR, "Out of memory");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Clear array, in case dynamic pointer reclaiming is being done */
|
||||
FLUID_MEMSET (queue->array, 0, sizeof (fluid_event_queue_elem_t) * count);
|
||||
|
||||
queue->totalcount = count;
|
||||
queue->count = 0;
|
||||
queue->in = 0;
|
||||
queue->out = 0;
|
||||
|
||||
return (queue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Free an event queue.
|
||||
* @param queue Lockless queue instance
|
||||
*
|
||||
* Care must be taken when freeing a queue, to ensure that the consumer and
|
||||
* producer threads will no longer access it.
|
||||
*/
|
||||
void
|
||||
fluid_event_queue_free (fluid_event_queue_t *queue)
|
||||
{
|
||||
FLUID_FREE (queue->array);
|
||||
FLUID_FREE (queue);
|
||||
}
|
|
@ -1,195 +0,0 @@
|
|||
/* FluidSynth - A Software Synthesizer
|
||||
*
|
||||
* 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 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#ifndef _FLUID_EVENT_QUEUE_H
|
||||
#define _FLUID_EVENT_QUEUE_H
|
||||
|
||||
#include "fluid_sys.h"
|
||||
#include "fluid_midi.h"
|
||||
#include "fluid_ringbuffer.h"
|
||||
|
||||
/**
|
||||
* Type of queued event.
|
||||
*/
|
||||
enum fluid_event_queue_elem
|
||||
{
|
||||
FLUID_EVENT_QUEUE_ELEM_MIDI, /**< MIDI event. Uses midi field of event value */
|
||||
FLUID_EVENT_QUEUE_ELEM_UPDATE_GAIN, /**< Update synthesizer gain. No payload value */
|
||||
FLUID_EVENT_QUEUE_ELEM_POLYPHONY, /**< Synth polyphony event. No payload value */
|
||||
FLUID_EVENT_QUEUE_ELEM_GEN, /**< Generator event. Uses gen field of event value */
|
||||
FLUID_EVENT_QUEUE_ELEM_PRESET, /**< Preset set event. Uses preset field of event value */
|
||||
FLUID_EVENT_QUEUE_ELEM_STOP_VOICES, /**< Stop voices event. Uses ival field of event value */
|
||||
FLUID_EVENT_QUEUE_ELEM_FREE_PRESET, /**< Free preset return event. Uses pval field of event value */
|
||||
FLUID_EVENT_QUEUE_ELEM_SET_TUNING, /**< Set tuning event. Uses set_tuning field of event value */
|
||||
FLUID_EVENT_QUEUE_ELEM_REPL_TUNING, /**< Replace tuning event. Uses repl_tuning field of event value */
|
||||
FLUID_EVENT_QUEUE_ELEM_UNREF_TUNING /**< Unref tuning return event. Uses unref_tuning field of event value */
|
||||
};
|
||||
|
||||
/**
|
||||
* SoundFont generator set event structure.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int channel; /**< MIDI channel number */
|
||||
int param; /**< FluidSynth generator ID */
|
||||
float value; /**< Value for the generator (absolute or relative) */
|
||||
int absolute; /**< 1 if value is absolute, 0 if relative */
|
||||
} fluid_event_gen_t;
|
||||
|
||||
/**
|
||||
* Preset channel assignment event structure.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int channel; /**< MIDI channel number */
|
||||
fluid_preset_t *preset; /**< Preset to assign (synth thread owns) */
|
||||
} fluid_event_preset_t;
|
||||
|
||||
/**
|
||||
* Tuning assignment event structure.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
char apply; /**< TRUE to set tuning in realtime */
|
||||
int channel; /**< MIDI channel number */
|
||||
fluid_tuning_t *tuning; /**< Tuning to assign */
|
||||
} fluid_event_set_tuning_t;
|
||||
|
||||
/**
|
||||
* Tuning replacement event structure.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
char apply; /**< TRUE if tuning change should be applied in realtime */
|
||||
fluid_tuning_t *old_tuning; /**< Old tuning pointer to replace */
|
||||
fluid_tuning_t *new_tuning; /**< New tuning to assign */
|
||||
} fluid_event_repl_tuning_t;
|
||||
|
||||
/**
|
||||
* Tuning unref event structure.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
fluid_tuning_t *tuning; /**< Tuning to unref */
|
||||
int count; /**< Number of times to unref */
|
||||
} fluid_event_unref_tuning_t;
|
||||
|
||||
/**
|
||||
* Structure for an integer parameter sent to a MIDI channel (bank or SoundFont ID for example).
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int channel;
|
||||
int val;
|
||||
} fluid_event_channel_int_t;
|
||||
|
||||
/**
|
||||
* Event queue element structure.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
char type; /**< fluid_event_queue_elem */
|
||||
|
||||
union
|
||||
{
|
||||
fluid_midi_event_t midi; /**< If type == FLUID_EVENT_QUEUE_ELEM_MIDI */
|
||||
fluid_event_gen_t gen; /**< If type == FLUID_EVENT_QUEUE_ELEM_GEN */
|
||||
fluid_event_preset_t preset; /**< If type == FLUID_EVENT_QUEUE_ELEM_PRESET */
|
||||
fluid_event_set_tuning_t set_tuning; /**< If type == FLUID_EVENT_QUEUE_ELEM_SET_TUNING */
|
||||
fluid_event_repl_tuning_t repl_tuning; /**< If type == FLUID_EVENT_QUEUE_ELEM_REPL_TUNING */
|
||||
fluid_event_unref_tuning_t unref_tuning; /**< If type == FLUID_EVENT_QUEUE_ELEM_UNREF_TUNING */
|
||||
double dval; /**< A floating point payload value */
|
||||
int ival; /**< An integer payload value */
|
||||
void *pval; /**< A pointer payload value */
|
||||
};
|
||||
} fluid_event_queue_elem_t;
|
||||
|
||||
typedef struct _fluid_ringbuffer_t fluid_event_queue_t;
|
||||
|
||||
static FLUID_INLINE fluid_event_queue_t *
|
||||
fluid_event_queue_new (int count)
|
||||
{
|
||||
return (fluid_event_queue_t *) new_fluid_ringbuffer(count, sizeof(fluid_event_queue_elem_t));
|
||||
}
|
||||
|
||||
static FLUID_INLINE void fluid_event_queue_free (fluid_event_queue_t *queue)
|
||||
{
|
||||
delete_fluid_ringbuffer(queue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get pointer to next input array element in queue.
|
||||
* @param queue Lockless queue instance
|
||||
* @return Pointer to array element in queue to store data to or NULL if queue is full
|
||||
*
|
||||
* This function along with fluid_queue_next_inptr() form a queue "push"
|
||||
* operation and is split into 2 functions to avoid an element copy. Note that
|
||||
* the returned array element pointer may contain the data of a previous element
|
||||
* if the queue has wrapped around. This can be used to reclaim pointers to
|
||||
* allocated memory, etc.
|
||||
*/
|
||||
static FLUID_INLINE fluid_event_queue_elem_t *
|
||||
fluid_event_queue_get_inptr (fluid_event_queue_t *queue)
|
||||
{
|
||||
return (fluid_event_queue_elem_t *) fluid_ringbuffer_get_inptr(queue, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Advance the input queue index to complete a "push" operation.
|
||||
* @param queue Lockless queue instance
|
||||
*
|
||||
* This function along with fluid_queue_get_inptr() form a queue "push"
|
||||
* operation and is split into 2 functions to avoid element copy.
|
||||
*/
|
||||
static FLUID_INLINE void
|
||||
fluid_event_queue_next_inptr (fluid_event_queue_t *queue)
|
||||
{
|
||||
fluid_ringbuffer_next_inptr(queue, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get pointer to next output array element in queue.
|
||||
* @param queue Lockless queue instance
|
||||
* @return Pointer to array element data in the queue or NULL if empty, can only
|
||||
* be used up until fluid_queue_next_outptr() is called.
|
||||
*
|
||||
* This function along with fluid_queue_next_outptr() form a queue "pop"
|
||||
* operation and is split into 2 functions to avoid an element copy.
|
||||
*/
|
||||
static FLUID_INLINE fluid_event_queue_elem_t *
|
||||
fluid_event_queue_get_outptr (fluid_event_queue_t *queue)
|
||||
{
|
||||
return (fluid_event_queue_elem_t *) fluid_ringbuffer_get_outptr(queue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Advance the output queue index to complete a "pop" operation.
|
||||
* @param queue Lockless queue instance
|
||||
*
|
||||
* This function along with fluid_queue_get_outptr() form a queue "pop"
|
||||
* operation and is split into 2 functions to avoid an element copy.
|
||||
*/
|
||||
static FLUID_INLINE void
|
||||
fluid_event_queue_next_outptr (fluid_event_queue_t *queue)
|
||||
{
|
||||
fluid_ringbuffer_next_outptr(queue);
|
||||
}
|
||||
|
||||
#endif /* _FLUID_EVENT_QUEUE_H */
|
|
@ -1,204 +0,0 @@
|
|||
/* FluidSynth - A Software Synthesizer
|
||||
*
|
||||
* 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 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
|
||||
#include "fluid_rvoice_handler.h"
|
||||
|
||||
|
||||
fluid_rvoice_handler_t* new_fluid_rvoice_handler(void)
|
||||
{
|
||||
fluid_rvoice_handler_t* handler;
|
||||
|
||||
handler = FLUID_NEW(fluid_rvoice_handler_t);
|
||||
if (handler == NULL) {
|
||||
FLUID_LOG(FLUID_ERR, "Out of memory");
|
||||
return NULL;
|
||||
}
|
||||
FLUID_MEMSET(handler, 0, sizeof(fluid_rvoice_handler_t));
|
||||
|
||||
return handler;
|
||||
}
|
||||
|
||||
void delete_fluid_rvoice_handler(fluid_rvoice_handler_t* handler)
|
||||
{
|
||||
if (handler == NULL)
|
||||
return;
|
||||
|
||||
#if 0
|
||||
FLUID_FREE(handler->finished_voices);
|
||||
#endif
|
||||
FLUID_FREE(handler->voices);
|
||||
FLUID_FREE(handler);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
fluid_rvoice_handler_add_voice(fluid_rvoice_handler_t* handler, fluid_rvoice_t* voice)
|
||||
{
|
||||
if (handler->active_voices >= handler->polyphony) {
|
||||
FLUID_LOG(FLUID_WARN, "Trying to exceed polyphony in fluid_rvoice_handler_add_voice");
|
||||
return FLUID_FAILED;
|
||||
}
|
||||
handler->voices[handler->active_voices++] = voice;
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update polyphony - max number of voices (NOTE: not hard real-time capable)
|
||||
* @return FLUID_OK or FLUID_FAILED
|
||||
*/
|
||||
int
|
||||
fluid_rvoice_handler_set_polyphony(fluid_rvoice_handler_t* handler, int value)
|
||||
{
|
||||
void* newptr;
|
||||
if (handler->active_voices > value)
|
||||
return FLUID_FAILED;
|
||||
#if 0
|
||||
if (handler->finished_voice_count > value)
|
||||
return FLUID_FAILED;
|
||||
#endif
|
||||
|
||||
newptr = FLUID_REALLOC(handler->voices, value * sizeof(fluid_rvoice_t*));
|
||||
if (newptr == NULL)
|
||||
return FLUID_FAILED;
|
||||
handler->voices = newptr;
|
||||
#if 0
|
||||
newptr = FLUID_REALLOC(handler->finished_voices, value * sizeof(fluid_rvoice_t*));
|
||||
if (newptr == NULL)
|
||||
return FLUID_FAILED;
|
||||
handler->finished_voices = newptr;
|
||||
#endif
|
||||
|
||||
handler->polyphony = value;
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
static void
|
||||
fluid_rvoice_handler_remove_voice(fluid_rvoice_handler_t* handler, int index)
|
||||
{
|
||||
#if 0
|
||||
if (handler->finished_voice_count < handler->polyphony)
|
||||
handler->finished_voices[handler->finished_voice_count++] = handler->voices[index];
|
||||
#endif
|
||||
|
||||
if (handler->remove_voice_callback != NULL)
|
||||
handler->remove_voice_callback(handler->remove_voice_callback_userdata,
|
||||
handler->voices[index]);
|
||||
|
||||
handler->active_voices--;
|
||||
if (index < handler->active_voices) /* Move the last voice into the "hole" */
|
||||
handler->voices[index] = handler->voices[handler->active_voices];
|
||||
}
|
||||
|
||||
/**
|
||||
* Synthesize one voice
|
||||
* @return Number of samples written
|
||||
*/
|
||||
#if 0
|
||||
static FLUID_INLINE int
|
||||
fluid_rvoice_handler_write_one(fluid_rvoice_handler_t* handler, int index,
|
||||
fluid_real_t* buf, int blockcount)
|
||||
{
|
||||
int i, result = 0;
|
||||
fluid_rvoice_t* voice = handler->voices[index];
|
||||
for (i=0; i < blockcount; i++) {
|
||||
int s = fluid_rvoice_write(voice, buf);
|
||||
if (s == -1) {
|
||||
FLUID_MEMSET(buf, 0, FLUID_BUFSIZE*sizeof(fluid_real_t));
|
||||
s = FLUID_BUFSIZE;
|
||||
}
|
||||
buf += s;
|
||||
result += s;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Synthesize one voice and add to buffer.
|
||||
* NOTE: If return value is less than blockcount*FLUID_BUFSIZE, that means
|
||||
* voice has been finished, removed and possibly replaced with another voice.
|
||||
* @return Number of samples written
|
||||
*/
|
||||
static FLUID_INLINE int
|
||||
fluid_rvoice_handler_mix_one(fluid_rvoice_handler_t* handler, int index,
|
||||
fluid_real_t** bufs, unsigned int blockcount, unsigned int bufcount)
|
||||
{
|
||||
unsigned int i, j=0, result = 0;
|
||||
fluid_rvoice_t* voice = handler->voices[index];
|
||||
|
||||
fluid_real_t local_buf[FLUID_BUFSIZE*blockcount];
|
||||
|
||||
for (i=0; i < blockcount; i++) {
|
||||
int s = fluid_rvoice_write(voice, &local_buf[FLUID_BUFSIZE*i]);
|
||||
if (s == -1) {
|
||||
s = FLUID_BUFSIZE; /* Voice is quiet, TODO: optimize away memset/mix */
|
||||
FLUID_MEMSET(&local_buf[FLUID_BUFSIZE*i], 0, FLUID_BUFSIZE*sizeof(fluid_real_t*));
|
||||
}
|
||||
result += s;
|
||||
if (s < FLUID_BUFSIZE) {
|
||||
j = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
fluid_rvoice_buffers_mix(&voice->buffers, local_buf, result, bufs, bufcount);
|
||||
|
||||
if (j)
|
||||
fluid_rvoice_handler_remove_voice(handler, index);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static FLUID_INLINE void
|
||||
fluid_resetbufs(int blockcount, int bufcount, fluid_real_t** bufs)
|
||||
{
|
||||
int i;
|
||||
for (i=0; i < bufcount; i++)
|
||||
FLUID_MEMSET(bufs[i], 0, blockcount * FLUID_BUFSIZE * sizeof(fluid_real_t));
|
||||
}
|
||||
|
||||
/**
|
||||
* Single-threaded scenario, no worker threads
|
||||
*/
|
||||
static FLUID_INLINE void
|
||||
fluid_rvoice_handler_render_loop_simple(fluid_rvoice_handler_t* handler,
|
||||
int blockcount, int bufcount, fluid_real_t** bufs)
|
||||
{
|
||||
int i;
|
||||
int scount = blockcount * FLUID_BUFSIZE;
|
||||
for (i=0; i < handler->active_voices; i++) {
|
||||
int s = fluid_rvoice_handler_mix_one(handler, i, bufs, blockcount, bufcount);
|
||||
if (s < scount) i--; /* Need to render the moved voice as well */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param blockcount number of samples to render is blockcount*FLUID_BUFSIZE
|
||||
* @param bufcount number of buffers to render into
|
||||
* @param bufs array of bufcount buffers, each containing blockcount*FLUID_BUFSIZE samples
|
||||
*/
|
||||
void
|
||||
fluid_rvoice_handler_render(fluid_rvoice_handler_t* handler,
|
||||
int blockcount, int bufcount, fluid_real_t** bufs)
|
||||
{
|
||||
fluid_resetbufs(blockcount, bufcount, bufs);
|
||||
fluid_rvoice_handler_render_loop_simple(handler, blockcount, bufcount, bufs);
|
||||
}
|
|
@ -1,80 +0,0 @@
|
|||
/* FluidSynth - A Software Synthesizer
|
||||
*
|
||||
* 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 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _FLUID_RVOICE_HANDLER_H
|
||||
#define _FLUID_RVOICE_HANDLER_H
|
||||
|
||||
#include "fluid_rvoice.h"
|
||||
#include "fluid_sys.h"
|
||||
|
||||
typedef struct _fluid_rvoice_handler_t fluid_rvoice_handler_t;
|
||||
|
||||
struct _fluid_rvoice_handler_t {
|
||||
fluid_rvoice_t** voices; /* Sorted so that all nulls are last */
|
||||
int polyphony; /* Length of voices array */
|
||||
int active_voices; /* Number of non-null voices */
|
||||
#if 0
|
||||
fluid_rvoice_t** finished_voices; /* List of voices who have finished */
|
||||
int finished_voice_count;
|
||||
#endif
|
||||
void (*remove_voice_callback)(void*, fluid_rvoice_t*); /**< Recieve this callback every time a voice is removed */
|
||||
void* remove_voice_callback_userdata;
|
||||
};
|
||||
|
||||
int fluid_rvoice_handler_add_voice(fluid_rvoice_handler_t* handler, fluid_rvoice_t* voice);
|
||||
int fluid_rvoice_handler_set_polyphony(fluid_rvoice_handler_t* handler, int value);
|
||||
|
||||
void fluid_rvoice_handler_render(fluid_rvoice_handler_t* handler,
|
||||
int blockcount, int bufcount,
|
||||
fluid_real_t** bufs);
|
||||
|
||||
|
||||
static FLUID_INLINE void
|
||||
fluid_rvoice_handler_set_voice_callback(
|
||||
fluid_rvoice_handler_t* handler,
|
||||
void (*func)(void*, fluid_rvoice_t*),
|
||||
void* userdata)
|
||||
{
|
||||
handler->remove_voice_callback_userdata = userdata;
|
||||
handler->remove_voice_callback = func;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static FLUID_INLINE fluid_rvoice_t**
|
||||
fluid_rvoice_handler_get_finished_voices(fluid_rvoice_handler_t* handler,
|
||||
int* count)
|
||||
{
|
||||
*count = handler->finished_voice_count;
|
||||
return handler->finished_voices;
|
||||
}
|
||||
|
||||
static FLUID_INLINE void
|
||||
fluid_rvoice_handler_clear_finished_voices(fluid_rvoice_handler_t* handler)
|
||||
{
|
||||
handler->finished_voice_count = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
fluid_rvoice_handler_t* new_fluid_rvoice_handler(void);
|
||||
void delete_fluid_rvoice_handler(fluid_rvoice_handler_t* handler);
|
||||
|
||||
#endif
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "fluidsynth"=fluidsynth\fluidsynth.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "fluidsynth_dll"=fluidsynth_dll\fluidsynth_dll.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "fluidsynth_lib"=fluidsynth_lib\fluidsynth_lib.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual C++ Express 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fluidsynth", "fluidsynth\fluidsynth.vcproj", "{8150EAA4-CF92-448B-972A-01A423B3A23D}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A52C4164-8C82-4E38-A70B-6D0E836D6644} = {A52C4164-8C82-4E38-A70B-6D0E836D6644}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fluidsynth_dll", "fluidsynth_dll\fluidsynth_dll.vcproj", "{A52C4164-8C82-4E38-A70B-6D0E836D6644}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fluidsynth_lib", "fluidsynth_lib\fluidsynth_lib.vcproj", "{CD7D1A45-9970-4958-BD8F-7F42B083093C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8150EAA4-CF92-448B-972A-01A423B3A23D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{8150EAA4-CF92-448B-972A-01A423B3A23D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{8150EAA4-CF92-448B-972A-01A423B3A23D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{8150EAA4-CF92-448B-972A-01A423B3A23D}.Release|Win32.Build.0 = Release|Win32
|
||||
{A52C4164-8C82-4E38-A70B-6D0E836D6644}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{A52C4164-8C82-4E38-A70B-6D0E836D6644}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{A52C4164-8C82-4E38-A70B-6D0E836D6644}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{A52C4164-8C82-4E38-A70B-6D0E836D6644}.Release|Win32.Build.0 = Release|Win32
|
||||
{CD7D1A45-9970-4958-BD8F-7F42B083093C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{CD7D1A45-9970-4958-BD8F-7F42B083093C}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{CD7D1A45-9970-4958-BD8F-7F42B083093C}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{CD7D1A45-9970-4958-BD8F-7F42B083093C}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -1,90 +0,0 @@
|
|||
# Microsoft Developer Studio Project File - Name="fluidsynth" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=fluidsynth - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "fluidsynth.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "fluidsynth.mak" CFG="fluidsynth - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "fluidsynth - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "fluidsynth - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "fluidsynth - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir ".\Debug"
|
||||
# PROP BASE Intermediate_Dir ".\Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ".\Debug"
|
||||
# PROP Intermediate_Dir ".\Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /I "..\..\include" /Zi /W3 /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /Fp".\Debug\fluidsynth.pch" /Fo".\Debug\" /Fd".\Debug\" /GZ /c
|
||||
# ADD CPP /nologo /MDd /I "..\..\include" /Zi /W3 /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /Fp".\Debug\fluidsynth.pch" /Fo".\Debug\" /Fd".\Debug\" /GZ /c
|
||||
# ADD BASE MTL /tlb ".\Debug/fluidsynth.tlb" /win32
|
||||
# ADD MTL /tlb ".\Debug/fluidsynth.tlb" /win32
|
||||
# ADD BASE RSC /l 1033 /d "_DEBUG"
|
||||
# ADD RSC /l 1033 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32
|
||||
# ADD BSC32
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 odbc32.lib odbccp32.lib dsound.lib winmm.lib /nologo /out:"../fluidsynth_debug.exe" /incremental:no /debug /pdb:".\Debug/fluidsynth_debug.pdb" /pdbtype:sept /subsystem:console /machine:ix86
|
||||
# ADD LINK32 odbc32.lib odbccp32.lib dsound.lib winmm.lib /nologo /out:"../fluidsynth_debug.exe" /incremental:no /debug /pdb:".\Debug/fluidsynth_debug.pdb" /pdbtype:sept /subsystem:console /machine:ix86
|
||||
|
||||
!ELSEIF "$(CFG)" == "fluidsynth - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ".\Release"
|
||||
# PROP BASE Intermediate_Dir ".\Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ".\Release"
|
||||
# PROP Intermediate_Dir ".\Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /I "..\..\include" /W3 /O2 /Ob1 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /GF /Gy /YX /Fo".\Release\" /Fd".\Release\" /c
|
||||
# ADD CPP /nologo /MD /I "..\..\include" /W3 /O2 /Ob1 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /GF /Gy /YX /Fo".\Release\" /Fd".\Release\" /c
|
||||
# ADD BASE MTL /tlb ".\Release/fluidsynth.tlb" /win32
|
||||
# ADD MTL /tlb ".\Release/fluidsynth.tlb" /win32
|
||||
# ADD BASE RSC /l 1033 /d "NDEBUG"
|
||||
# ADD RSC /l 1033 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32
|
||||
# ADD BSC32
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 odbc32.lib odbccp32.lib dsound.lib /nologo /out:"../fluidsynth.exe" /incremental:no /pdb:".\Release/fluidsynth.pdb" /pdbtype:sept /subsystem:console /machine:ix86
|
||||
# ADD LINK32 odbc32.lib odbccp32.lib dsound.lib /nologo /out:"../fluidsynth.exe" /incremental:no /pdb:".\Release/fluidsynth.pdb" /pdbtype:sept /subsystem:console /machine:ix86
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "fluidsynth - Win32 Debug"
|
||||
# Name "fluidsynth - Win32 Release"
|
||||
# End Target
|
||||
# End Project
|
||||
|
|
@ -1,230 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="fluidsynth"
|
||||
ProjectGUID="{8150EAA4-CF92-448B-972A-01A423B3A23D}"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TypeLibraryName=".\Debug/fluidsynth.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=".\Debug\fluidsynth.pch"
|
||||
AssemblerListingLocation=".\Debug\"
|
||||
ObjectFile=".\Debug\"
|
||||
ProgramDataBaseFileName=".\Debug\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib winmm.lib dsound.lib ws2_32.lib glib-2.0.lib gthread-2.0.lib"
|
||||
OutputFile="../fluidsynth_debug.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories=""
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\Debug/fluidsynth_debug.pdb"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
TypeLibraryName=".\Release/fluidsynth.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=""
|
||||
AssemblerListingLocation=".\Release\"
|
||||
ObjectFile=".\Release\"
|
||||
ProgramDataBaseFileName=".\Release\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib dsound.lib"
|
||||
OutputFile="../fluidsynth.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
ProgramDatabaseFile=".\Release/fluidsynth.pdb"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath="..\..\src\fluidsynth.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,90 +0,0 @@
|
|||
# Microsoft Developer Studio Project File - Name="fluidsynth_dll" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=fluidsynth_dll - Win32 Release
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "fluidsynth_dll.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "fluidsynth_dll.mak" CFG="fluidsynth_dll - Win32 Release"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "fluidsynth_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "fluidsynth_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "fluidsynth_dll - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ".\Release"
|
||||
# PROP BASE Intermediate_Dir ".\Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ".\Release"
|
||||
# PROP Intermediate_Dir ".\Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /I "..\..\include" /W3 /O2 /Ob1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "FLUIDSYNTH_DLL_EXPORTS" /D "FLUIDSYNTH_SEQ_DLL_EXPORTS" /D "_MBCS" /GF /Gy /YX /Fo".\Release\" /Fd".\Release\" /c
|
||||
# ADD CPP /nologo /MD /I "..\..\include" /W3 /O2 /Ob1 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "FLUIDSYNTH_DLL_EXPORTS" /D "FLUIDSYNTH_SEQ_DLL_EXPORTS" /D "_MBCS" /GF /Gy /YX /Fo".\Release\" /Fd".\Release\" /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /tlb ".\Release/fluidsynth_dll.tlb" /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /tlb ".\Release/fluidsynth_dll.tlb" /win32
|
||||
# ADD BASE RSC /l 1033 /d "NDEBUG"
|
||||
# ADD RSC /l 1033 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32
|
||||
# ADD BSC32
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 odbc32.lib odbccp32.lib dsound.lib winmm.lib /nologo /out:"../fluidsynth.dll" /incremental:no /pdb:".\Release/fluidsynth.pdb" /pdbtype:sept /subsystem:windows /implib:".\Release/fluidsynth.lib" /machine:ix86
|
||||
# ADD LINK32 odbc32.lib odbccp32.lib dsound.lib winmm.lib /nologo /out:"../fluidsynth.dll" /incremental:no /pdb:".\Release/fluidsynth.pdb" /pdbtype:sept /subsystem:windows /implib:".\Release/fluidsynth.lib" /machine:ix86
|
||||
|
||||
!ELSEIF "$(CFG)" == "fluidsynth_dll - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir ".\Debug"
|
||||
# PROP BASE Intermediate_Dir ".\Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ".\Debug"
|
||||
# PROP Intermediate_Dir ".\Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /I "..\..\include" /Zi /W3 /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "FLUIDSYNTH_DLL_EXPORTS" /D "FLUIDSYNTH_SEQ_DLL_EXPORTS" /D "_MBCS" /YX /Fp".\Debug\fluidsynth_dll.pch" /Fo".\Debug\" /Fd".\Debug\" /GZ /c
|
||||
# ADD CPP /nologo /MTd /I "..\..\include" /Zi /W3 /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "FLUIDSYNTH_DLL_EXPORTS" /D "FLUIDSYNTH_SEQ_DLL_EXPORTS" /D "_MBCS" /YX /Fp".\Debug\fluidsynth_dll.pch" /Fo".\Debug\" /Fd".\Debug\" /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /tlb ".\Debug/fluidsynth_dll.tlb" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /tlb ".\Debug/fluidsynth_dll.tlb" /win32
|
||||
# ADD BASE RSC /l 1033 /d "_DEBUG"
|
||||
# ADD RSC /l 1033 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32
|
||||
# ADD BSC32
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 odbc32.lib odbccp32.lib dsound.lib winmm.lib /nologo /out:"../fluidsynth_debug.dll" /incremental:no /debug /pdb:".\Debug/fluidsynth_debug.pdb" /pdbtype:sept /subsystem:windows /implib:".\Debug/fluidsynth_debug.lib" /machine:ix86
|
||||
# ADD LINK32 odbc32.lib odbccp32.lib dsound.lib winmm.lib /nologo /out:"../fluidsynth_debug.dll" /incremental:no /debug /pdb:".\Debug/fluidsynth_debug.pdb" /pdbtype:sept /subsystem:windows /implib:".\Debug/fluidsynth_debug.lib" /machine:ix86
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "fluidsynth_dll - Win32 Release"
|
||||
# Name "fluidsynth_dll - Win32 Debug"
|
||||
# End Target
|
||||
# End Project
|
||||
|
|
@ -1,983 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="fluidsynth_dll"
|
||||
ProjectGUID="{A52C4164-8C82-4E38-A70B-6D0E836D6644}"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Release/fluidsynth_dll.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\include"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=""
|
||||
AssemblerListingLocation=".\Release\"
|
||||
ObjectFile=".\Release\"
|
||||
ProgramDataBaseFileName=".\Release\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib dsound.lib winmm.lib"
|
||||
OutputFile="../fluidsynth.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
ProgramDatabaseFile=".\Release/fluidsynth.pdb"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
ImportLibrary=".\Release/fluidsynth.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="true"
|
||||
SuppressStartupBanner="true"
|
||||
TargetEnvironment="1"
|
||||
TypeLibraryName=".\Debug/fluidsynth_dll.tlb"
|
||||
HeaderFileName=""
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\include"
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=".\Debug\fluidsynth_dll.pch"
|
||||
AssemblerListingLocation=".\Debug\"
|
||||
ObjectFile=".\Debug\"
|
||||
ProgramDataBaseFileName=".\Debug\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="odbc32.lib odbccp32.lib winmm.lib dsound.lib ws2_32.lib glib-2.0.lib gthread-2.0.lib"
|
||||
OutputFile="../fluidsynth_debug.dll"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="true"
|
||||
AdditionalLibraryDirectories=""
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile=".\Debug/fluidsynth_debug.pdb"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
ImportLibrary=".\Debug/fluidsynth_debug.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath="..\..\src\config_win32.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_adriver.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_adriver.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_aufile.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_chan.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_chan.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_chorus.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_chorus.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_cmd.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_cmd.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_conv.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_conv.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_defsfont.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_defsfont.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_dll.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_dsound.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_dsp_float.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_event.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_event_priv.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_event_queue.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_event_queue.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_filerenderer.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_gen.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_gen.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_hash.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_hash.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_list.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_list.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_mdriver.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_mdriver.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_midi.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_midi.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_midi_router.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_midi_router.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_mod.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_mod.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_phase.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_ramsfont.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_ramsfont.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_rev.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_rev.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_seq.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_seqbind.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_settings.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_settings.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_synth.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_synth.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_sys.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_sys.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_tuning.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_tuning.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_voice.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_voice.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_winmidi.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_MBCS;_USRDLL;FLUIDSYNTH_DLL_EXPORTS;FLUIDSYNTH_SEQ_DLL_EXPORTS;$(NoInherit)"
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluidsynth.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluidsynth_priv.h"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,90 +0,0 @@
|
|||
# Microsoft Developer Studio Project File - Name="fluidsynth_lib" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=fluidsynth_lib - Win32 Release
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "fluidsynth_lib.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "fluidsynth_lib.mak" CFG="fluidsynth_lib - Win32 Release"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "fluidsynth_lib - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "fluidsynth_lib - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "fluidsynth_lib - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ".\Release"
|
||||
# PROP BASE Intermediate_Dir ".\Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ".\Release"
|
||||
# PROP Intermediate_Dir ".\Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /I "..\..\include" /W3 /O2 /Ob1 /D "NDEBUG" /D "WIN32" /D "_LIB" /D "FLUIDSYNTH_NOT_A_DLL" /D "_MBCS" /GF /Gy /YX /Fo".\Release\" /Fd".\Release\" /c
|
||||
# ADD CPP /nologo /MD /I "..\..\include" /W3 /O2 /Ob1 /D "NDEBUG" /D "WIN32" /D "_LIB" /D "FLUIDSYNTH_NOT_A_DLL" /D "_MBCS" /GF /Gy /YX /Fo".\Release\" /Fd".\Release\" /c
|
||||
# ADD BASE MTL /win32
|
||||
# ADD MTL /win32
|
||||
# ADD BASE RSC /l 1036 /d "NDEBUG"
|
||||
# ADD RSC /l 1036 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32
|
||||
# ADD BSC32
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo /out:"..\fluidsynth_lib.lib"
|
||||
# ADD LIB32 /nologo /out:"..\fluidsynth_lib.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "fluidsynth_lib - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir ".\Debug"
|
||||
# PROP BASE Intermediate_Dir ".\Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ".\Debug"
|
||||
# PROP Intermediate_Dir ".\Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /I "..\..\include" /Zi /W3 /Od /D "_DEBUG" /D "WIN32" /D "_LIB" /D "FLUIDSYNTH_NOT_A_DLL" /D "_MBCS" /YX /Fp".\Debug\fluidsynth_lib.pch" /Fo".\Debug\" /Fd".\Debug\" /GZ /c
|
||||
# ADD CPP /nologo /MDd /I "..\..\include" /Zi /W3 /Od /D "_DEBUG" /D "WIN32" /D "_LIB" /D "FLUIDSYNTH_NOT_A_DLL" /D "_MBCS" /YX /Fp".\Debug\fluidsynth_lib.pch" /Fo".\Debug\" /Fd".\Debug\" /GZ /c
|
||||
# ADD BASE MTL /win32
|
||||
# ADD MTL /win32
|
||||
# ADD BASE RSC /l 1036 /d "_DEBUG"
|
||||
# ADD RSC /l 1036 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32
|
||||
# ADD BSC32
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo /out:"..\fluidsynth_lib_debug.lib"
|
||||
# ADD LIB32 /nologo /out:"..\fluidsynth_lib_debug.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "fluidsynth_lib - Win32 Release"
|
||||
# Name "fluidsynth_lib - Win32 Debug"
|
||||
# End Target
|
||||
# End Project
|
||||
|
|
@ -1,943 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="fluidsynth_lib"
|
||||
ProjectGUID="{CD7D1A45-9970-4958-BD8F-7F42B083093C}"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\..\include"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;FLUIDSYNTH_NOT_A_DLL"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=""
|
||||
AssemblerListingLocation=".\Release\"
|
||||
ObjectFile=".\Release\"
|
||||
ProgramDataBaseFileName=".\Release\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1036"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\fluidsynth_lib.lib"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="false"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\include"
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;FLUIDSYNTH_NOT_A_DLL"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
PrecompiledHeaderFile=".\Debug\fluidsynth_lib.pch"
|
||||
AssemblerListingLocation=".\Debug\"
|
||||
ObjectFile=".\Debug\"
|
||||
ProgramDataBaseFileName=".\Debug\"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="true"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="0"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1036"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="..\fluidsynth_lib_debug.lib"
|
||||
SuppressStartupBanner="true"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<File
|
||||
RelativePath="..\..\src\config_win32.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_adriver.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_adriver.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_aufile.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_chan.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_chan.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_chorus.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_chorus.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_cmd.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_cmd.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_conv.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_conv.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_defsfont.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_defsfont.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_dll.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_dsound.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_dsp_float.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_event.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_event_priv.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_event_queue.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_event_queue.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_filerenderer.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_gen.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_gen.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_hash.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_hash.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_list.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_list.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_mdriver.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_mdriver.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_midi.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_midi.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_midi_router.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_midi_router.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_mod.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_mod.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_phase.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_ramsfont.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_ramsfont.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_rev.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_rev.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_seq.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_seqbind.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_settings.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_settings.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_synth.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_synth.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_sys.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_sys.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_tuning.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_tuning.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_voice.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_voice.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluid_winmidi.c"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\fluidsynth.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\fluidsynth_priv.h"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1227,7 +1227,7 @@ fluid_str_hash (const void *v)
|
|||
{
|
||||
/* 31 bit hash function */
|
||||
const signed char *p = v;
|
||||
uint32 h = *p;
|
||||
uint32_t h = *p;
|
||||
|
||||
if (h)
|
||||
for (p += 1; *p != '\0'; p++)
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
|
||||
|
||||
#include "fluid_sys.h"
|
||||
#include "fluid_list.h"
|
||||
|
||||
|
||||
|
@ -43,6 +44,8 @@ void
|
|||
delete_fluid_list(fluid_list_t *list)
|
||||
{
|
||||
fluid_list_t *next;
|
||||
fluid_return_if_fail(list != NULL);
|
||||
|
||||
while (list) {
|
||||
next = list->next;
|
||||
FLUID_FREE(list);
|
||||
|
@ -53,9 +56,7 @@ delete_fluid_list(fluid_list_t *list)
|
|||
void
|
||||
delete1_fluid_list(fluid_list_t *list)
|
||||
{
|
||||
if (list) {
|
||||
FLUID_FREE(list);
|
||||
}
|
||||
}
|
||||
|
||||
fluid_list_t*
|
||||
|
|
|
@ -57,8 +57,8 @@ new_fluid_ringbuffer (int count, int elementsize)
|
|||
|
||||
if (!queue->array)
|
||||
{
|
||||
FLUID_FREE (queue);
|
||||
FLUID_LOG (FLUID_ERR, "Out of memory");
|
||||
delete_fluid_ringbuffer(queue);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -84,6 +84,7 @@ new_fluid_ringbuffer (int count, int elementsize)
|
|||
void
|
||||
delete_fluid_ringbuffer (fluid_ringbuffer_t *queue)
|
||||
{
|
||||
fluid_return_if_fail(queue != NULL);
|
||||
FLUID_FREE (queue->array);
|
||||
FLUID_FREE (queue);
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ new_fluid_str_setting(const char* value, const char* def, int hints, fluid_str_u
|
|||
static void
|
||||
delete_fluid_str_setting(fluid_setting_node_t* node)
|
||||
{
|
||||
if (!node) return;
|
||||
fluid_return_if_fail(node != NULL);
|
||||
|
||||
FLUID_ASSERT(node->type, FLUID_STR_TYPE);
|
||||
|
||||
|
@ -169,7 +169,7 @@ new_fluid_num_setting(double min, double max, double def,
|
|||
static void
|
||||
delete_fluid_num_setting(fluid_setting_node_t* node)
|
||||
{
|
||||
if (!node) return;
|
||||
fluid_return_if_fail(node != NULL);
|
||||
|
||||
FLUID_ASSERT (node->type, FLUID_NUM_TYPE);
|
||||
FLUID_FREE(node);
|
||||
|
@ -206,7 +206,7 @@ new_fluid_int_setting(int min, int max, int def,
|
|||
static void
|
||||
delete_fluid_int_setting(fluid_setting_node_t* node)
|
||||
{
|
||||
if (!node) return;
|
||||
fluid_return_if_fail(node != NULL);
|
||||
|
||||
FLUID_ASSERT (node->type, FLUID_INT_TYPE);
|
||||
FLUID_FREE(node);
|
||||
|
@ -244,12 +244,11 @@ new_fluid_set_setting(void)
|
|||
static void
|
||||
delete_fluid_set_setting(fluid_setting_node_t* node)
|
||||
{
|
||||
if (node)
|
||||
{
|
||||
fluid_return_if_fail(node != NULL);
|
||||
|
||||
FLUID_ASSERT (node->type, FLUID_SET_TYPE);
|
||||
delete_fluid_hashtable(node->set.hashtable);
|
||||
FLUID_FREE(node);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -426,7 +425,7 @@ fluid_settings_set(fluid_settings_t* settings, const char *name, fluid_setting_n
|
|||
table = node->set.hashtable;
|
||||
} else {
|
||||
/* path ends prematurely */
|
||||
FLUID_LOG(FLUID_WARN, "'%s' is not a node", name[n]);
|
||||
FLUID_LOG(FLUID_WARN, "'%s' is not a node. Name of the setting was '%s'", tokens[n], name);
|
||||
return FLUID_FAILED;
|
||||
}
|
||||
|
||||
|
@ -1422,7 +1421,7 @@ fluid_settings_foreach_option (fluid_settings_t* settings, const char *name,
|
|||
newlist = fluid_list_sort (newlist, fluid_list_str_compare_func);
|
||||
|
||||
for (p = newlist; p; p = p->next)
|
||||
(*func)(data, (char *)name, (char *)fluid_list_get (p));
|
||||
(*func)(data, name, (const char *)fluid_list_get (p));
|
||||
|
||||
fluid_rec_mutex_unlock (settings->mutex); /* -- unlock */
|
||||
|
||||
|
@ -1612,9 +1611,9 @@ fluid_settings_foreach (fluid_settings_t* settings, void* data,
|
|||
/* Loop over names and call the callback */
|
||||
for (p = bag.names; p; p = p->next)
|
||||
{
|
||||
if (fluid_settings_get (settings, (char *)(p->data), &node) == FLUID_OK
|
||||
if (fluid_settings_get (settings, (const char *)(p->data), &node) == FLUID_OK
|
||||
&& node)
|
||||
(*func) (data, (char *)(p->data), node->type);
|
||||
(*func) (data, (const char *)(p->data), node->type);
|
||||
FLUID_FREE (p->data); /* -- Free name */
|
||||
}
|
||||
|
||||
|
|
|
@ -741,10 +741,13 @@ new_fluid_timer (int msec, fluid_timer_callback_t callback, void* data,
|
|||
return timer;
|
||||
}
|
||||
|
||||
int
|
||||
void
|
||||
delete_fluid_timer (fluid_timer_t *timer)
|
||||
{
|
||||
int auto_destroy = timer->auto_destroy;
|
||||
int auto_destroy;
|
||||
fluid_return_if_fail(timer != NULL);
|
||||
|
||||
auto_destroy = timer->auto_destroy;
|
||||
|
||||
timer->cont = 0;
|
||||
fluid_timer_join (timer);
|
||||
|
@ -752,8 +755,6 @@ delete_fluid_timer (fluid_timer_t *timer)
|
|||
/* Shouldn't access timer now if auto_destroy enabled, since it has been destroyed */
|
||||
|
||||
if (!auto_destroy) FLUID_FREE (timer);
|
||||
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -867,13 +868,13 @@ fluid_istream_gets (fluid_istream_t in, char* buf, int len)
|
|||
|
||||
if (n == 0)
|
||||
{
|
||||
*buf++ = 0;
|
||||
*buf = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (c == '\n')
|
||||
{
|
||||
*buf++ = 0;
|
||||
*buf = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1087,8 +1088,10 @@ new_fluid_server_socket(int port, fluid_server_func_t func, void* data)
|
|||
return server_socket;
|
||||
}
|
||||
|
||||
int delete_fluid_server_socket(fluid_server_socket_t* server_socket)
|
||||
void delete_fluid_server_socket(fluid_server_socket_t* server_socket)
|
||||
{
|
||||
fluid_return_if_fail(server_socket != NULL);
|
||||
|
||||
server_socket->cont = 0;
|
||||
if (server_socket->socket != INVALID_SOCKET) {
|
||||
fluid_socket_close(server_socket->socket);
|
||||
|
@ -1097,7 +1100,6 @@ int delete_fluid_server_socket(fluid_server_socket_t* server_socket)
|
|||
delete_fluid_thread(server_socket->thread);
|
||||
}
|
||||
FLUID_FREE(server_socket);
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1279,8 +1281,10 @@ new_fluid_server_socket(int port, fluid_server_func_t func, void* data)
|
|||
return server_socket;
|
||||
}
|
||||
|
||||
int delete_fluid_server_socket(fluid_server_socket_t *server_socket)
|
||||
void delete_fluid_server_socket(fluid_server_socket_t *server_socket)
|
||||
{
|
||||
fluid_return_if_fail(server_socket != NULL);
|
||||
|
||||
server_socket->cont = 0;
|
||||
|
||||
if (server_socket->socket != INVALID_SOCKET)
|
||||
|
@ -1292,8 +1296,6 @@ int delete_fluid_server_socket(fluid_server_socket_t *server_socket)
|
|||
FLUID_FREE (server_socket);
|
||||
|
||||
WSACleanup (); // Should be called the same number of times as WSAStartup
|
||||
|
||||
return FLUID_OK;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -56,8 +56,6 @@ void fluid_time_config(void);
|
|||
|
||||
/* Misc */
|
||||
|
||||
#define fluid_return_val_if_fail g_return_val_if_fail
|
||||
#define fluid_return_if_fail g_return_if_fail
|
||||
#define FLUID_INLINE inline
|
||||
#define FLUID_POINTER_TO_UINT GPOINTER_TO_UINT
|
||||
#define FLUID_UINT_TO_POINTER GUINT_TO_POINTER
|
||||
|
@ -70,6 +68,17 @@ void fluid_time_config(void);
|
|||
#define FLUID_LE32TOH(x) GINT32_FROM_LE(x)
|
||||
#define FLUID_LE16TOH(x) GINT16_FROM_LE(x)
|
||||
|
||||
|
||||
#define fluid_return_if_fail(cond) \
|
||||
if(cond) \
|
||||
; \
|
||||
else \
|
||||
return
|
||||
|
||||
#define fluid_return_val_if_fail(cond, val) \
|
||||
fluid_return_if_fail(cond) (val)
|
||||
|
||||
|
||||
/*
|
||||
* Utility functions
|
||||
*/
|
||||
|
@ -102,7 +111,7 @@ fluid_timer_t* new_fluid_timer(int msec, fluid_timer_callback_t callback,
|
|||
void* data, int new_thread, int auto_destroy,
|
||||
int high_priority);
|
||||
|
||||
int delete_fluid_timer(fluid_timer_t* timer);
|
||||
void delete_fluid_timer(fluid_timer_t* timer);
|
||||
int fluid_timer_join(fluid_timer_t* timer);
|
||||
int fluid_timer_stop(fluid_timer_t* timer);
|
||||
|
||||
|
@ -148,6 +157,7 @@ new_fluid_cond_mutex (void)
|
|||
static FLUID_INLINE void
|
||||
delete_fluid_cond_mutex (fluid_cond_mutex_t *m)
|
||||
{
|
||||
fluid_return_if_fail(m != NULL);
|
||||
g_mutex_clear (m);
|
||||
g_free (m);
|
||||
}
|
||||
|
@ -170,6 +180,7 @@ new_fluid_cond (void)
|
|||
static FLUID_INLINE void
|
||||
delete_fluid_cond (fluid_cond_t *cond)
|
||||
{
|
||||
fluid_return_if_fail(cond != NULL);
|
||||
g_cond_clear (cond);
|
||||
g_free (cond);
|
||||
}
|
||||
|
@ -273,7 +284,7 @@ typedef GStaticPrivate fluid_private_t;
|
|||
static FLUID_INLINE void
|
||||
fluid_atomic_float_set(volatile float *fptr, float val)
|
||||
{
|
||||
sint32 ival;
|
||||
int32_t ival;
|
||||
memcpy (&ival, &val, 4);
|
||||
fluid_atomic_int_set ((volatile int *)fptr, ival);
|
||||
}
|
||||
|
@ -281,7 +292,7 @@ fluid_atomic_float_set(volatile float *fptr, float val)
|
|||
static FLUID_INLINE float
|
||||
fluid_atomic_float_get(volatile float *fptr)
|
||||
{
|
||||
sint32 ival;
|
||||
int32_t ival;
|
||||
float fval;
|
||||
ival = fluid_atomic_int_get ((volatile int *)fptr);
|
||||
memcpy (&fval, &ival, 4);
|
||||
|
@ -322,7 +333,7 @@ int fluid_ostream_printf (fluid_ostream_t out, char* format, ...);
|
|||
typedef int (*fluid_server_func_t)(void* data, fluid_socket_t client_socket, char* addr);
|
||||
|
||||
fluid_server_socket_t* new_fluid_server_socket(int port, fluid_server_func_t func, void* data);
|
||||
int delete_fluid_server_socket(fluid_server_socket_t* sock);
|
||||
void delete_fluid_server_socket(fluid_server_socket_t* sock);
|
||||
int fluid_server_socket_join(fluid_server_socket_t* sock);
|
||||
void fluid_socket_close(fluid_socket_t sock);
|
||||
fluid_istream_t fluid_socket_get_istream(fluid_socket_t sock);
|
||||
|
|
|
@ -32,10 +32,6 @@
|
|||
#include "config_maxmsp43.h"
|
||||
#endif
|
||||
|
||||
#if defined(WIN32) && !defined(MINGW32)
|
||||
#include "config_win32.h"
|
||||
#endif
|
||||
|
||||
#if HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
@ -112,23 +108,43 @@
|
|||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#if defined(WIN32) && HAVE_WINDOWS_H
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
/* MinGW32 special defines */
|
||||
#ifdef MINGW32
|
||||
|
||||
/** Integer types */
|
||||
#if HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
|
||||
#else
|
||||
|
||||
/* Assume GLIB types */
|
||||
typedef gint8 int8_t;
|
||||
typedef guint8 uint8_t;
|
||||
typedef gint16 int16_t;
|
||||
typedef guint16 uint16_t;
|
||||
typedef gint32 int32_t;
|
||||
typedef guint32 uint32_t;
|
||||
typedef gint64 int64_t;
|
||||
typedef guint64 uint64_t;
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(WIN32) && HAVE_WINDOWS_H
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h> /* Provides also socklen_t */
|
||||
#include <windows.h>
|
||||
|
||||
/* WIN32 special defines */
|
||||
#define DSOUND_SUPPORT 1
|
||||
#define WINMIDI_SUPPORT 1
|
||||
#define STDIN_FILENO 0
|
||||
#define STDOUT_FILENO 1
|
||||
#define STDERR_FILENO 2
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable : 4244)
|
||||
#pragma warning(disable : 4101)
|
||||
#pragma warning(disable : 4305)
|
||||
#pragma warning(disable : 4996)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* Darwin special defines (taken from config_macosx.h) */
|
||||
|
@ -170,16 +186,6 @@ typedef int fluid_socket_t;
|
|||
#endif
|
||||
|
||||
|
||||
/** Integer types */
|
||||
//typedef gint8 sint8;
|
||||
typedef guint8 uint8;
|
||||
//typedef gint16 sint16;
|
||||
typedef guint16 uint16;
|
||||
typedef gint32 sint32;
|
||||
typedef guint32 uint32;
|
||||
//typedef gint64 sint64;
|
||||
//typedef guint64 uint64;
|
||||
|
||||
/** Atomic types */
|
||||
typedef int fluid_atomic_int_t;
|
||||
typedef unsigned int fluid_atomic_uint_t;
|
||||
|
|
Loading…
Reference in a new issue