Merge pull request #207 from FluidSynth/cleanup

source code cleanup, API compatibility broken
This commit is contained in:
Tom M 2017-09-22 14:10:38 +02:00 committed by GitHub
commit 2a3ff1d2cf
65 changed files with 544 additions and 3049 deletions

View file

@ -71,7 +71,6 @@ option ( enable-ipv6 "enable ipv6 support " on )
# Platform specific options
if ( ${CMAKE_SYSTEM} MATCHES "Linux" )
option ( enable-ladcca "compile LADCCA support if it is available (deprecated)" off )
option ( enable-lash "compile LASH support (if it is available)" on )
option ( enable-alsa "compile ALSA support (if it is available)" on )
endif ( ${CMAKE_SYSTEM} MATCHES "Linux" )
@ -380,14 +379,6 @@ else(NOT enable-pkgconfig)
remove_definitions( -DHAVE_LASH )
endif ( enable-lash )
unset ( LADCCA_SUPPORT CACHE )
if ( enable-ladcca )
pkg_check_modules ( LADCCA ladcca-1.0>=0.3 )
set ( LADCCA_SUPPORT ${LADCCA_FOUND} )
else ( enable-ladcca )
unset_pkg_config ( LADCCA )
endif ( enable-ladcca )
unset ( DBUS_SUPPORT CACHE )
if ( enable-dbus )
pkg_check_modules ( DBUS dbus-1>=1.0.0 )
@ -473,7 +464,7 @@ if ( UNIX )
COMMAND cp -r doc ${PACKAGE}-${VERSION}
COMMAND cp -r include ${PACKAGE}-${VERSION}
COMMAND cp -r src ${PACKAGE}-${VERSION}
COMMAND cp AUTHORS ChangeLog CMakeLists.txt ../LICENSE ${PACKAGE}.* INSTALL NEWS README* ../README.md THANKS TODO ${PACKAGE}-${VERSION}
COMMAND cp AUTHORS ChangeLog CMakeLists.txt LICENSE ${PACKAGE}.* INSTALL NEWS README* THANKS TODO ${PACKAGE}-${VERSION}
# COMMAND tar -cj --exclude .svn --exclude Makefile.am -f ${PACKAGE}-${VERSION}.tar.bz2 ${PACKAGE}-${VERSION}
# COMMAND tar -cz --exclude .svn --exclude Makefile.am -f ${PACKAGE}-${VERSION}.tar.gz ${PACKAGE}-${VERSION}
# COMMAND zip -qr ${PACKAGE}-${VERSION}.zip ${PACKAGE}-${VERSION} -x '*.svn*' -x '*Makefile.am'
@ -484,27 +475,6 @@ if ( UNIX )
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
# tarball custom target
add_custom_target ( tarball-autotools
COMMAND mkdir -p ${PACKAGE}-${VERSION}
COMMAND cp -r bindings ${PACKAGE}-${VERSION}
COMMAND cp -r cmake_admin ${PACKAGE}-${VERSION}
COMMAND cp -r doc ${PACKAGE}-${VERSION}
COMMAND cp -r include ${PACKAGE}-${VERSION}
COMMAND cp -r src ${PACKAGE}-${VERSION}
COMMAND cp AUTHORS ChangeLog CMakeLists.txt ../LICENSE ${PACKAGE}.* INSTALL NEWS README* ../README.md THANKS TODO ${PACKAGE}-${VERSION}
COMMAND cp acinclude.m4 autogen.sh configure.ac install-sh missing mkinstalldirs Makefile.am ${PACKAGE}-${VERSION}
# Files below are added when running autogen.sh
# COMMAND cp -r autom4te.cache ${PACKAGE}-${VERSION}
COMMAND cp -r m4 ${PACKAGE}-${VERSION}
COMMAND cp aclocal.m4 compile config.guess config.sub configure depcomp ltmain.sh Makefile.in ${PACKAGE}-${VERSION}
COMMAND tar -cj --exclude .svn -f ${PACKAGE}-${VERSION}.tar.bz2 ${PACKAGE}-${VERSION}
COMMAND tar -cz --exclude .svn -f ${PACKAGE}-${VERSION}.tar.gz ${PACKAGE}-${VERSION}
COMMAND zip -qr ${PACKAGE}-${VERSION}.zip ${PACKAGE}-${VERSION} -x '*.svn*'
COMMAND rm -rf ${PACKAGE}-${VERSION}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
endif ( UNIX )
include ( report )

190
INSTALL
View file

@ -1,190 +0,0 @@
Select build system
===================
We currently have two different build systems and you can choose
which one works best for you. If you want to use the CMake build
system, please see the README.cmake file. For the autotools build
system, see below.
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.

1
INSTALL Symbolic link
View file

@ -0,0 +1 @@
README.cmake

View file

@ -1,11 +0,0 @@
## Process this file with automake to produce Makefile.in
ACLOCAL_AMFLAGS=-I m4
SUBDIRS = src doc include cmake_admin
EXTRA_DIST = TODO acinclude.m4 autogen.sh fluidsynth.pc.in \
fluidsynth.spec.in fluidsynth.spec fluidsynth.anjuta README-OSX \
README.cmake CMakeLists.txt
DISTCLEANFILES = fluidsynth.pc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = fluidsynth.pc

View file

@ -1,126 +0,0 @@
dnl Some additional autoconf macros
AC_DEFUN([AC_MIDISHARE],
[
AC_ARG_ENABLE(midishare, AS_HELP_STRING([--enable-midishare],
[Compile MIDISHARE support (default=auto)]),
midishare=$enableval, midishare=yes)
MIDISHARE_SUPPORT=0
if test "x$midishare" != "xno"; then
AC_CHECK_HEADERS(MidiShare.h)
if test "${ac_cv_header_MidiShare_h}" = "yes"; then
MIDISHARE_SUPPORT=1
midishare_found=yes
AC_CHECK_LIB([MidiShare], [MidiOpen],, [midishare_found=no])
if test "x$midishare_found" = "xyes" ; then
MIDISHARE_SUPPORT=1
AC_DEFINE(MIDISHARE_SUPPORT, 1, [Define to enable MidiShare driver])
fi
if test "x$midishare_found" = "xno" ; then
AC_MSG_WARN([ *** Could not find the required MidiShare library])
fi dnl midishare_found = yes test
else
AC_MSG_WARN([ *** Could not find MidiShare.h, disabling MidiShare driver])
fi dnl midishare.h header test
fi dnl enable_midishare != no?
])
AC_DEFUN([AC_OSS_AUDIO],
[
AC_ARG_ENABLE(oss-support,
[ --disable-oss-support Do not compile OSS support (default=auto)],
enable_oss_support=$enableval, enable_oss_support="yes")
OSS_SUPPORT=0
if test "x$enable_oss_support" != "xno"; then
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/soundcard.h machine/soundcard.h)
if test "${ac_cv_header_fcntl_h}" = "yes" && \
test "${ac_cv_header_sys_ioctl_h}" = "yes"; then
if test "${ac_cv_header_sys_soundcard_h}" = "yes" || \
test "${ac_cv_header_machine_soundcard_h}" = "yes"; then
OSS_SUPPORT=1
AC_DEFINE(OSS_SUPPORT, 1, [Define to enable OSS driver])
else
AC_MSG_WARN([ *** Could not find soundcard.h, disabling OSS driver])
fi dnl soundcard.h header test
else
AC_MSG_WARN([ *** Could not find fcntl.h and/or ioctl.h which are required for sound and midi support])
fi dnl fcntl.h & ioctl.h header test
fi dnl enable_oss_support != no?
])
dnl Configure Paths for readline (Josh Green 2003-06-10)
dnl
dnl AM_PATH_READLINE([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
dnl Test for readline, and define READLINE_CFLAGS and
dnl READLINE_LIBS as appropriate.
dnl enables arguments --with-readline-prefix=
AC_DEFUN([AM_PATH_READLINE],
[dnl Save the original CFLAGS, and LIBS
save_CFLAGS="$CFLAGS"
save_LIBS="$LIBS"
readline_found=yes
dnl
dnl Setup configure options
dnl
AC_ARG_WITH(readline-prefix,
[ --with-readline-prefix=PATH Path where readline is (optional)],
[readline_prefix="$withval"], [readline_prefix=""])
AC_MSG_CHECKING(for readline)
dnl Add readline to the LIBS path
READLINE_LIBS="-lreadline"
if test "${readline_prefix}" != "" ; then
READLINE_LIBS="-L${readline_prefix}/lib $READLINE_LIBS"
READLINE_CFLAGS="-I${readline_prefix}/include"
else
READLINE_CFLAGS=""
fi
LIBS="$READLINE_LIBS $LIBS"
CFLAGS="$READLINE_CFLAGS $CFLAGS"
AC_TRY_COMPILE([
#include <stdio.h>
#include <readline/readline.h>
], [
#ifndef readline
return (1);
#else
return (0);
#endif
],
[AC_MSG_RESULT(found.)],
[AC_MSG_RESULT(not present.)
readline_found=no]
)
CFLAGS="$save_CFLAGS"
LIBS="$save_LIBS"
if test "x$readline_found" = "xyes" ; then
ifelse([$1], , :, [$1])
else
READLINE_CFLAGS=""
READLINE_LIBS=""
ifelse([$2], , :, [$2])
fi
dnl That should be it. Now just export out symbols:
AC_SUBST(READLINE_CFLAGS)
AC_SUBST(READLINE_LIBS)
])

View file

@ -1,12 +0,0 @@
#!/bin/sh
# Some poor souls have linux distributions, that don't install pkg-config by default.
#pkg-config --version does actually nothing, but it will fail and give 'sort of' an error message...
pkg-config --version > /dev/null \
&& aclocal \
&& libtoolize -f \
&& autoheader \
&& autoconf \
&& automake -a

View file

@ -1,15 +0,0 @@
## Process this file with automake to produce Makefile.in
EXTRA_DIST = CheckDIRSymbolExists.cmake \
CheckPrototypeExists.cmake \
CheckSTDC.cmake \
cmake_uninstall.cmake.in \
DefaultDirs.cmake \
FindMidiShare.cmake \
FindOSS.cmake \
FindPthreads.cmake \
FindReadline.cmake \
report.cmake \
TestInline.cmake \
TestVLA.cmake \
UnsetPkgConfig.cmake

View file

@ -85,12 +85,6 @@ else ( LASH_SUPPORT )
message ( "LASH support: no" )
endif ( LASH_SUPPORT )
if ( LADCCA_SUPPORT )
message ( "LADCCA support: yes (NOTE: GPL library)" )
else ( LADCCA_SUPPORT )
message ( "LADCCA support: no" )
endif ( LADCCA_SUPPORT )
if ( DART_SUPPORT )
message ( "OS/2 DART support: yes" )
else ( DART_SUPPORT )

View file

@ -1,636 +0,0 @@
dnl --------------------------------------------------
dnl configure.in for FluidSynth
dnl --------------------------------------------------
AC_INIT(src/fluidsynth.c)
dnl *** NOTE *** Don't forget to update library version below also
FLUIDSYNTH_VERSION_MAJOR=1
FLUIDSYNTH_VERSION_MINOR=1
FLUIDSYNTH_VERSION_MICRO=7
FLUIDSYNTH_VERSION=$FLUIDSYNTH_VERSION_MAJOR.$FLUIDSYNTH_VERSION_MINOR.$FLUIDSYNTH_VERSION_MICRO
AC_SUBST(FLUIDSYNTH_VERSION_MAJOR)
AC_SUBST(FLUIDSYNTH_VERSION_MINOR)
AC_SUBST(FLUIDSYNTH_VERSION_MICRO)
AC_SUBST(FLUIDSYNTH_VERSION)
AM_INIT_AUTOMAKE(fluidsynth, $FLUIDSYNTH_VERSION)
dnl Convert to quoted string for version.h substitution
FLUIDSYNTH_VERSION="\"$VERSION\""
dnl *** NOTICE ***
dnl Update library version upon each release (follow these steps in order)
dnl if any source code changes: lt_revision++
dnl if any interfaces added/removed/changed: lt_current++ and lt_revision=0
dnl if any interfaces have been added: lt_age++
dnl if any interfaces have been removed/changed (compatibility broken): lt_age=0
m4_define([lt_current], [6])
m4_define([lt_revision], [0])
m4_define([lt_age], [6])
LT_VERSION_INFO="lt_current:lt_revision:lt_age"
AC_SUBST(LT_VERSION_INFO)
AM_CONFIG_HEADER(src/config.h)
AC_CONFIG_MACRO_DIR([m4])
CFLAGS="$CFLAGS"
dnl Check for programs
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_INSTALL
dnl AC_PROG_RANLIB
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
AC_PROG_MAKE_SET
dnl Check for libraries
AC_CHECK_LIB(pthread, pthread_create)
dnl Check for header files
AC_HEADER_STDC
AC_CHECK_HEADERS(string.h stdlib.h stdio.h math.h errno.h stdarg.h unistd.h sys/mman.h sys/types.h sys/time.h sys/stat.h fcntl.h sys/socket.h netinet/in.h netinet/tcp.h arpa/inet.h limits.h pthread.h signal.h windows.h)
dnl Compiler and machine specs
AC_C_INLINE
AC_C_BIGENDIAN
LIBFLUID_LIBS="-lm"
dnl Machine specific checks and defines
case "${host_os}" in
darwin*)
AC_DEFINE(DARWIN, 1, [Define if building for Mac OS X Darwin])
;;
mingw*)
mingw32_support="yes"
CFLAGS="$CFLAGS -mms-bitfields"
AC_DEFINE(MINGW32, 1, [Define if using the MinGW32 environment])
LIBFLUID_LIBS="-ldsound -lwinmm -lws2_32"
LIBFLUID_CPPFLAGS="-DFLUIDSYNTH_DLL_EXPORTS"
LIBFLUID_LDFLAGS="-no-undefined"
FLUID_CPPFLAGS="-DFLUIDSYNTH_NOT_A_DLL"
;;
os2*)
LDFLAGS="$LDFLAGS -Zbin-files"
LIBFLUID_LDFLAGS="-no-undefined"
;;
solaris*)
LDFLAGS="$LDFLAGS -lnsl -lsocket"
;;
esac
AC_SUBST(LIBFLUID_LIBS)
AC_SUBST(LIBFLUID_CPPFLAGS)
AC_SUBST(LIBFLUID_LDFLAGS)
AC_SUBST(FLUID_CPPFLAGS)
dnl Check for GNU LD
AC_LIB_PROG_LD_GNU
AM_CONDITIONAL(GNU_LD_SUPPORT, test "x$with_gnu_ld" = "xyes")
AM_CONDITIONAL(MINGW32_SUPPORT, test "$mingw32_support" == "yes")
AC_ARG_ENABLE(double, AS_HELP_STRING([--enable-double],
[double floating point for dsp (default=float)]),
ENABLE_FLOAT_SAMPLES=$enableval,
ENABLE_FLOAT_SAMPLES=yes)
if test "x$ENABLE_FLOAT_SAMPLES" = "xyes" ; then
AC_DEFINE(WITH_FLOAT, 1, [Define to do all DSP in single floating point precision])
fi
AC_ARG_ENABLE(profiling, AS_HELP_STRING([--enable-profiling],
[profile the dsp code (default=no)]),
profiling_flag=$enableval,
profiling_flag=no)
if test "x$profiling_flag" = "xyes" ; then
AC_DEFINE(WITH_PROFILING, 1, [Define to profile the DSP code])
fi
AC_ARG_ENABLE(ladspa, AS_HELP_STRING([--enable-ladspa],
[Include LADSPA effect unit (default=no)]),
ENABLE_LADSPA=$enableval,
ENABLE_LADSPA=no)
if test "x$ENABLE_LADSPA" = "xyes" ; then
AC_DEFINE(LADSPA, 1, [Include the LADSPA Fx unit])
dnl LADSPA plugins are loaded as dynamic libraries.
dnl In this case, -ldl is required for linking.
AC_CHECK_LIB(dl, dlopen)
fi
AC_ARG_ENABLE(trap-on-fpe, AS_HELP_STRING([--enable-trap-on-fpe],
[Enable SIGFPE trap on Floating Point Exceptions (debugging)]),
ENABLE_TRAPONFPE=$enableval, ENABLE_TRAPONFPE=no)
if test "$ENABLE_TRAPONFPE" = "yes"; then
AC_DEFINE(TRAP_ON_FPE, 1, [Define to enable SIGFPE assertions])
fi
AC_ARG_ENABLE(fpe-check, AS_HELP_STRING([--enable-fpe-check],
[Enable Floating Point Exception checks and debug messages]),
ENABLE_FPECHECK=$enableval, ENABLE_FPECHECK=no)
if test "$ENABLE_FPECHECK" = "yes"; then
AC_DEFINE(FPE_CHECK, 1, [Define to enable FPE checks])
fi
AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug],
[enable debugging (default=no)]),
ENABLE_DEBUG=$enableval)
# Those are only valid for GCC
if test "$GCC" = yes; then
if test "$ENABLE_DEBUG" = "yes"; then
CFLAGS="${CFLAGS} ${FCCFLAGS} -g -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wstrict-prototypes -Wno-unused-parameter -Wno-cast-qual"
AC_DEFINE(DEBUG, 1, [Define to activate debugging message])
else
CFLAGS="${CFLAGS} ${FCCFLAGS} -O2 -fomit-frame-pointer -funroll-all-loops -finline-functions -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wstrict-prototypes -Winline -Wno-unused-parameter -Wno-cast-qual"
AC_DEFINE(DEBUG, 0, [Define to activate debugging message])
fi
fi
dnl Assert that glib and gthread are available
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.6.5 gthread-2.0 >= 2.6.5)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
dnl - Check for DBUS support
AC_ARG_ENABLE(dbus-support, AS_HELP_STRING([--disable-dbus-support],
[Do not compile with support for D-Bus (default=auto)]),
enable_dbus_support=$enableval, enable_dbus_support="yes")
if test "x$enable_dbus_support" != "xno"; then
PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0.0, DBUS_SUPPORT=1, DBUS_SUPPORT=0)
else
DBUS_SUPPORT=0
fi
if test "$DBUS_SUPPORT" = "1"; then
AC_DEFINE(DBUS_SUPPORT, 1, [Define to enable D-Bus support])
fi
AM_CONDITIONAL(DBUS_SUPPORT, test "$DBUS_SUPPORT" = "1")
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
dnl Check for libsndfile support
AC_ARG_ENABLE(libsndfile-support, AS_HELP_STRING([--disable-libsndfile-support],
[Do not compile libsndfile support (default=auto)]),
enable_libsndfile_support=$enableval, enable_libsndfile_support="yes")
if test "x$enable_libsndfile_support" != "xno"; then
PKG_CHECK_MODULES(LIBSNDFILE, sndfile >= 1.0.0, LIBSNDFILE_SUPPORT=1, LIBSNDFILE_SUPPORT=0)
else
LIBSNDFILE_SUPPORT=0
fi
if test "$LIBSNDFILE_SUPPORT" = "1"; then
PKG_CHECK_MODULES(LIBSNDFILE_VORBIS, sndfile >= 1.0.18, LIBSNDFILE_HASVORBIS=1, LIBSNDFILE_HASVORBIS=0)
AC_DEFINE(LIBSNDFILE_SUPPORT, 1, [Define to enable libsndfile support])
if test "$LIBSNDFILE_HASVORBIS" = "1"; then
AC_DEFINE(LIBSNDFILE_HASVORBIS, 1, [libsndfile has ogg vorbis support])
fi
else
LIBSNDFILE_HASVORBIS=0
fi
AM_CONDITIONAL(LIBSNDFILE_SUPPORT, test "$LIBSNDFILE_SUPPORT" = "1")
AM_CONDITIONAL(LIBSNDFILE_HASVORBIS, test "$LIBSNDFILE_HASVORBIS" = "1")
AC_SUBST(LIBSNDFILE_CFLAGS)
AC_SUBST(LIBSNDFILE_LIBS)
dnl
dnl Check support for all the drivers
dnl
dnl - Sound file support check
AUFILE_SUPPORT=0
AC_ARG_ENABLE(aufile-support,
[ --disable-aufile-support Do not compile support for sound file output],
enable_aufile_support=no)
if test "x${enable_aufile_support}" != "xno"; then
AUFILE_SUPPORT=1
AC_DEFINE(AUFILE_SUPPORT, 1, [Define to activate sound output to files])
fi
dnl - Check for PulseAudio support
AC_ARG_ENABLE(pulse-support, AS_HELP_STRING([--disable-pulse-support],
[Do not compile PulseAudio support (default=auto)]),
enable_pulse_support=$enableval, enable_pulse_support="yes")
if test "x$enable_pulse_support" != "xno"; then
PKG_CHECK_MODULES(PULSE, libpulse-simple >= 0.9.8, PULSE_SUPPORT=1, PULSE_SUPPORT=0)
else
PULSE_SUPPORT=0
fi
if test "$PULSE_SUPPORT" = "1"; then
AC_DEFINE(PULSE_SUPPORT, 1, [Define to enable PulseAudio driver])
fi
AM_CONDITIONAL(PULSE_SUPPORT, test "$PULSE_SUPPORT" = "1")
AC_SUBST(PULSE_CFLAGS)
AC_SUBST(PULSE_LIBS)
dnl - Check support for ALSA
AC_ARG_ENABLE(alsa-support, AS_HELP_STRING([--disable-alsa-support],
[Do not compile ALSA support (default=auto)]),
enable_alsa_support=$enableval, enable_alsa_support="yes")
if test "x$enable_alsa_support" != "xno"; then
PKG_CHECK_MODULES(ALSA, alsa >= 0.9.1, ALSA_SUPPORT=1, ALSA_SUPPORT=0)
else
ALSA_SUPPORT=0
fi
if test "$ALSA_SUPPORT" = "1"; then
AC_DEFINE(ALSA_SUPPORT, 1, [Define to enable ALSA driver])
fi
AM_CONDITIONAL(ALSA_SUPPORT, test "$ALSA_SUPPORT" = "1")
AC_SUBST(ALSA_CFLAGS)
AC_SUBST(ALSA_LIBS)
dnl - Check support for PortAudio
AC_ARG_ENABLE(portaudio-support, AS_HELP_STRING([--disable-portaudio-support],
[Do not compile PortAudio support (default=auto)]),
enable_portaudio_support=$enableval, enable_portaudio_support="yes")
if test "x$enable_portaudio_support" != "xno"; then
PKG_CHECK_MODULES(PORTAUDIO, portaudio-2.0 >= 19, PORTAUDIO_SUPPORT=1,
PORTAUDIO_SUPPORT=0)
else
PORTAUDIO_SUPPORT=0
fi
if test "$PORTAUDIO_SUPPORT" = "1"; then
AC_DEFINE(PORTAUDIO_SUPPORT, 1, [Define to enable PortAudio driver])
fi
AM_CONDITIONAL(PORTAUDIO_SUPPORT, test "$PORTAUDIO_SUPPORT" = "1")
AC_SUBST(PORTAUDIO_CFLAGS)
AC_SUBST(PORTAUDIO_LIBS)
dnl - Check support for OSS audio
AC_OSS_AUDIO
AM_CONDITIONAL(OSS_SUPPORT, test "$OSS_SUPPORT" = "1")
dnl - Check support for MidiShare
AC_MIDISHARE
dnl - Check support for JACK
AC_ARG_ENABLE(jack-support, AS_HELP_STRING([--disable-jack-support],
[disable JACK support (default=auto)]),
enable_jack=$enableval, enable_jack="yes")
if test "x$enable_jack" != "xno"; then
PKG_CHECK_MODULES(JACK, jack, JACK_SUPPORT=1, JACK_SUPPORT=0)
else
JACK_SUPPORT=0
fi
if test "$JACK_SUPPORT" = "1"; then
AC_DEFINE(JACK_SUPPORT, 1, [Define to enable JACK driver])
fi
AM_CONDITIONAL(JACK_SUPPORT, test "$JACK_SUPPORT" = "1")
AC_SUBST(JACK_CFLAGS)
AC_SUBST(JACK_LIBS)
dnl
dnl - Check support for CoreAudio
dnl
AC_CHECK_HEADER(CoreAudio/AudioHardware.h, COREAUDIO_FOUND="yes",
COREAUDIO_FOUND="no")
AC_ARG_ENABLE(coreaudio, AS_HELP_STRING([--disable-coreaudio],
[disable CoreAudio support (default=auto)]),
enable_coreaudio=$enableval, enable_coreaudio="yes")
COREAUDIO_SUPPORT=0
if test "$enable_coreaudio" = "yes" -a "$COREAUDIO_FOUND" = "yes"; then
AC_DEFINE(COREAUDIO_SUPPORT, 1, [whether or not we are supporting CoreAudio])
COREAUDIO_SUPPORT=1
COREAUDIO_LIBS="-Wl,-framework,CoreAudio"
fi
AM_CONDITIONAL(COREAUDIO_SUPPORT, test "$COREAUDIO_SUPPORT" = "1")
AC_SUBST(COREAUDIO_LIBS)
dnl
dnl - Check support for CoreMIDI
dnl
AC_CHECK_HEADER(CoreMIDI/MIDIServices.h, COREMIDI_FOUND="yes",
COREMIDI_FOUND="no")
AC_ARG_ENABLE(coremidi, AS_HELP_STRING([--disable-coremidi],
[disable CoreMIDI support (default=auto)]),
enable_coremidi=$enableval, enable_coremidi="yes")
COREMIDI_SUPPORT=0
if test "$enable_coremidi" = "yes" -a "$COREMIDI_FOUND" = "yes"; then
AC_DEFINE(COREMIDI_SUPPORT, 1, [whether or not we are supporting CoreMIDI])
COREMIDI_SUPPORT=1
COREMIDI_LIBS="-Wl,-framework,CoreMIDI"
fi
AM_CONDITIONAL(COREMIDI_SUPPORT, test "$COREMIDI_SUPPORT" = "1")
AC_SUBST(COREMIDI_LIBS)
dnl
dnl - Check support for DART
dnl
AC_CHECK_HEADER(os2me.h, DART_FOUND="yes", DART_FOUND="no", -)
AC_ARG_ENABLE(dart, AS_HELP_STRING([--disable-dart],
[disable DART support (default=auto)]),
enable_dart=$enableval, enable_dart="yes")
DART_SUPPORT=0
if test "$enable_dart" = "yes" -a "$DART_FOUND" = "yes"; then
AC_DEFINE(DART_SUPPORT, 1, [whether or not we are supporting DART])
DART_SUPPORT=1
fi
AM_CONDITIONAL(DART_SUPPORT, test "$DART_SUPPORT" = "1")
AC_SUBST(DART_CFLAGS)
AC_SUBST(DART_LIBS)
dnl
dnl Check for readline support (Josh Green 2003-06-10)
dnl
AC_ARG_WITH(readline,
[ --without-readline disable readline lib line editing (default=auto)],
with_readline=$withval, with_readline="yes")
if test "$with_readline" != "no"; then
AM_PATH_READLINE(FOUND_READLINE=1, FOUND_READLINE=0)
fi
dnl
dnl The following script checks for ncurses support.
dnl I copied and adapted it from DataDisplayDebugger's (DDD)
dnl configure.in, written by Andreas Zeller <zeller@gnu.org>.
dnl
dnl Look for the tgetent() function - either in libtermcap, libcurses
dnl
dnl On FreeBSD systems, `-lmytinfo' is preferred to `-lncurses'.
dnl Reported by Vincenzo Capuano <vcapuano@esoc.esa.de>
dnl
dnl On Linux ELF systems, `-lncurses' is preferred to `-ltermcap'.
dnl Reported by jdassen@wi.leidenuniv.nl (J.H.M. Dassen)
dnl
WITH_READLINE=0
have_termcap=false
if test "${FOUND_READLINE}" = "1"; then
_termlib="mytinfo ncurses curses termcap terminfo termlib"
for termlib in ${_termlib}; do
AC_CHECK_LIB(${termlib}, tgetent,
[READLINE_LIBS="$READLINE_LIBS -l${termlib}"; have_termcap=true; break])
done
fi
if test "x${have_termcap}" = "xtrue"; then
AC_DEFINE(WITH_READLINE, 1, [Define to use the readline library for line editing])
WITH_READLINE=1
fi
dnl
dnl lash stuff
dnl
AC_ARG_ENABLE(lash, AS_HELP_STRING([--disable-lash],
[disable LASH support (default=auto)]),
fluid_enable_lash=$enableval,
fluid_enable_lash="yes")
if test "$fluid_enable_lash" = "yes"; then
PKG_CHECK_MODULES(LASH, lash-1.0 >= 0.3, LASH_FOUND="yes", LASH_FOUND="no")
AC_SUBST(LASH_CFLAGS)
AC_SUBST(LASH_LIBS)
if test "$LASH_FOUND" = "yes"; then
AC_DEFINE(HAVE_LASH, 1, [whether or not we are supporting lash])
fi
else
LASH_FOUND="no"
fi
AM_CONDITIONAL(LASH_SUPPORT, test "$LASH_FOUND" = "yes")
dnl
dnl ladcca stuff (depricated by lash and will be removed in the future)
dnl
AC_ARG_ENABLE(ladcca, AS_HELP_STRING([--disable-ladcca],
[disable LADCCA support (default=auto)]),
fluid_enable_ladcca=$enableval,
fluid_enable_ladcca="yes")
if test "$fluid_enable_ladcca" = "yes" -a "$LASH_FOUND" = "no"; then
PKG_CHECK_MODULES(LADCCA, ladcca-1.0 >= 0.3, LADCCA_FOUND="yes", LADCCA_FOUND="no")
AC_SUBST(LADCCA_CFLAGS)
AC_SUBST(LADCCA_LIBS)
if test "$LADCCA_FOUND" = "yes"; then
AC_DEFINE(HAVE_LADCCA, 1, [whether or not we are supporting ladcca])
fi
else
LADCCA_FOUND="no"
fi
AM_CONDITIONAL(LADCCA_SUPPORT, test "$LADCCA_FOUND" = "yes")
#Checking for IPV6 support
AC_MSG_CHECKING(for IPv6 support)
AC_ARG_ENABLE(ipv6, AS_HELP_STRING([--enable-ipv6],
[Enable IPV6 support (default=auto)]),
ENABLE_IPV6=$enableval,
ENABLE_IPV6=yes)
if test "$ENABLE_IPV6" = "yes" ; then
AC_CACHE_VAL(ac_cv_ipv6,
AC_TRY_RUN([
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdlib.h>
main()
{
int fd;
struct sockaddr_in6 foo;
fd = socket(AF_INET6, SOCK_STREAM, 0);
exit(fd >= 0 ? 0 : 1);
}],
ac_cv_ipv6=yes,
ac_cv_ipv6=no,
ac_cv_ipv6=yes))
AC_MSG_RESULT($ac_cv_ipv6)
if test $ac_cv_ipv6 = yes ; then
AC_DEFINE(IPV6,1,[check if system supports IPV6])
else
ENABLE_IPV6="no"
fi
fi
AC_OUTPUT([
Makefile
cmake_admin/Makefile
src/Makefile
src/config_win32.h
doc/Makefile
include/Makefile
include/fluidsynth/Makefile
include/fluidsynth/version.h
fluidsynth.pc
fluidsynth.spec])
echo
echo "***************************************************************"
echo "The autotools build system is deprecated and might be removed "
echo "in a future version. Please use the CMake build system instead."
echo "***************************************************************"
echo "Summary:"
if test "${LIBSNDFILE_SUPPORT}" = "1"; then
if test "${LIBSNDFILE_HASVORBIS}" = "1"; then
echo "libsndfile: yes (with ogg vorbis support)"
else
echo "libsndfile: yes"
fi
else
echo "libsndfile: no (raw audio file rendering only)"
fi
if test "${DBUS_SUPPORT}" = "1"; then
echo "D-Bus: yes"
else
echo "D-Bus: no"
fi
if test "${PULSE_SUPPORT}" = "1"; then
echo "PulseAudio: yes"
else
echo "PulseAudio: no"
fi
if test "${JACK_SUPPORT}" = "1"; then
echo "JACK: yes"
else
echo "JACK: no"
fi
if test "${ALSA_SUPPORT}" = "1"; then
echo "ALSA: yes"
else
echo "ALSA: no"
fi
if test "${PORTAUDIO_SUPPORT}" = "1"; then
echo "PortAudio: yes"
else
echo "PortAudio: no"
fi
if test "${OSS_SUPPORT}" = "1"; then
echo "OSS: yes"
else
echo "OSS: no"
fi
if test "${MIDISHARE_SUPPORT}" = "1"; then
echo "MidiShare: yes"
else
echo "MidiShare: no"
fi
if test "${COREAUDIO_SUPPORT}" = "1"; then
echo "CoreAudio: yes"
else
echo "CoreAudio: no"
fi
if test "${COREMIDI_SUPPORT}" = "1"; then
echo "CoreMIDI: yes"
else
echo "CoreMIDI: no"
fi
if test "${ENABLE_LADSPA}" = "yes"; then
echo "LADSPA support: yes"
else
echo "LADSPA support: no"
fi
if test "${ENABLE_IPV6}" = "yes"; then
echo "IPV6 support: yes"
else
echo "IPV6 support: no"
fi
if test "${LASH_FOUND}" = "yes"; then
echo "LASH support: yes (NOTE: GPL library)"
else
echo "LASH support: no"
fi
if test "${LADCCA_FOUND}" = "yes"; then
echo "LADCCA support: yes (NOTE: GPL library)"
else
echo "LADCCA support: no"
fi
if test "${DART_SUPPORT}" = "1"; then
echo "OS/2 DART support: yes"
else
echo "OS/2 DART support: no"
fi
if test "${AUFILE_SUPPORT}" = "1"; then
echo "Audio to file driver: yes"
else
echo "Audio to file driver: no"
fi
if test "$WITH_READLINE" = "1"; then
echo "Readline: yes (NOTE: GPL library)"
else
echo "Readline: no"
fi
if test "${profiling_flag}" = "yes"; then
echo "Profiling: yes"
else
echo "Profiling: no"
fi
if test "${ENABLE_DEBUG}" = "yes"; then
echo "Debug: yes"
else
echo "Debug: no"
fi
if test "${ENABLE_TRAPONFPE}" = "yes"; then
echo "Trap on FPE (debug): yes"
else
echo "Trap on FPE (debug): no"
fi
if test "${ENABLE_FPECHECK}" = "yes"; then
echo "Check FPE (debug): yes"
else
echo "Check FPE (debug): no"
fi
echo "***************************************************************"
echo

View file

@ -1,40 +0,0 @@
# install the man pages and include in distribution
man_MANS = fluidsynth.1
EXTRA_DIST = CMakeLists.txt \
Doxyfile.cmake \
$(man_MANS) \
Doxyfile \
example.c \
fluidsynth-v10-devdoc.xml \
fluidsynth-v11-devdoc.txt \
fluidsynth_arpeggio.c \
fluidsynth_fx.c \
fluidsynth_metronome.c \
fluidsynth_simple.c \
xtrafluid.txt \
FluidSynth-LADSPA.pdf
docbook_docs = fluidsynth-v10-devdoc.xml
DOCBOOK_STYLESHEET ?= http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl
# Run "make update-docs" to update developer doc and doxygen reference
update-docs: html/index.html doxygen
# The new XML DocBook way:
html/index.html: $(docbook_docs)
-rm -rf html
$(mkinstalldirs) html
xsltproc -o html/ --catalogs $(DOCBOOK_STYLESHEET) $<
doc-clean:
-rm -rf html
maintainer-clean-local: doc-clean
doxygen: Doxyfile
doxygen Doxyfile
# Update docs for distribution
dist-hook: update-docs

View file

@ -21,6 +21,7 @@ All the source code examples in this document are in the public domain; you can
- \ref Disclaimer
- \ref Introduction
- \ref NewIn@NEXT_RELEASE@
- \ref NewIn1_1_7
- \ref NewIn1_1_6
- \ref NewIn1_1_5
@ -65,6 +66,27 @@ 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@?
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:
- remove deprecated fluid_synth_get_program() and fluid_synth_get_channel_preset(), use fluid_synth_get_channel_info() instead
- remove deprecated fluid_settings_getstr()
- remove deprecated FLUID_HINT_INTEGER
- remove misspelled FLUID_SEQ_PITCHWHHELSENS macro
- remove obsolete "audio.[out|in]put-channels" settings
- remove unimplemented "synth.dump" setting
- remove fluid_synth_set_gen2(), fluid_synth_set_gen() now behaves as fluid_synth_set_gen2()
- all public \c fluid_settings_* functions that return an int that shall not be interpreted as a bool consistently return either FLUID_OK or FLUID_FAILED
- struct fluid_mod_t was removed from public API
- struct _fluid_gen_t, fluid_gen_set_default_values() and enum fluid_gen_flags were removed from public API
- add "synth.volenv" a setting for volume envelope processing
- add support for polyonic key pressure events, see fluid_event_key_pressure()
- add fluid_synth_add_default_mod() for manipulating default modulators
\section NewIn1_1_7 Whats new in 1.1.7?
Changes in FluidSynth 1.1.7 concerning developers:
@ -371,22 +393,6 @@ The following table provides details on all the settings used by the synthesizer
for this ID or to all devices will be acted upon.</td>
</tr>
<tr>
<td>synth.dump</td>
<td>Type</td>
<td>boolean</td>
</tr>
<tr>
<td></td>
<td>Default</td>
<td>0 (FALSE)</td>
</tr>
<tr>
<td></td>
<td>Description</td>
<td>Does nothing currently.</td>
</tr>
<tr>
<td>synth.effects-channels</td>
<td>Type</td>

View file

@ -164,9 +164,6 @@ Number of CPU cores to use for multi-core support.
.B synth.device\-id INT [min=0, max=126, def=0] REALTIME
Device ID to use for accepting incoming SYSEX messages.
.TP
.B synth.dump BOOL [def=False]
No effect currently.
.TP
.B synth.effects\-channels INT [min=2, max=2, def=2]
No effect currently.
.TP

View file

@ -1,30 +0,0 @@
<?xml version="1.0"?>
<anjuta>
<plugin name="GBF Project Manager"
url="http://anjuta.org/plugins/"
mandatory="yes">
<require group="Anjuta Plugin"
attribute="Interfaces"
value="IAnjutaProjectManager"/>
<require group="Project"
attribute="Supported-Project-Types"
value="automake"/>
</plugin>
<plugin name="Make Build System"
url="http://anjuta.org/plugins/"
mandatory="yes">
<require group="Anjuta Plugin"
attribute="Interfaces"
value="IAnjutaBuildable"/>
<require group="Build"
attribute="Supported-Build-Types"
value="make"/>
</plugin>
<plugin name="Debug Manager"
url="http://anjuta.org/plugins/"
mandatory="no">
<require group="Anjuta Plugin"
attribute="Interfaces"
value="IAnjutaDebuggerManager"/>
</plugin>
</anjuta>

View file

@ -1,6 +0,0 @@
SUBDIRS = fluidsynth
include_HEADERS = fluidsynth.h
EXTRA_DIST = CMakeLists.txt

View file

@ -1,22 +0,0 @@
## Process this file with automake to produce Makefile.in
pkginclude_HEADERS = types.h \
settings.h \
synth.h \
event.h \
seq.h \
seqbind.h \
shell.h \
sfont.h \
ramsfont.h \
audio.h \
midi.h \
log.h \
misc.h \
version.h \
voice.h \
mod.h \
gen.h
EXTRA_DIST = version.h.in CMakeLists.txt
DISTCLEANFILES = version.h

View file

@ -62,8 +62,6 @@ enum fluid_seq_event_type {
FLUID_SEQ_LASTEVENT /**< Defines the count of event enums @deprecated As of 1.1.7 this enum value is deprecated and will be removed in a future release, because it prevents adding new enum values without breaking ABI compatibility. */
};
#define FLUID_SEQ_PITCHWHHELSENS FLUID_SEQ_PITCHWHEELSENS /**< Old deprecated misspelling of #FLUID_SEQ_PITCHWHEELSENS */
/* Event alloc/free */
FLUIDSYNTH_API fluid_event_t* new_fluid_event(void);
FLUIDSYNTH_API void delete_fluid_event(fluid_event_t* evt);

View file

@ -98,36 +98,11 @@ enum fluid_gen_type {
* mentioned in the list of generator in the SF2 specifications. It
* is used, however, as the destination for the default pitch wheel
* modulator. */
GEN_PITCH, /**< Pitch (NOTE: Not a real SoundFont generator) */
GEN_PITCH, /**< Pitch @note Not a real SoundFont generator */
GEN_LAST /**< Value defines the count of generators (#fluid_gen_type) @deprecated As of 1.1.7 this enum value is deprecated and will be removed in a future release, because it prevents adding new enum values without breaking ABI compatibility. */
};
/**
* SoundFont generator structure.
*/
typedef struct _fluid_gen_t
{
unsigned char flags; /**< Is the generator set or not (#fluid_gen_flags) */
double val; /**< The nominal value */
double mod; /**< Change by modulators */
double nrpn; /**< Change by NRPN messages */
} fluid_gen_t;
/**
* Enum value for 'flags' field of #fluid_gen_t (not really flags).
*/
enum fluid_gen_flags
{
GEN_UNUSED, /**< Generator value is not set */
GEN_SET, /**< Generator value is set */
GEN_ABS_NRPN /**< Generator is an absolute value */
};
FLUIDSYNTH_API int fluid_gen_set_default_values(fluid_gen_t* gen);
#ifdef __cplusplus
}
#endif

View file

@ -36,7 +36,7 @@ extern "C" {
* Value that indicates success, used by most libfluidsynth functions.
* @since 1.1.0
*
* NOTE: This was not publicly defined prior to libfluidsynth 1.1.0. When
* @note This was not publicly defined prior to libfluidsynth 1.1.0. When
* writing code which should also be compatible with older versions, something
* like the following can be used:
*
@ -55,7 +55,7 @@ extern "C" {
* Value that indicates failure, used by most libfluidsynth functions.
* @since 1.1.0
*
* NOTE: See #FLUID_OK for more details.
* @note See #FLUID_OK for more details.
*/
#define FLUID_FAILED (-1)

View file

@ -32,25 +32,6 @@ extern "C" {
#define FLUID_NUM_MOD 64 /**< Maximum number of modulators in a voice */
/**
* Modulator structure. See SoundFont 2.04 PDF section 8.2.
*/
struct _fluid_mod_t
{
unsigned char dest; /**< Destination generator to control */
unsigned char src1; /**< Source controller 1 */
unsigned char flags1; /**< Source controller 1 flags */
unsigned char src2; /**< Source controller 2 */
unsigned char flags2; /**< Source controller 2 flags */
double amount; /**< Multiplier amount */
/* The 'next' field allows to link modulators into a list. It is
* not used in fluid_voice.c, there each voice allocates memory for a
* fixed number of modulators. Since there may be a huge number of
* different zones, this is more efficient.
*/
fluid_mod_t * next;
};
/**
* Flags defining the polarity, mapping function and type of a modulator source.
* Compare with SoundFont 2.04 PDF section 8.2.
@ -103,7 +84,10 @@ 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_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 void fluid_mod_clone(fluid_mod_t* mod, fluid_mod_t* src);
#ifdef __cplusplus
}

View file

@ -95,16 +95,6 @@ extern "C" {
*/
#define FLUID_HINT_LOGARITHMIC 0x10
/**
* Hint FLUID_HINT_INTEGER indicates that a user interface would
* probably wish to provide a stepped control taking only integer
* values.
* @deprecated
*
* As there is an integer setting type, this hint is not used.
*/
#define FLUID_HINT_INTEGER 0x20
#define FLUID_HINT_FILENAME 0x01 /**< String setting is a file name */
#define FLUID_HINT_OPTIONLIST 0x02 /**< Setting is a list of string options */
@ -133,7 +123,7 @@ FLUIDSYNTH_API
int fluid_settings_get_type(fluid_settings_t* settings, const char *name);
FLUIDSYNTH_API
int fluid_settings_get_hints(fluid_settings_t* settings, const char *name);
int fluid_settings_get_hints(fluid_settings_t* settings, const char *name, int* val);
FLUIDSYNTH_API
int fluid_settings_is_realtime(fluid_settings_t* settings, const char *name);
@ -147,9 +137,6 @@ int fluid_settings_copystr(fluid_settings_t* settings, const char *name, char *s
FLUIDSYNTH_API
int fluid_settings_dupstr(fluid_settings_t* settings, const char *name, char** str);
FLUIDSYNTH_API
int fluid_settings_getstr(fluid_settings_t* settings, const char *name, char** str);
FLUIDSYNTH_API
char* fluid_settings_getstr_default(fluid_settings_t* settings, const char *name);
@ -163,10 +150,10 @@ FLUIDSYNTH_API
int fluid_settings_getnum(fluid_settings_t* settings, const char *name, double* val);
FLUIDSYNTH_API
double fluid_settings_getnum_default(fluid_settings_t* settings, const char *name);
int fluid_settings_getnum_default(fluid_settings_t* settings, const char *name, double* val);
FLUIDSYNTH_API
void fluid_settings_getnum_range(fluid_settings_t* settings, const char *name,
int fluid_settings_getnum_range(fluid_settings_t* settings, const char *name,
double* min, double* max);
FLUIDSYNTH_API
@ -176,10 +163,10 @@ FLUIDSYNTH_API
int fluid_settings_getint(fluid_settings_t* settings, const char *name, int* val);
FLUIDSYNTH_API
int fluid_settings_getint_default(fluid_settings_t* settings, const char *name);
int fluid_settings_getint_default(fluid_settings_t* settings, const char *name, int* val);
FLUIDSYNTH_API
void fluid_settings_getint_range(fluid_settings_t* settings, const char *name,
int fluid_settings_getint_range(fluid_settings_t* settings, const char *name,
int* min, int* max);
/**

View file

@ -116,7 +116,7 @@ struct _fluid_sfont_t {
* @param sfont Virtual SoundFont
* @return The name of the virtual SoundFont.
*/
char* (*get_name)(fluid_sfont_t* sfont);
const char* (*get_name)(fluid_sfont_t* sfont);
/**
* Get a virtual SoundFont preset by bank and program numbers.
@ -172,7 +172,7 @@ struct _fluid_preset_t {
* valid for the duration of the virtual preset (or the duration of the
* SoundFont, in the case of preset iteration).
*/
char* (*get_name)(fluid_preset_t* preset);
const char* (*get_name)(fluid_preset_t* preset);
/**
* Method to get a virtual SoundFont preset MIDI bank number.

View file

@ -45,7 +45,6 @@ extern "C" {
* fluid_synth_noteon(), fluid_synth_noteoff(), ...
*/
#define FLUID_SYNTH_CHANNEL_INFO_NAME_SIZE 32 /**< Length of channel info name field (including zero terminator) */
/**
* Channel information structure for fluid_synth_get_channel_info().
@ -53,13 +52,10 @@ extern "C" {
*/
struct _fluid_synth_channel_info_t
{
int assigned : 1; /**< TRUE if a preset is assigned, FALSE otherwise */
/* Reserved flag bits (at the least 31) */
int sfont_id; /**< ID of parent SoundFont */
int bank; /**< MIDI bank number (0-16383) */
int program; /**< MIDI program number (0-127) */
char name[FLUID_SYNTH_CHANNEL_INFO_NAME_SIZE]; /**< Channel preset name */
char reserved[32]; /**< Reserved data for future expansion */
fluid_preset_t* preset; /**< Pointer to the preset assigned to the corresponding MIDI channel, NULL if none assigned */
int sfont_id; /**< ID of the SoundFont assigned to the corresponding MIDI channel */
int bank; /**< MIDI bank number (0-16383) assigned to the corresponding MIDI channel */
int program; /**< MIDI program number (0-127) assigned to the corresponding MIDI channel */
};
FLUIDSYNTH_API fluid_synth_t* new_fluid_synth(fluid_settings_t* settings);
@ -91,9 +87,6 @@ FLUIDSYNTH_API int
fluid_synth_program_select_by_sfont_name (fluid_synth_t* synth, int chan,
const char *sfont_name, unsigned int bank_num,
unsigned int preset_num);
FLUIDSYNTH_API
int fluid_synth_get_program(fluid_synth_t* synth, int chan, unsigned int* sfont_id,
unsigned int* bank_num, unsigned int* preset_num);
FLUIDSYNTH_API int fluid_synth_unset_program (fluid_synth_t *synth, int chan);
FLUIDSYNTH_API int fluid_synth_get_channel_info (fluid_synth_t *synth, int chan,
fluid_synth_channel_info_t *info);
@ -113,7 +106,6 @@ FLUIDSYNTH_API int fluid_synth_set_channel_type(fluid_synth_t* synth, int chan,
/* Low level access */
FLUIDSYNTH_API fluid_preset_t* fluid_synth_get_channel_preset(fluid_synth_t* synth, int chan);
FLUIDSYNTH_API int fluid_synth_start(fluid_synth_t* synth, unsigned int id,
fluid_preset_t* preset, int audio_chan,
int midi_chan, int key, int vel);
@ -215,9 +207,7 @@ enum fluid_interp {
/* Generator interface */
FLUIDSYNTH_API
int fluid_synth_set_gen(fluid_synth_t* synth, int chan, int param, float value);
FLUIDSYNTH_API int fluid_synth_set_gen2 (fluid_synth_t* synth, int chan,
FLUIDSYNTH_API int fluid_synth_set_gen (fluid_synth_t* synth, int chan,
int param, float value,
int absolute, int normalized);
FLUIDSYNTH_API float fluid_synth_get_gen(fluid_synth_t* synth, int chan, int param);

View file

@ -1,251 +0,0 @@
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
:
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
chmodcmd=""
else
instcmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f "$src" ] || [ -d "$src" ]
then
:
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
:
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
:
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
:
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
:
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0

336
missing
View file

@ -1,336 +0,0 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program 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 General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing 0.4 - GNU automake"
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
aclocal*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them.
You can get \`$1Help2man' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
# We have makeinfo, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
touch $file
;;
tar)
shift
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequirements for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0

View file

@ -1,99 +0,0 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
errstatus=0
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
# process command line arguments
while test $# -gt 0 ; do
case "${1}" in
-h | --help | --h* ) # -h for help
echo "${usage}" 1>&2; exit 0 ;;
-m ) # -m PERM arg
shift
test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
dirmode="${1}"
shift ;;
-- ) shift; break ;; # stop option processing
-* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option
* ) break ;; # first non-opt arg
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
case $dirmode in
'')
if mkdir -p -- . 2>/dev/null; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
fi ;;
*)
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
fi ;;
esac
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 3
# End:
# mkinstalldirs ends here

View file

@ -83,11 +83,11 @@ if ( OSS_SUPPORT )
set ( fluid_oss_SOURCES drivers/fluid_oss.c )
endif ( OSS_SUPPORT )
if ( LASH_SUPPORT OR LADCCA_SUPPORT )
if ( LASH_SUPPORT )
set ( fluid_lash_SOURCES bindings/fluid_lash.c bindings/fluid_lash.h )
include_directories ( ${LASH_INCLUDEDIR} ${LADCCA_INCLUDEDIR}
${LASH_INCLUDE_DIRS} ${LADCCA_INCLUDE_DIRS} )
endif ( LASH_SUPPORT OR LADCCA_SUPPORT )
include_directories ( ${LASH_INCLUDEDIR}
${LASH_INCLUDE_DIRS})
endif ( LASH_SUPPORT )
if ( DART_SUPPORT )
set ( fluid_dart_SOURCES drivers/fluid_dart.c )
@ -210,8 +210,6 @@ link_directories (
${GLIB_LIBRARY_DIRS}
${LASH_LIBDIR}
${LASH_LIBRARY_DIRS}
${LADCCA_LIBDIR}
${LADCCA_LIBRARY_DIRS}
${JACK_LIBDIR}
${JACK_LIBRARY_DIRS}
${ALSA_LIBDIR}
@ -289,7 +287,6 @@ endif ( LIBFLUID_CPPFLAGS )
target_link_libraries ( libfluidsynth
${GLIB_LIBRARIES}
${LASH_LIBRARIES}
${LADCCA_LIBRARIES}
${JACK_LIBRARIES}
${ALSA_LIBRARIES}
${PULSE_LIBRARIES}

View file

@ -1,198 +0,0 @@
## Process this file with automake to produce Makefile.in
AUTOMAKE_OPTIONS = subdir-objects
# Tests for optional drivers
if PULSE_SUPPORT
fluid_pulse = drivers/fluid_pulse.c
endif
if ALSA_SUPPORT
fluid_alsa = drivers/fluid_alsa.c
endif
if COREAUDIO_SUPPORT
fluid_coreaudio = drivers/fluid_coreaudio.c
endif
if COREMIDI_SUPPORT
fluid_coremidi = drivers/fluid_coremidi.c
endif
if DBUS_SUPPORT
fluid_rtkit = bindings/fluid_rtkit.c bindings/fluid_rtkit.h
endif
if JACK_SUPPORT
fluid_jack = drivers/fluid_jack.c
endif
if PORTAUDIO_SUPPORT
fluid_portaudio = drivers/fluid_portaudio.c
endif
if MINGW32_SUPPORT
fluid_windows = fluid_dll.c drivers/fluid_dsound.c drivers/fluid_winmidi.c
endif
if OSS_SUPPORT
fluid_oss = drivers/fluid_oss.c
endif
# if LASH_SUPPORT || LADCCA_SUPPORT (Makefile supports OR?)
if LASH_SUPPORT
fluid_lash = bindings/fluid_lash.c bindings/fluid_lash.h
else
if LADCCA_SUPPORT
fluid_lash = bindings/fluid_lash.c bindings/fluid_lash.h
endif
endif
if DART_SUPPORT
fluid_dart = drivers/fluid_dart.c
endif
# Extra files and optional drivers
EXTRA_DIST = fluid_dll.c \
bindings/fluid_ladspa.c \
bindings/fluid_ladspa.h \
drivers/fluid_alsa.c \
drivers/fluid_coreaudio.c \
drivers/fluid_coremidi.c \
drivers/fluid_dart.c \
drivers/fluid_dsound.c \
drivers/fluid_jack.c \
drivers/fluid_midishare.c \
drivers/fluid_oss.c \
drivers/fluid_portaudio.c \
drivers/fluid_pulse.c \
drivers/fluid_sndmgr.c \
drivers/fluid_winmidi.c \
config_macos.h \
config_macosx.h \
config_macosx_pb.h \
CMakeLists.txt \
config_win32.cmake \
config_win32.h.in \
config.cmake
DISTCLEANFILES = config_win32.h
lib_LTLIBRARIES = libfluidsynth.la
bin_PROGRAMS = fluidsynth
libfluidsynth_la_SOURCES = \
$(fluid_alsa) \
$(fluid_coreaudio) \
$(fluid_coremidi) \
$(fluid_jack) \
$(fluid_ladspa) \
$(fluid_lash) \
$(fluid_oss) \
$(fluid_portaudio) \
$(fluid_pulse) \
$(fluid_windows) \
$(fluid_dart) \
$(fluid_rtkit) \
utils/fluid_conv.c \
utils/fluid_conv.h \
utils/fluid_hash.c \
utils/fluid_hash.h \
utils/fluid_list.c \
utils/fluid_list.h \
utils/fluid_ringbuffer.c \
utils/fluid_ringbuffer.h \
utils/fluid_settings.c \
utils/fluid_settings.h \
utils/fluidsynth_priv.h \
utils/fluid_sys.c \
utils/fluid_sys.h \
sfloader/fluid_defsfont.c \
sfloader/fluid_defsfont.h \
sfloader/fluid_ramsfont.c \
sfloader/fluid_ramsfont.h \
sfloader/fluid_sfont.h \
rvoice/fluid_adsr_env.c \
rvoice/fluid_adsr_env.h \
rvoice/fluid_chorus.c \
rvoice/fluid_chorus.h \
rvoice/fluid_iir_filter.c \
rvoice/fluid_iir_filter.h \
rvoice/fluid_lfo.c \
rvoice/fluid_lfo.h \
rvoice/fluid_rvoice.h \
rvoice/fluid_rvoice.c \
rvoice/fluid_rvoice_dsp.c \
rvoice/fluid_rvoice_event.h \
rvoice/fluid_rvoice_event.c \
rvoice/fluid_rvoice_mixer.h \
rvoice/fluid_rvoice_mixer.c \
rvoice/fluid_phase.h \
rvoice/fluid_rev.c \
rvoice/fluid_rev.h \
synth/fluid_chan.c \
synth/fluid_chan.h \
synth/fluid_event.c \
synth/fluid_event_priv.h \
synth/fluid_gen.c \
synth/fluid_gen.h \
synth/fluid_mod.c \
synth/fluid_mod.h \
synth/fluid_synth.c \
synth/fluid_synth.h \
synth/fluid_tuning.c \
synth/fluid_tuning.h \
synth/fluid_voice.c \
synth/fluid_voice.h \
midi/fluid_midi.c \
midi/fluid_midi.h \
midi/fluid_midi_router.c \
midi/fluid_midi_router.h \
midi/fluid_seqbind.c \
midi/fluid_seq.c \
drivers/fluid_adriver.c \
drivers/fluid_adriver.h \
drivers/fluid_mdriver.c \
drivers/fluid_mdriver.h \
drivers/fluid_aufile.c \
bindings/fluid_cmd.c \
bindings/fluid_cmd.h \
bindings/fluid_ladspa.c \
bindings/fluid_ladspa.h \
bindings/fluid_filerenderer.c
INCLUDES = -I$(top_srcdir)/include \
-I$(top_srcdir)/src \
-I$(top_srcdir)/src/drivers \
-I$(top_srcdir)/src/synth \
-I$(top_srcdir)/src/rvoice \
-I$(top_srcdir)/src/midi \
-I$(top_srcdir)/src/utils \
-I$(top_srcdir)/src/sfloader \
-I$(top_srcdir)/src/bindings \
$(LASH_CFLAGS) $(LADCCA_CFLAGS) \
$(READLINE_CFLAGS) $(JACK_CFLAGS) $(ALSA_CFLAGS) $(PULSE_CFLAGS) \
$(PORTAUDIO_CFLAGS) $(DART_CFLAGS) $(GLIB_CFLAGS) $(LIBSNDFILE_CFLAGS) \
$(DBUS_CFLAGS)
libfluidsynth_la_LIBADD = $(LIBFLUID_LIBS) $(LASH_LIBS) $(LADCCA_LIBS) \
$(READLINE_LIBS) $(COREAUDIO_LIBS) $(COREMIDI_LIBS) $(JACK_LIBS) \
$(ALSA_LIBS) $(PULSE_LIBS) $(PORTAUDIO_LIBS) $(DART_LIBS) \
$(GLIB_LIBS) $(LIBSNDFILE_LIBS) $(DBUS_LIBS)
libfluidsynth_la_LDFLAGS = \
-version-info @LT_VERSION_INFO@ \
-export-dynamic $(LIBFLUID_LDFLAGS)
libfluidsynth_la_CPPFLAGS = $(LIBFLUID_CPPFLAGS)
fluidsynth_SOURCES = fluidsynth.c
fluidsynth_LDADD = libfluidsynth.la
fluidsynth_CPPFLAGS = $(FLUIDSYNTH_CPPFLAGS)
if GNU_LD_SUPPORT
fluidsynth_LDFLAGS = -Wl,--as-needed
endif

View file

@ -584,11 +584,15 @@ fluid_handle_channels(fluid_synth_t* synth, int ac, char** av, fluid_ostream_t o
if (!verbose)
fluid_ostream_printf (out, "chan %d, %s\n", i,
info.assigned ? info.name : "no preset");
info.preset!=NULL
? fluid_preset_get_name(info.preset)
: "no preset");
else
fluid_ostream_printf (out, "chan %d, sfont %d, bank %d, preset %d, %s\n", i,
info.sfont_id, info.bank, info.program,
info.assigned ? info.name : "no preset");
info.preset!=NULL
? fluid_preset_get_name(info.preset)
: "no preset");
}
return 0;
@ -1294,25 +1298,24 @@ fluid_handle_set(fluid_synth_t* synth, int ac, char** av, fluid_ostream_t out)
fluid_ostream_printf (out, "set: Parameter '%s' not found.\n", av[0]);
break;
case FLUID_INT_TYPE:
hints = fluid_settings_get_hints (synth->settings, av[0]);
if (hints & FLUID_HINT_TOGGLED)
if (fluid_settings_get_hints (synth->settings, av[0], &hints) == FLUID_OK
&& hints & FLUID_HINT_TOGGLED)
{
if (FLUID_STRCMP (av[1], "yes") == 0 || FLUID_STRCMP (av[1], "True") == 0
|| FLUID_STRCMP (av[1], "TRUE") == 0 || FLUID_STRCMP (av[1], "true") == 0
|| FLUID_STRCMP (av[1], "T") == 0)
if (FLUID_STRCMP (av[1], "yes") == 0 || FLUID_STRCMP (av[1], "True") == 0
|| FLUID_STRCMP (av[1], "TRUE") == 0 || FLUID_STRCMP (av[1], "true") == 0
|| FLUID_STRCMP (av[1], "T") == 0)
ival = 1;
else ival = atoi (av[1]);
else ival = atoi (av[1]);
}
else ival = atoi (av[1]);
fluid_synth_setint (synth, av[0], ival);
fluid_settings_setint (synth->settings, av[0], ival);
break;
case FLUID_NUM_TYPE:
fluid_synth_setnum (synth, av[0], atof (av[1]));
fluid_settings_setnum (synth->settings, av[0], atof (av[1]));
break;
case FLUID_STR_TYPE:
fluid_synth_setstr(synth, av[0], av[1]);
fluid_settings_setstr(synth->settings, av[0], av[1]);
break;
case FLUID_SET_TYPE:
fluid_ostream_printf (out, "set: Parameter '%s' is a node.\n", av[0]);
@ -1337,21 +1340,21 @@ fluid_handle_get(fluid_synth_t* synth, int ac, char** av, fluid_ostream_t out)
case FLUID_NUM_TYPE: {
double value;
fluid_synth_getnum(synth, av[0], &value);
fluid_settings_getnum(synth->settings, av[0], &value);
fluid_ostream_printf(out, "%.3f", value);
break;
}
case FLUID_INT_TYPE: {
int value;
fluid_synth_getint(synth, av[0], &value);
fluid_settings_getint(synth->settings, av[0], &value);
fluid_ostream_printf(out, "%d", value);
break;
}
case FLUID_STR_TYPE: {
char* s;
fluid_synth_dupstr(synth, av[0], &s); /* ++ alloc string */
fluid_settings_dupstr(synth->settings, av[0], &s); /* ++ alloc string */
fluid_ostream_printf(out, "%s", s ? s : "NULL");
if (s) FLUID_FREE (s); /* -- free string */
break;
@ -1395,25 +1398,27 @@ static void fluid_handle_settings_iter2(void* data, char* name, int type)
switch (fluid_settings_get_type(fluid_synth_get_settings(d->synth), name)) {
case FLUID_NUM_TYPE: {
double value;
fluid_synth_getnum(d->synth, name, &value);
fluid_settings_getnum(d->synth->settings, name, &value);
fluid_ostream_printf(d->out, "%.3f\n", value);
break;
}
case FLUID_INT_TYPE: {
int value, hints;
fluid_synth_getint(d->synth, name, &value);
hints = fluid_settings_get_hints (d->synth->settings, name);
if (!(hints & FLUID_HINT_TOGGLED))
fluid_ostream_printf(d->out, "%d\n", value);
else fluid_ostream_printf(d->out, "%s\n", value ? "True" : "False");
fluid_settings_getint(d->synth->settings, name, &value);
if(fluid_settings_get_hints (d->synth->settings, name, &hints) == FLUID_OK)
{
if (!(hints & FLUID_HINT_TOGGLED))
fluid_ostream_printf(d->out, "%d\n", value);
else fluid_ostream_printf(d->out, "%s\n", value ? "True" : "False");
}
break;
}
case FLUID_STR_TYPE: {
char* s;
fluid_synth_dupstr(d->synth, name, &s); /* ++ alloc string */
fluid_settings_dupstr(d->synth->settings, name, &s); /* ++ alloc string */
fluid_ostream_printf(d->out, "%s\n", s ? s : "NULL");
if (s) FLUID_FREE (s); /* -- free string */
break;
@ -1470,48 +1475,59 @@ fluid_handle_info(fluid_synth_t* synth, int ac, char** av, fluid_ostream_t out)
return -1;
case FLUID_NUM_TYPE: {
double value, min, max;
fluid_settings_getnum_range(settings, av[0], &min, &max);
fluid_settings_getnum(settings, av[0], &value);
fluid_ostream_printf(out, "%s:\n", av[0]);
fluid_ostream_printf(out, "Type: number\n");
fluid_ostream_printf(out, "Value: %.3f\n", value);
fluid_ostream_printf(out, "Minimum value: %.3f\n", min);
fluid_ostream_printf(out, "Maximum value: %.3f\n", max);
fluid_ostream_printf(out, "Default value: %.3f\n",
fluid_settings_getnum_default(settings, av[0]));
fluid_ostream_printf(out, "Real-time: %s\n",
fluid_settings_is_realtime(settings, av[0])? "yes" : "no");
double value, min, max, def;
if(fluid_settings_getnum_range(settings, av[0], &min, &max) == FLUID_OK
&& fluid_settings_getnum(settings, av[0], &value) == FLUID_OK
&& fluid_settings_getnum_default(settings, av[0], &def) == FLUID_OK)
{
fluid_ostream_printf(out, "%s:\n", av[0]);
fluid_ostream_printf(out, "Type: number\n");
fluid_ostream_printf(out, "Value: %.3f\n", value);
fluid_ostream_printf(out, "Minimum value: %.3f\n", min);
fluid_ostream_printf(out, "Maximum value: %.3f\n", max);
fluid_ostream_printf(out, "Default value: %.3f\n", def);
fluid_ostream_printf(out, "Real-time: %s\n",
fluid_settings_is_realtime(settings, av[0])? "yes" : "no");
}
else
{
fluid_ostream_printf(out, "An error occurred when processing %s\n", av[0]);
}
break;
}
case FLUID_INT_TYPE: {
int value, min, max, def, hints;
fluid_settings_getint_range(settings, av[0], &min, &max);
fluid_settings_getint(settings, av[0], &value);
hints = fluid_settings_get_hints(settings, av[0]);
def = fluid_settings_getint_default (settings, av[0]);
fluid_ostream_printf(out, "%s:\n", av[0]);
if (!(hints & FLUID_HINT_TOGGLED))
if(fluid_settings_getint_range(settings, av[0], &min, &max) == FLUID_OK
&& fluid_settings_getint(settings, av[0], &value) == FLUID_OK
&& fluid_settings_get_hints(settings, av[0], &hints) == FLUID_OK
&& fluid_settings_getint_default (settings, av[0], &def) == FLUID_OK)
{
fluid_ostream_printf(out, "Type: integer\n");
fluid_ostream_printf(out, "Value: %d\n", value);
fluid_ostream_printf(out, "Minimum value: %d\n", min);
fluid_ostream_printf(out, "Maximum value: %d\n", max);
fluid_ostream_printf(out, "Default value: %d\n", def);
fluid_ostream_printf(out, "%s:\n", av[0]);
if (!(hints & FLUID_HINT_TOGGLED))
{
fluid_ostream_printf(out, "Type: integer\n");
fluid_ostream_printf(out, "Value: %d\n", value);
fluid_ostream_printf(out, "Minimum value: %d\n", min);
fluid_ostream_printf(out, "Maximum value: %d\n", max);
fluid_ostream_printf(out, "Default value: %d\n", def);
}
else
{
fluid_ostream_printf(out, "Type: boolean\n");
fluid_ostream_printf(out, "Value: %s\n", value ? "True" : "False");
fluid_ostream_printf(out, "Default value: %s\n", def ? "True" : "False");
}
fluid_ostream_printf(out, "Real-time: %s\n",
fluid_settings_is_realtime(settings, av[0])? "yes" : "no");
}
else
{
fluid_ostream_printf(out, "Type: boolean\n");
fluid_ostream_printf(out, "Value: %s\n", value ? "True" : "False");
fluid_ostream_printf(out, "Default value: %s\n", def ? "True" : "False");
fluid_ostream_printf(out, "An error occurred when processing %s\n", av[0]);
}
fluid_ostream_printf(out, "Real-time: %s\n",
fluid_settings_is_realtime(settings, av[0])? "yes" : "no");
break;
}

View file

@ -68,14 +68,14 @@ void fluid_LADSPA_CreateSystemNodes(fluid_LADSPA_FxUnit_t* FxUnit){
int i;
/* Retrieve the number of synth / audio out / Fx send nodes */
assert(fluid_settings_getint(FxUnit->synth->settings, "synth.audio-groups", &temp));
assert(fluid_settings_getint(FxUnit->synth->settings, "synth.audio-groups", &temp) == FLUID_OK);
nr_input_nodes=(int) temp;
printf("%i audio groups\n", nr_input_nodes);
assert(fluid_settings_getint(FxUnit->synth->settings, "synth.audio-channels", &temp));
assert(fluid_settings_getint(FxUnit->synth->settings, "synth.audio-channels", &temp) == FLUID_OK);
nr_output_nodes=temp;
assert(fluid_settings_getint(FxUnit->synth->settings, "synth.effects-channels", &temp));
assert(fluid_settings_getint(FxUnit->synth->settings, "synth.effects-channels", &temp) == FLUID_OK);
nr_fx_input_nodes=temp;
/* Create regular input nodes (associated with audio groups) */
@ -709,13 +709,13 @@ fluid_LADSPA_run(fluid_LADSPA_FxUnit_t* FxUnit, fluid_real_t* left_buf[], fluid_
int temp;
/* Retrieve the number of synth / audio out / Fx send nodes */
assert(fluid_settings_getint(FxUnit->synth->settings, "synth.audio-groups", &temp));
assert(fluid_settings_getint(FxUnit->synth->settings, "synth.audio-groups", &temp) == FLUID_OK);
nr_groups=(int) temp;
assert(fluid_settings_getint(FxUnit->synth->settings, "synth.audio-channels", &temp));
assert(fluid_settings_getint(FxUnit->synth->settings, "synth.audio-channels", &temp) == FLUID_OK);
nr_audio_channels=temp;
assert(fluid_settings_getint(FxUnit->synth->settings, "synth.effects-channels", &temp));
assert(fluid_settings_getint(FxUnit->synth->settings, "synth.effects-channels", &temp) == FLUID_OK);
nr_fx_sends=temp;
/* Fixme: Retrieving nodes via names is inefficient

View file

@ -37,8 +37,6 @@ static void *fluid_lash_run (void * data);
*/
#ifdef HAVE_LASH
lash_client_t * fluid_lash_client;
#else
cca_client_t * fluid_lash_client;
#endif
static pthread_t fluid_lash_thread;
@ -169,132 +167,4 @@ fluid_lash_run (void * data)
return NULL;
}
#else /* deprecated LADCCA support, will remove someday */
fluid_lash_args_t *
fluid_lash_extract_args (int * pargc, char *** pargv)
{
return cca_extract_args (pargc, pargv);
}
int
fluid_lash_connect (fluid_lash_args_t * args)
{
fluid_lash_client = cca_init (args, PACKAGE, CCA_Config_Data_Set | CCA_Terminal, CCA_PROTOCOL (2,0));
return fluid_lash_client && cca_enabled (fluid_lash_client);
}
void
fluid_lash_create_thread (fluid_synth_t * synth)
{
pthread_create (&fluid_lash_thread, NULL, fluid_lash_run, synth);
}
static void
fluid_lash_save (fluid_synth_t * synth)
{
int i;
int sfcount;
fluid_sfont_t * sfont;
cca_config_t * config;
char num[32];
sfcount = fluid_synth_sfcount (synth);
config = cca_config_new ();
cca_config_set_key (config, "soundfont count");
cca_config_set_value_int (config, sfcount);
cca_send_config (fluid_lash_client, config);
for (i = sfcount - 1; i >= 0; i--)
{
sfont = fluid_synth_get_sfont (synth, i);
config = cca_config_new ();
sprintf (num, "%d", i);
cca_config_set_key (config, num);
cca_config_set_value_string (config, sfont->get_name (sfont));
cca_send_config (fluid_lash_client, config);
}
}
static void
fluid_lash_load (fluid_synth_t * synth, const char * filename)
{
fluid_synth_sfload (synth, filename, 1);
}
/* LADCCA thread */
static void *
fluid_lash_run (void * data)
{
cca_event_t * event;
cca_config_t * config;
fluid_synth_t * synth;
int done = 0;
int err;
int pending_restores = 0;
synth = (fluid_synth_t *) data;
while (!done)
{
while ( (event = cca_get_event (fluid_lash_client)) )
{
switch (cca_event_get_type (event))
{
case CCA_Save_Data_Set:
fluid_lash_save (synth);
cca_send_event (fluid_lash_client, event);
break;
case CCA_Restore_Data_Set:
cca_event_destroy (event);
break;
case CCA_Quit:
err = kill (getpid(), SIGQUIT);
if (err)
fprintf (stderr, "%s: error sending signal: %s",
__FUNCTION__, strerror (errno));
cca_event_destroy (event);
done = 1;
break;
case CCA_Server_Lost:
cca_event_destroy (event);
done = 1;
break;
default:
fprintf (stderr, "Received unknown LADCCA event of type %d\n", cca_event_get_type (event));
cca_event_destroy (event);
break;
}
}
while ( (config = cca_get_config (fluid_lash_client)) )
{
if (strcmp (cca_config_get_key (config), "soundfont count") == 0)
pending_restores = cca_config_get_value_int (config);
else
{
fluid_lash_load (synth, cca_config_get_value_string (config));
pending_restores--;
}
cca_config_destroy (config);
if (!pending_restores)
{
event = cca_event_new_with_type (CCA_Restore_Data_Set);
cca_send_event (fluid_lash_client, event);
}
}
usleep (10000);
}
return NULL;
}
#endif /* #if HAVE_LASH #else */

View file

@ -21,7 +21,7 @@
#include "config.h"
#endif
#if defined(HAVE_LASH) || defined(HAVE_LADCCA)
#if defined(HAVE_LASH)
#include "fluid_synth.h"
@ -35,14 +35,6 @@ extern lash_client_t * fluid_lash_client;
#define fluid_lash_alsa_client_id lash_alsa_client_id
#define fluid_lash_jack_client_name lash_jack_client_name
#else /* old deprecated LADCCA support which will be removed someday */
#include <ladcca/ladcca.h>
extern cca_client_t * fluid_lash_client;
#define fluid_lash_args_t cca_args_t
#define fluid_lash_alsa_client_id cca_alsa_client_id
#define fluid_lash_jack_client_name cca_jack_client_name
#endif
@ -50,4 +42,4 @@ FLUIDSYNTH_API fluid_lash_args_t *fluid_lash_extract_args (int * pargc, char ***
FLUIDSYNTH_API int fluid_lash_connect (fluid_lash_args_t * args);
FLUIDSYNTH_API void fluid_lash_create_thread (fluid_synth_t * synth);
#endif /* defined(HAVE_LASH) || defined(HAVE_LADCCA) */
#endif /* defined(HAVE_LASH) */

View file

@ -43,9 +43,6 @@
/* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H @HAVE_INTTYPES_H@
/* whether or not we are supporting ladcca */
#cmakedefine HAVE_LADCCA @HAVE_LADCCA@
/* whether or not we are supporting lash */
#cmakedefine HAVE_LASH @HAVE_LASH@

View file

@ -1,26 +0,0 @@
#define VERSION FLUIDSYNTH_VERSION
#define MACOS9
#define MACINTOSH
#define HAVE_STRING_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STDIO_H 1
#define HAVE_MATH_H 1
#define HAVE_STDARG_H 1
#define WORDS_BIGENDIAN 1
#define HAVE_LIMITS_H 1
#define HAVE_FCNTL_H 1
#undef WITH_PROFILING
#define WITHOUT_SERVER 1
/**** define to use the macintosh sound manager driver*/
#define SNDMAN_SUPPORT 1
/**** define to use the portaudio driver */
/* #define PORTAUDIO_SUPPORT 1 */
/**** define to use the MidiShare driver */
/* #define MIDISHARE_SUPPORT 1 */
/* #define MIDISHARE_DRIVER 1 */
/* #define MidiSharePPC_68k */

View file

@ -1,22 +0,0 @@
#define MACINTOSH
#define HAVE_STRING_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STDIO_H 1
#define HAVE_MATH_H 1
#define HAVE_STDARG_H 1
#define WORDS_BIGENDIAN 1
#undef WITH_PROFILING
/* define to support the MidiShare driver */
#define MIDISHARE_SUPPORT 1
#define MIDISHARE_DRIVER 1
#define PORTAUDIO_SUPPORT 1
#define PORTMIDI_SUPPORT 1
#define __Types__
/* define to support DARWIN */
#define DARWIN
typedef int socklen_t

View file

@ -1,38 +0,0 @@
#define VERSION "1.0.x"
#define MACINTOSH
/* define to support DARWIN */
#define DARWIN
#define HAVE_STRING_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STDIO_H 1
#define HAVE_MATH_H 1
#define HAVE_STDARG_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_FCNTL_H 1
#define HAVE_UNISTD_H 1
#define HAVE_LIMITS_H 1
#define HAVE_PTHREAD_H 1
#define WORDS_BIGENDIAN 1
#define DEBUG 1
#undef WITH_PROFILING
#define WITHOUT_SERVER 1
#define COREAUDIO_SUPPORT 1
#define COREMIDI_SUPPORT 1
/* define to support the MidiShare driver */
/*
#define MIDISHARE_SUPPORT 1
#define MIDISHARE_DRIVER 1
#define PORTAUDIO_SUPPORT 1
#define __Types__
*/
typedef int socklen_t

View file

@ -1,43 +0,0 @@
#define VERSION "@VERSION@"
#define HAVE_STRING_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STDIO_H 1
#define HAVE_MATH_H 1
#define HAVE_STDARG_H 1
#define HAVE_FCNTL_H 1
#define HAVE_LIMITS_H 1
#define HAVE_IO_H 1
#define HAVE_WINDOWS_H 1
#define DSOUND_SUPPORT 1
#define WINMIDI_SUPPORT 1
#define WITH_FLOAT 1
#if _MSC_VER < 1900
#define snprintf _snprintf
#endif
#define strcasecmp _stricmp
#if _MSC_VER < 1500
#define vsnprintf _vsnprintf
#endif
#define STDIN_FILENO 0
#define STDOUT_FILENO 1
#define STDERR_FILENO 2
#define WITH_PROFILING 0
#pragma warning(disable : 4244)
#pragma warning(disable : 4101)
#pragma warning(disable : 4305)
#pragma warning(disable : 4996)
#ifndef inline
#define inline __inline
#endif
typedef int socklen_t;

View file

@ -204,10 +204,6 @@ void fluid_audio_driver_settings(fluid_settings_t* settings)
fluid_settings_add_option(settings, "audio.sample-format", "16bits");
fluid_settings_add_option(settings, "audio.sample-format", "float");
fluid_settings_register_int(settings, "audio.output-channels", 2, 2, 32, 0, NULL, NULL);
fluid_settings_register_int(settings, "audio.input-channels", 0, 0, 2, 0, NULL, NULL);
#if defined(WIN32)
fluid_settings_register_int(settings, "audio.period-size", 512, 64, 8192, 0, NULL, NULL);
fluid_settings_register_int(settings, "audio.periods", 8, 2, 64, 0, NULL, NULL);

View file

@ -791,10 +791,10 @@ new_fluid_alsa_seq_driver(fluid_settings_t* settings,
fluid_settings_getint (settings, "midi.realtime-prio", &realtime_prio);
/* get the device name. if none is specified, use the default device. */
if (fluid_settings_dupstr(settings, "midi.alsa_seq.device", &device) == 0) /* ++ alloc device name */
if (fluid_settings_dupstr(settings, "midi.alsa_seq.device", &device) != FLUID_OK) /* ++ alloc device name */
goto error_recovery;
if (fluid_settings_dupstr(settings, "midi.alsa_seq.id", &id) == 0) /* ++ alloc id string */
if (fluid_settings_dupstr(settings, "midi.alsa_seq.id", &id) != FLUID_OK) /* ++ alloc id string */
goto error_recovery;
if (id == NULL) {

View file

@ -206,7 +206,7 @@ new_fluid_core_audio_driver2(fluid_settings_t* settings, fluid_audio_func_t func
fluid_settings_getint(settings, "audio.period-size", &period_size);
/* get the selected device name. if none is specified, use NULL for the default device. */
if (fluid_settings_dupstr(settings, "audio.coreaudio.device", &devname) /* alloc device name */
if (fluid_settings_dupstr(settings, "audio.coreaudio.device", &devname) == FLUID_OK /* alloc device name */
&& devname && strlen (devname) > 0) {
AudioObjectPropertyAddress pa;
pa.mSelector = kAudioHardwarePropertyDevices;

View file

@ -168,7 +168,7 @@ new_fluid_dsound_audio_driver(fluid_settings_t* settings, fluid_synth_t* synth)
devsel.devGUID = NULL;
/* get the selected device name. if none is specified, use NULL for the default device. */
if(fluid_settings_dupstr(settings, "audio.dsound.device", &devsel.devname) /* ++ alloc device name */
if(fluid_settings_dupstr(settings, "audio.dsound.device", &devsel.devname) == FLUID_OK /* ++ alloc device name */
&& devsel.devname && strlen (devsel.devname) > 0) {
/* look for the GUID of the selected device */
DirectSoundEnumerate((LPDSENUMCALLBACK) fluid_dsound_enum_callback2, (void *)&devsel);

View file

@ -163,7 +163,7 @@ new_fluid_oss_audio_driver(fluid_settings_t* settings, fluid_synth_t* synth)
goto error_recovery;
}
if (!fluid_settings_dupstr(settings, "audio.oss.device", &devname) || !devname) { /* ++ alloc device name */
if (fluid_settings_dupstr(settings, "audio.oss.device", &devname) != FLUID_OK || !devname) { /* ++ alloc device name */
devname = FLUID_STRDUP ("/dev/dsp");
if (devname == NULL) {
@ -277,7 +277,7 @@ new_fluid_oss_audio_driver2(fluid_settings_t* settings, fluid_audio_func_t func,
dev->buffer_byte_size = dev->buffer_size * 2 * 2; /* 2 channels * 16 bits audio */
if (!fluid_settings_dupstr(settings, "audio.oss.device", &devname) || !devname) {
if (fluid_settings_dupstr(settings, "audio.oss.device", &devname) != FLUID_OK || !devname) {
devname = FLUID_STRDUP ("/dev/dsp");
if (!devname)

View file

@ -99,7 +99,6 @@ new_fluid_pulse_audio_driver2(fluid_settings_t* settings,
FLUID_MEMSET(dev, 0, sizeof(fluid_pulse_audio_driver_t));
// fluid_settings_getint(settings, "audio.periods", &periods);
fluid_settings_getint(settings, "audio.period-size", &period_size);
fluid_settings_getnum(settings, "synth.sample-rate", &sample_rate);
fluid_settings_dupstr(settings, "audio.pulseaudio.server", &server); /* ++ alloc server string */

View file

@ -132,7 +132,7 @@ new_fluid_winmidi_driver(fluid_settings_t* settings,
dev->closing = FALSE;
/* get the device name. if none is specified, use the default device. */
if(!fluid_settings_dupstr(settings, "midi.winmidi.device", &devname) || !devname) {
if(fluid_settings_dupstr(settings, "midi.winmidi.device", &devname) != FLUID_OK || !devname) {
devname = FLUID_STRDUP ("default");
if (!devname)

View file

@ -104,16 +104,15 @@ void process_o_cmd_line_option(fluid_settings_t* settings, char* optarg)
switch(fluid_settings_get_type(settings, optarg)){
case FLUID_NUM_TYPE:
if (!fluid_settings_setnum (settings, optarg, atof (val)))
if (fluid_settings_setnum (settings, optarg, atof (val)) != FLUID_OK)
{
fprintf (stderr, "Failed to set floating point parameter '%s'\n", optarg);
exit (1);
}
break;
case FLUID_INT_TYPE:
hints = fluid_settings_get_hints (settings, optarg);
if (hints & FLUID_HINT_TOGGLED)
if (fluid_settings_get_hints (settings, optarg, &hints) == FLUID_OK
&& hints & FLUID_HINT_TOGGLED)
{
if (FLUID_STRCMP (val, "yes") == 0 || FLUID_STRCMP (val, "True") == 0
|| FLUID_STRCMP (val, "TRUE") == 0 || FLUID_STRCMP (val, "true") == 0
@ -123,14 +122,14 @@ void process_o_cmd_line_option(fluid_settings_t* settings, char* optarg)
}
else ival = atoi (val);
if (!fluid_settings_setint (settings, optarg, ival))
if (fluid_settings_setint (settings, optarg, ival) != FLUID_OK)
{
fprintf (stderr, "Failed to set integer parameter '%s'\n", optarg);
exit (1);
}
break;
case FLUID_STR_TYPE:
if (!fluid_settings_setstr (settings, optarg, val))
if (fluid_settings_setstr (settings, optarg, val) != FLUID_OK)
{
fprintf (stderr, "Failed to set string parameter '%s'\n", optarg);
exit (1);
@ -184,14 +183,14 @@ settings_foreach_func (void *data, char *name, int type)
{
case FLUID_NUM_TYPE:
fluid_settings_getnum_range (settings, name, &dmin, &dmax);
ddef = fluid_settings_getnum_default (settings, name);
fluid_settings_getnum_default (settings, name, &ddef);
printf ("%-24s FLOAT [min=%0.3f, max=%0.3f, def=%0.3f]\n",
name, dmin, dmax, ddef);
break;
case FLUID_INT_TYPE:
fluid_settings_getint_range (settings, name, &imin, &imax);
idef = fluid_settings_getint_default (settings, name);
hints = fluid_settings_get_hints (settings, name);
fluid_settings_getint_default (settings, name, &idef);
fluid_settings_get_hints (settings, name, &hints);
if (!(hints & FLUID_HINT_TOGGLED))
{
@ -418,7 +417,6 @@ int main(int argc, char** argv)
fluid_settings_setint(settings, "audio.periods", atoi(optarg));
break;
case 'd':
fluid_settings_setint(settings, "synth.dump", TRUE);
dump = 1;
break;
case 'E':
@ -714,10 +712,12 @@ int main(int argc, char** argv)
if (fluid_synth_get_sfont(synth, 0) == NULL) {
/* Try to load the default soundfont if no soundfont specified */
char *s;
if (fluid_settings_getstr(settings, "synth.default-soundfont", &s) <= 0)
if (fluid_settings_dupstr(settings, "synth.default-soundfont", &s) != FLUID_OK)
s = NULL;
if ((s != NULL) && (s[0] != '\0'))
fluid_synth_sfload(synth, s, 1);
FLUID_FREE(s);
}
fluid_player_play(player);
@ -789,7 +789,7 @@ int main(int argc, char** argv)
if (interactive) {
fluid_player_stop(player);
}
if (adriver != NULL || !fluid_settings_str_equal(settings, "player.timing-source", "sample")) {
if (adriver != NULL || fluid_settings_str_equal(settings, "player.timing-source", "sample") != FLUID_OK) {
/* if no audio driver and sample timers are used, nothing makes the player advance */
fluid_player_join(player);
}

View file

@ -184,7 +184,7 @@ fluid_seq_fluidsynth_callback(unsigned int time, fluid_event_t* evt, fluid_seque
fluid_synth_pitch_bend(synth, fluid_event_get_channel(evt), fluid_event_get_pitch(evt));
break;
case FLUID_SEQ_PITCHWHHELSENS:
case FLUID_SEQ_PITCHWHEELSENS:
fluid_synth_pitch_wheel_sens(synth, fluid_event_get_channel(evt), fluid_event_get_value(evt));
break;

View file

@ -35,11 +35,15 @@ typedef enum
FLUID_CHORUS_SET_SPEED = 1 << 2,
FLUID_CHORUS_SET_DEPTH = 1 << 3,
FLUID_CHORUS_SET_TYPE = 1 << 4,
/** Value for fluid_chorus_set() which sets all chorus parameters. */
FLUID_CHORUS_SET_ALL = FLUID_CHORUS_SET_NR
| FLUID_CHORUS_SET_LEVEL
| FLUID_CHORUS_SET_SPEED
| FLUID_CHORUS_SET_DEPTH
| FLUID_CHORUS_SET_TYPE,
} fluid_chorus_set_t;
/** Value for fluid_chorus_set() which sets all chorus parameters. */
#define FLUID_CHORUS_SET_ALL 0x1F
/*
* chorus
*/

View file

@ -33,12 +33,15 @@ typedef enum
FLUID_REVMODEL_SET_ROOMSIZE = 1 << 0,
FLUID_REVMODEL_SET_DAMPING = 1 << 1,
FLUID_REVMODEL_SET_WIDTH = 1 << 2,
FLUID_REVMODEL_SET_LEVEL = 1 << 3
FLUID_REVMODEL_SET_LEVEL = 1 << 3,
/** Value for fluid_revmodel_set() which sets all reverb parameters. */
FLUID_REVMODEL_SET_ALL = FLUID_REVMODEL_SET_LEVEL
| FLUID_REVMODEL_SET_WIDTH
| FLUID_REVMODEL_SET_DAMPING
| FLUID_REVMODEL_SET_ROOMSIZE,
} fluid_revmodel_set_t;
/** Value for fluid_revmodel_set() which sets all reverb parameters. */
#define FLUID_REVMODEL_SET_ALL 0x0F
/*
* reverb preset
*/

View file

@ -108,7 +108,7 @@ int fluid_defsfont_sfont_delete(fluid_sfont_t* sfont)
return 0;
}
char* fluid_defsfont_sfont_get_name(fluid_sfont_t* sfont)
const char* fluid_defsfont_sfont_get_name(fluid_sfont_t* sfont)
{
return fluid_defsfont_get_name((fluid_defsfont_t*) sfont->data);
}
@ -187,7 +187,7 @@ int fluid_defpreset_preset_delete(fluid_preset_t* preset)
return 0;
}
char* fluid_defpreset_preset_get_name(fluid_preset_t* preset)
const char* fluid_defpreset_preset_get_name(fluid_preset_t* preset)
{
return fluid_defpreset_get_name((fluid_defpreset_t*) preset->data);
}
@ -538,7 +538,7 @@ int delete_fluid_defsfont(fluid_defsfont_t* sfont)
/*
* fluid_defsfont_get_name
*/
char* fluid_defsfont_get_name(fluid_defsfont_t* sfont)
const char* fluid_defsfont_get_name(fluid_defsfont_t* sfont)
{
return sfont->filename;
}
@ -778,7 +778,7 @@ fluid_defpreset_get_num(fluid_defpreset_t* preset)
return preset->num;
}
char*
const char*
fluid_defpreset_get_name(fluid_defpreset_t* preset)
{
return preset->name;

View file

@ -28,6 +28,8 @@
#include "fluidsynth.h"
#include "fluidsynth_priv.h"
#include "fluid_list.h"
#include "fluid_mod.h"
#include "fluid_gen.h"
@ -381,14 +383,14 @@ fluid_sfont_t* fluid_defsfloader_load(fluid_sfloader_t* loader, const char* file
int fluid_defsfont_sfont_delete(fluid_sfont_t* sfont);
char* fluid_defsfont_sfont_get_name(fluid_sfont_t* sfont);
const char* fluid_defsfont_sfont_get_name(fluid_sfont_t* sfont);
fluid_preset_t* fluid_defsfont_sfont_get_preset(fluid_sfont_t* sfont, unsigned int bank, unsigned int prenum);
void fluid_defsfont_sfont_iteration_start(fluid_sfont_t* sfont);
int fluid_defsfont_sfont_iteration_next(fluid_sfont_t* sfont, fluid_preset_t* preset);
int fluid_defpreset_preset_delete(fluid_preset_t* preset);
char* fluid_defpreset_preset_get_name(fluid_preset_t* preset);
const char* fluid_defpreset_preset_get_name(fluid_preset_t* preset);
int fluid_defpreset_preset_get_banknum(fluid_preset_t* preset);
int fluid_defpreset_preset_get_num(fluid_preset_t* preset);
int fluid_defpreset_preset_noteon(fluid_preset_t* preset, fluid_synth_t* synth, int chan, int key, int vel);
@ -419,7 +421,7 @@ struct _fluid_defsfont_t
fluid_defsfont_t* new_fluid_defsfont(fluid_settings_t* settings);
int delete_fluid_defsfont(fluid_defsfont_t* sfont);
int fluid_defsfont_load(fluid_defsfont_t* sfont, const char* file);
char* fluid_defsfont_get_name(fluid_defsfont_t* sfont);
const char* fluid_defsfont_get_name(fluid_defsfont_t* sfont);
fluid_defpreset_t* fluid_defsfont_get_preset(fluid_defsfont_t* sfont, unsigned int bank, unsigned int prenum);
void fluid_defsfont_iteration_start(fluid_defsfont_t* sfont);
int fluid_defsfont_iteration_next(fluid_defsfont_t* sfont, fluid_preset_t* preset);
@ -452,7 +454,7 @@ fluid_preset_zone_t* fluid_defpreset_get_zone(fluid_defpreset_t* preset);
fluid_preset_zone_t* fluid_defpreset_get_global_zone(fluid_defpreset_t* preset);
int fluid_defpreset_get_banknum(fluid_defpreset_t* preset);
int fluid_defpreset_get_num(fluid_defpreset_t* preset);
char* fluid_defpreset_get_name(fluid_defpreset_t* preset);
const char* fluid_defpreset_get_name(fluid_defpreset_t* preset);
int fluid_defpreset_noteon(fluid_defpreset_t* preset, fluid_synth_t* synth, int chan, int key, int vel);
/*

View file

@ -27,7 +27,7 @@
/* Prototypes */
static int fluid_ramsfont_sfont_delete(fluid_sfont_t* sfont);
static char *fluid_ramsfont_sfont_get_name(fluid_sfont_t* sfont);
static const char *fluid_ramsfont_sfont_get_name(fluid_sfont_t* sfont);
static fluid_preset_t *fluid_ramsfont_sfont_get_preset(fluid_sfont_t* sfont,
unsigned int bank,
unsigned int prenum);
@ -35,7 +35,7 @@ static void fluid_ramsfont_sfont_iteration_start(fluid_sfont_t* sfont);
static int fluid_ramsfont_sfont_iteration_next(fluid_sfont_t* sfont,
fluid_preset_t* preset);
static int fluid_rampreset_preset_delete(fluid_preset_t* preset);
static char *fluid_rampreset_preset_get_name(fluid_preset_t* preset);
static const char *fluid_rampreset_preset_get_name(fluid_preset_t* preset);
static int fluid_rampreset_preset_get_banknum(fluid_preset_t* preset);
static int fluid_rampreset_preset_get_num(fluid_preset_t* preset);
static int fluid_rampreset_preset_noteon(fluid_preset_t* preset,
@ -43,7 +43,7 @@ static int fluid_rampreset_preset_noteon(fluid_preset_t* preset,
int key, int vel);
static fluid_ramsfont_t *new_fluid_ramsfont (void);
static int delete_fluid_ramsfont (fluid_ramsfont_t* sfont);
static char *fluid_ramsfont_get_name(fluid_ramsfont_t* sfont);
static const char *fluid_ramsfont_get_name(fluid_ramsfont_t* sfont);
static int fluid_ramsfont_add_preset (fluid_ramsfont_t* sfont,
fluid_rampreset_t* preset);
static fluid_rampreset_t *fluid_ramsfont_get_preset (fluid_ramsfont_t* sfont,
@ -55,7 +55,7 @@ static fluid_rampreset_t* new_fluid_rampreset(fluid_ramsfont_t* sfont);
static int 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 char *fluid_rampreset_get_name (fluid_rampreset_t* preset);
static const char *fluid_rampreset_get_name (fluid_rampreset_t* preset);
static fluid_rampreset_t *fluid_rampreset_next (fluid_rampreset_t* preset);
static int fluid_rampreset_add_zone(fluid_rampreset_t* preset,
fluid_preset_zone_t* zone);
@ -123,7 +123,7 @@ fluid_ramsfont_sfont_delete(fluid_sfont_t* sfont)
}
/* RAM SoundFont loader method to get name */
static char *
static const char *
fluid_ramsfont_sfont_get_name(fluid_sfont_t* sfont)
{
return fluid_ramsfont_get_name((fluid_ramsfont_t*) sfont->data);
@ -193,7 +193,7 @@ fluid_rampreset_preset_delete(fluid_preset_t* preset)
}
/* RAM SoundFont loader get preset name method */
static char *
static const char *
fluid_rampreset_preset_get_name(fluid_preset_t* preset)
{
return fluid_rampreset_get_name((fluid_rampreset_t*) preset->data);
@ -281,7 +281,7 @@ delete_fluid_ramsfont (fluid_ramsfont_t* sfont)
return FLUID_OK;
}
static char *
static const char *
fluid_ramsfont_get_name(fluid_ramsfont_t* sfont)
{
return sfont->name;
@ -588,7 +588,7 @@ fluid_rampreset_get_num (fluid_rampreset_t* preset)
}
/* Get a RAM SoundFont preset name */
static char *
static const char *
fluid_rampreset_get_name (fluid_rampreset_t* preset)
{
return preset->name;

View file

@ -286,7 +286,7 @@ fluid_event_pitch_bend(fluid_event_t* evt, int channel, int pitch)
void
fluid_event_pitch_wheelsens(fluid_event_t* evt, int channel, short value)
{
evt->type = FLUID_SEQ_PITCHWHHELSENS;
evt->type = FLUID_SEQ_PITCHWHEELSENS;
evt->channel = channel;
evt->value = value;
}
@ -558,7 +558,7 @@ short fluid_event_get_control(fluid_event_t* evt)
*
* The Value field is used by the following event types:
* #FLUID_SEQ_PROGRAMCHANGE, #FLUID_SEQ_PROGRAMSELECT (preset_num),
* #FLUID_SEQ_PITCHWHHELSENS, #FLUID_SEQ_MODULATION, #FLUID_SEQ_SUSTAIN,
* #FLUID_SEQ_PITCHWHEELSENS, #FLUID_SEQ_MODULATION, #FLUID_SEQ_SUSTAIN,
* #FLUID_SEQ_CONTROLCHANGE, #FLUID_SEQ_PAN, #FLUID_SEQ_VOLUME,
* #FLUID_SEQ_REVERBSEND, #FLUID_SEQ_CHORUSSEND.
*/

View file

@ -92,7 +92,7 @@ fluid_gen_info_t fluid_gen_info[] = {
/**
* Set an array of generators to their default values.
* @param gen Array of generators (should be #GEN_LAST in size).
* @return Always returns 0
* @return Always returns #FLUID_OK
*/
int
fluid_gen_set_default_values(fluid_gen_t* gen)

View file

@ -33,12 +33,34 @@ typedef struct _fluid_gen_info_t {
float def; /* The default value (cfr. fluid_gen_set_default_values()) */
} fluid_gen_info_t;
/**
* SoundFont generator structure.
*/
typedef struct _fluid_gen_t
{
unsigned char flags; /**< Is the generator set or not (#fluid_gen_flags) */
double val; /**< The nominal value */
double mod; /**< Change by modulators */
double nrpn; /**< Change by NRPN messages */
} fluid_gen_t;
/**
* Enum value for 'flags' field of #fluid_gen_t (not really flags).
*/
enum fluid_gen_flags
{
GEN_UNUSED, /**< Generator value is not set */
GEN_SET, /**< Generator value is set */
GEN_ABS_NRPN /**< Generator is an absolute value */
};
#define fluid_gen_set_mod(_gen, _val) { (_gen)->mod = (double) (_val); }
#define fluid_gen_set_nrpn(_gen, _val) { (_gen)->nrpn = (double) (_val); }
fluid_real_t fluid_gen_scale(int gen, float value);
fluid_real_t fluid_gen_scale_nrpn(int gen, int nrpn);
int fluid_gen_init(fluid_gen_t* gen, fluid_channel_t* channel);
int fluid_gen_set_default_values(fluid_gen_t* gen);
#endif /* _FLUID_GEN_H */

View file

@ -22,8 +22,11 @@
#include "fluid_chan.h"
#include "fluid_voice.h"
/*
* fluid_mod_clone
/**
* Clone the modulators destination, sources, flags and amount.
* @param mod the modulator to store the copy to
* @param src the source modulator to retrieve the information from
* @note The \c next member of \c mod will be left unchanged.
*/
void
fluid_mod_clone(fluid_mod_t* mod, fluid_mod_t* src)
@ -418,7 +421,43 @@ fluid_mod_test_identity (fluid_mod_t *mod1, fluid_mod_t *mod2)
&& mod1->flags2 == mod2->flags2;
}
/**
* Check if the modulator has the given source.
*
* @param cc Boolean value indicating if ctrl is a CC controller or not
* @param ctrl The source to check for (if \c cc == FALSE : a value of type #fluid_mod_src, else the value of the MIDI CC to check for)
*
* @return TRUE if the modulator has the given source, FALSE otherwise.
*/
int fluid_mod_has_source(fluid_mod_t * mod, int cc, int ctrl)
{
return
(
(
((mod->src1 == ctrl) && ((mod->flags1 & FLUID_MOD_CC) != 0) && (cc != 0))
|| ((mod->src1 == ctrl) && ((mod->flags1 & FLUID_MOD_CC) == 0) && (cc == 0))
)
||
(
((mod->src2 == ctrl) && ((mod->flags2 & FLUID_MOD_CC) != 0) && (cc != 0))
|| ((mod->src2 == ctrl) && ((mod->flags2 & FLUID_MOD_CC) == 0) && (cc == 0))
)
);
}
/**
* Check if the modulator has the given destination.
* @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)
{
return mod->dest == gen;
}
/* debug function: Prints the contents of a modulator */
#ifdef DEBUG
void fluid_dump_modulator(fluid_mod_t * mod){
int src1=mod->src1;
int dest=mod->dest;
@ -467,5 +506,5 @@ void fluid_dump_modulator(fluid_mod_t * mod){
}; /* switch dest */
printf(", amount %f flags %i src2 %i flags2 %i\n",amount, flags1, src2, flags2);
};
#endif

View file

@ -24,17 +24,30 @@
#include "fluidsynth_priv.h"
#include "fluid_conv.h"
void fluid_mod_clone(fluid_mod_t* mod, fluid_mod_t* src);
/**
* Modulator structure. See SoundFont 2.04 PDF section 8.2.
*/
struct _fluid_mod_t
{
unsigned char dest; /**< Destination generator to control */
unsigned char src1; /**< Source controller 1 */
unsigned char flags1; /**< Source controller 1 flags */
unsigned char src2; /**< Source controller 2 */
unsigned char flags2; /**< Source controller 2 flags */
double amount; /**< Multiplier amount */
/* The 'next' field allows to link modulators into a list. It is
* not used in fluid_voice.c, there each voice allocates memory for a
* fixed number of modulators. Since there may be a huge number of
* different zones, this is more efficient.
*/
fluid_mod_t * next;
};
fluid_real_t fluid_mod_get_value(fluid_mod_t* mod, fluid_channel_t* chan, fluid_voice_t* voice);
#ifdef DEBUG
void fluid_dump_modulator(fluid_mod_t * mod);
#define fluid_mod_has_source(mod,cc,ctrl) \
( ((((mod)->src1 == ctrl) && (((mod)->flags1 & FLUID_MOD_CC) != 0) && (cc != 0)) \
|| ((((mod)->src1 == ctrl) && (((mod)->flags1 & FLUID_MOD_CC) == 0) && (cc == 0)))) \
|| ((((mod)->src2 == ctrl) && (((mod)->flags2 & FLUID_MOD_CC) != 0) && (cc != 0)) \
|| ((((mod)->src2 == ctrl) && (((mod)->flags2 & FLUID_MOD_CC) == 0) && (cc == 0)))))
#define fluid_mod_has_dest(mod,gen) ((mod)->dest == gen)
#endif
#endif /* _FLUID_MOD_H */

View file

@ -175,8 +175,6 @@ void fluid_synth_settings(fluid_settings_t* settings)
{
fluid_settings_register_int(settings, "synth.verbose", 0, 0, 1,
FLUID_HINT_TOGGLED, NULL, NULL);
fluid_settings_register_int(settings, "synth.dump", 0, 0, 1,
FLUID_HINT_TOGGLED, NULL, NULL);
fluid_settings_register_int(settings, "synth.reverb.active", 1, 0, 1,
FLUID_HINT_TOGGLED, NULL, NULL);
fluid_settings_register_int(settings, "synth.chorus.active", 1, 0, 1,
@ -601,7 +599,6 @@ new_fluid_synth(fluid_settings_t *settings)
fluid_settings_getint(settings, "synth.reverb.active", &synth->with_reverb);
fluid_settings_getint(settings, "synth.chorus.active", &synth->with_chorus);
fluid_settings_getint(settings, "synth.verbose", &synth->verbose);
fluid_settings_getint(settings, "synth.dump", &synth->dump);
fluid_settings_getint(settings, "synth.polyphony", &synth->polyphony);
fluid_settings_getnum(settings, "synth.sample-rate", &synth->sample_rate);
@ -770,13 +767,13 @@ new_fluid_synth(fluid_settings_t *settings)
}
synth->bank_select = FLUID_BANK_STYLE_GS;
if (fluid_settings_str_equal (settings, "synth.midi-bank-select", "gm") == 1)
if (fluid_settings_str_equal (settings, "synth.midi-bank-select", "gm"))
synth->bank_select = FLUID_BANK_STYLE_GM;
else if (fluid_settings_str_equal (settings, "synth.midi-bank-select", "gs") == 1)
else if (fluid_settings_str_equal (settings, "synth.midi-bank-select", "gs"))
synth->bank_select = FLUID_BANK_STYLE_GS;
else if (fluid_settings_str_equal (settings, "synth.midi-bank-select", "xg") == 1)
else if (fluid_settings_str_equal (settings, "synth.midi-bank-select", "xg"))
synth->bank_select = FLUID_BANK_STYLE_XG;
else if (fluid_settings_str_equal (settings, "synth.midi-bank-select", "mma") == 1)
else if (fluid_settings_str_equal (settings, "synth.midi-bank-select", "mma"))
synth->bank_select = FLUID_BANK_STYLE_MMA;
fluid_synth_process_event_queue(synth);
@ -2124,7 +2121,7 @@ fluid_synth_sfont_select(fluid_synth_t* synth, int chan, unsigned int sfont_id)
* @return #FLUID_OK on success, #FLUID_FAILED otherwise
* @since 1.1.1
*
* Note: Channel retains its SoundFont ID and bank numbers, while the program
* @note Channel retains its SoundFont ID and bank numbers, while the program
* number is set to an "unset" state. MIDI program changes may re-assign a
* preset if one matches.
*/
@ -2138,36 +2135,6 @@ fluid_synth_unset_program (fluid_synth_t *synth, int chan)
FLUID_API_RETURN(result);
}
/**
* Get current SoundFont ID, bank number and program number for a MIDI channel.
* @param synth FluidSynth instance
* @param chan MIDI channel number (0 to MIDI channel count - 1)
* @param sfont_id Location to store SoundFont ID
* @param bank_num Location to store MIDI bank number
* @param preset_num Location to store MIDI program number
* @return FLUID_OK on success, FLUID_FAILED otherwise
*/
int
fluid_synth_get_program(fluid_synth_t* synth, int chan, unsigned int* sfont_id,
unsigned int* bank_num, unsigned int* preset_num)
{
fluid_channel_t* channel;
fluid_return_val_if_fail (sfont_id != NULL, FLUID_FAILED);
fluid_return_val_if_fail (bank_num != NULL, FLUID_FAILED);
fluid_return_val_if_fail (preset_num != NULL, FLUID_FAILED);
FLUID_API_ENTRY_CHAN(FLUID_FAILED);
channel = synth->channel[chan];
fluid_channel_get_sfont_bank_prog(channel, (int *)sfont_id, (int *)bank_num,
(int *)preset_num);
/* 128 indicates that the preset is unset. Set to 0 to be backwards compatible. */
if (*preset_num == FLUID_UNSET_PROGRAM) *preset_num = 0;
FLUID_API_RETURN(FLUID_OK);
}
/**
* Select an instrument on a MIDI channel by SoundFont ID, bank and program numbers.
* @param synth FluidSynth instance
@ -2450,7 +2417,7 @@ fluid_synth_get_polyphony(fluid_synth_t* synth)
* @return Number of currently active voices.
* @since 1.1.0
*
* Note: To generate accurate continuous statistics of the voice count, caller
* @note To generate accurate continuous statistics of the voice count, caller
* should ensure this function is called synchronously with the audio synthesis
* process. This can be done in the new_fluid_audio_driver2() audio callback
* function for example.
@ -3688,78 +3655,28 @@ fluid_synth_get_sfont_by_name(fluid_synth_t* synth, const char *name)
}
/**
* Get active preset on a MIDI channel.
* @param synth FluidSynth instance
* @param chan MIDI channel number (0 to MIDI channel count - 1)
* @return Preset or NULL if no preset active on channel
* @deprecated fluid_synth_get_channel_info() should replace most use cases.
*
* @note Should only be called from within synthesis thread, which includes
* SoundFont loader preset noteon methods. Not thread safe otherwise.
*/
fluid_preset_t *
fluid_synth_get_channel_preset(fluid_synth_t* synth, int chan)
{
fluid_preset_t* result;
fluid_channel_t *channel;
FLUID_API_ENTRY_CHAN(NULL);
channel = synth->channel[chan];
result = channel->preset;
fluid_synth_api_exit(synth);
return result;
}
/**
* Get information on the currently selected preset on a MIDI channel.
* Get information about a MIDI channel. Specifically retrieve the currently active fluid_preset_t, SoundFont ID, bank number and program number for that MIDI channel.
* @param synth FluidSynth instance
* @param chan MIDI channel number (0 to MIDI channel count - 1)
* @param info Caller supplied structure to fill with preset information
* @return #FLUID_OK on success, #FLUID_FAILED otherwise
* @since 1.1.1
*
* @note The ID, bank and program assigned to the MIDI channel may be different to the ID, bank and program specified by the preset. This may happen if e.g. a preset requested by a program change could not be found and the synth falls back to a default preset instead.
*/
int
fluid_synth_get_channel_info (fluid_synth_t *synth, int chan,
fluid_synth_channel_info_t *info)
{
fluid_channel_t *channel;
fluid_preset_t *preset;
char *name;
if (info)
{
info->assigned = FALSE;
info->name[0] = '\0';
}
fluid_return_val_if_fail (info != NULL, FLUID_FAILED);
FLUID_API_ENTRY_CHAN(FLUID_FAILED);
channel = synth->channel[chan];
preset = channel->preset;
if (preset)
{
info->assigned = TRUE;
name = fluid_preset_get_name (preset);
if (name)
{
strncpy (info->name, name, FLUID_SYNTH_CHANNEL_INFO_NAME_SIZE);
info->name[FLUID_SYNTH_CHANNEL_INFO_NAME_SIZE - 1] = '\0';
}
else info->name[0] = '\0';
info->sfont_id = preset->sfont->id;
info->bank = fluid_preset_get_banknum (preset);
info->program = fluid_preset_get_num (preset);
}
else
{
info->assigned = FALSE;
fluid_channel_get_sfont_bank_prog (channel, &info->sfont_id, &info->bank, &info->program);
info->name[0] = '\0';
}
info->preset = channel->preset;
fluid_channel_get_sfont_bank_prog (channel, &info->sfont_id, &info->bank, &info->program);
fluid_synth_api_exit(synth);
return FLUID_OK;
@ -4797,124 +4714,40 @@ fluid_synth_get_settings(fluid_synth_t* synth)
return synth->settings;
}
/**
* Convenience function to set a string setting of a synth.
* @param synth FluidSynth instance
* @param name Name of setting parameter
* @param str Value to assign to the setting
* @return FLUID_OK on success, FLUID_FAILED otherwise
*/
int
fluid_synth_setstr(fluid_synth_t* synth, const char* name, const char* str)
{
fluid_return_val_if_fail (synth != NULL, FLUID_FAILED);
fluid_return_val_if_fail (name != NULL, FLUID_FAILED);
return fluid_settings_setstr(synth->settings, name, str);
}
/**
* Convenience function to duplicate a string setting of a synth.
* @param synth FluidSynth instance
* @param name Name of setting parameter
* @param str Location to store a pointer to the newly allocated string value
* @return FLUID_OK on success, FLUID_FAILED otherwise
*
* The returned string is owned by the caller and should be freed with free()
* when finished with it.
*/
int
fluid_synth_dupstr(fluid_synth_t* synth, const char* name, char** str)
{
fluid_return_val_if_fail (synth != NULL, FLUID_FAILED);
fluid_return_val_if_fail (name != NULL, FLUID_FAILED);
fluid_return_val_if_fail (str != NULL, FLUID_FAILED);
return fluid_settings_dupstr(synth->settings, name, str);
}
/**
* Convenience function to set a floating point setting of a synth.
* @param synth FluidSynth instance
* @param name Name of setting parameter
* @param val Value to assign to the setting
* @return FLUID_OK on success, FLUID_FAILED otherwise
*/
int
fluid_synth_setnum(fluid_synth_t* synth, const char* name, double val)
{
fluid_return_val_if_fail (synth != NULL, FLUID_FAILED);
fluid_return_val_if_fail (name != NULL, FLUID_FAILED);
return fluid_settings_setnum(synth->settings, name, val);
}
/**
* Convenience function to get a floating point setting of a synth.
* @param synth FluidSynth instance
* @param name Name of setting parameter
* @param val Location to store the current value of the setting
* @return FLUID_OK on success, FLUID_FAILED otherwise
*/
int
fluid_synth_getnum(fluid_synth_t* synth, const char* name, double* val)
{
fluid_return_val_if_fail (synth != NULL, FLUID_FAILED);
fluid_return_val_if_fail (name != NULL, FLUID_FAILED);
return fluid_settings_getnum(synth->settings, name, val);
}
/**
* Convenience function to set an integer setting of a synth.
* @param synth FluidSynth instance
* @param name Name of setting parameter
* @param val Value to assign to the setting
* @return FLUID_OK on success, FLUID_FAILED otherwise
*/
int
fluid_synth_setint(fluid_synth_t* synth, const char* name, int val)
{
fluid_return_val_if_fail (synth != NULL, FLUID_FAILED);
fluid_return_val_if_fail (name != NULL, FLUID_FAILED);
return fluid_settings_setint(synth->settings, name, val);
}
/**
* Convenience function to get an integer setting of a synth.
* @param synth FluidSynth instance
* @param name Name of setting parameter
* @param val Location to store the current value of the setting
* @return FLUID_OK on success, FLUID_FAILED otherwise
*/
int
fluid_synth_getint(fluid_synth_t* synth, const char* name, int* val)
{
fluid_return_val_if_fail (synth != NULL, FLUID_FAILED);
fluid_return_val_if_fail (name != NULL, FLUID_FAILED);
return fluid_settings_getint(synth->settings, name, val);
}
/**
* Set a SoundFont generator (effect) value on a MIDI channel in real-time.
* @param synth FluidSynth instance
* @param chan MIDI channel number (0 to MIDI channel count - 1)
* @param param SoundFont generator ID (#fluid_gen_type)
* @param value Offset generator value to assign to the MIDI channel
* @param value Offset or absolute generator value to assign to the MIDI channel
* @param absolute FALSE to assign a relative value, TRUE to assign an absolute value
* @param normalized FALSE if value is specified in the native units of the generator,
* 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@
*
* Parameter numbers and ranges are described in the SoundFont 2.01
* specification PDF, paragraph 8.1.3, page 48. See #fluid_gen_type.
* 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
* any generator values set in the instruments played on the MIDI channel.
* See SoundFont 2.01 spec, paragraph 8.1.3, page 48 for details on SoundFont
* generator parameters and valid ranges.
*
* @note The old behaviour of fluid_synth_set_gen() assumed \c absolute and \c normalized to
* be FALSE.
*/
int
fluid_synth_set_gen(fluid_synth_t* synth, int chan, int param, float value)
fluid_synth_set_gen(fluid_synth_t* synth, int chan, int param,
float value, int absolute, int normalized)
{
float v;
fluid_return_val_if_fail (param >= 0 && param < GEN_LAST, FLUID_FAILED);
FLUID_API_ENTRY_CHAN(FLUID_FAILED);
fluid_synth_set_gen_LOCAL (synth, chan, param, value, FALSE);
v = normalized ? fluid_gen_scale(param, value) : value;
fluid_synth_set_gen_LOCAL (synth, chan, param, v, absolute);
FLUID_API_RETURN(FLUID_OK);
}
@ -4937,40 +4770,6 @@ fluid_synth_set_gen_LOCAL (fluid_synth_t* synth, int chan, int param, float valu
}
}
/**
* Set a SoundFont generator (effect) value on a MIDI channel in real-time.
* @param synth FluidSynth instance
* @param chan MIDI channel number (0 to MIDI channel count - 1)
* @param param SoundFont generator ID (#fluid_gen_type)
* @param value Offset or absolute generator value to assign to the MIDI channel
* @param absolute 0 to assign a relative value, non-zero to assign an absolute value
* @param normalized 0 if value is specified in the native units of the generator,
* non-zero 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 1.1.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
* any generator values set in the instruments played on the MIDI channel.
* See SoundFont 2.01 spec, paragraph 8.1.3, page 48 for details on SoundFont
* generator parameters and valid ranges.
*/
int
fluid_synth_set_gen2(fluid_synth_t* synth, int chan, int param,
float value, int absolute, int normalized)
{
float v;
fluid_return_val_if_fail (param >= 0 && param < GEN_LAST, FLUID_FAILED);
FLUID_API_ENTRY_CHAN(FLUID_FAILED);
v = normalized ? fluid_gen_scale(param, value) : value;
fluid_synth_set_gen_LOCAL (synth, chan, param, v, absolute);
FLUID_API_RETURN(FLUID_OK);
}
/**
* Get generator value assigned to a MIDI channel.
* @param synth FluidSynth instance
@ -5213,7 +5012,6 @@ void fluid_synth_api_exit(fluid_synth_t* synth)
}
/**
* Set midi channel type
* @param synth FluidSynth instance

View file

@ -116,7 +116,6 @@ struct _fluid_synth_t
int with_reverb; /**< Should the synth use the built-in reverb unit? */
int with_chorus; /**< Should the synth use the built-in chorus unit? */
int verbose; /**< Turn verbose mode on? */
int dump; /**< Dump events to stdout to hook up a user interface? */
double sample_rate; /**< The sample rate */
int midi_channels; /**< the number of MIDI channels (>= 16) */
int bank_select; /**< the style of Bank Select MIDI messages */
@ -174,13 +173,6 @@ struct _fluid_synth_t
#endif
};
int fluid_synth_setstr(fluid_synth_t* synth, const char* name, const char* str);
int fluid_synth_dupstr(fluid_synth_t* synth, const char* name, char** str);
int fluid_synth_setnum(fluid_synth_t* synth, const char* name, double val);
int fluid_synth_getnum(fluid_synth_t* synth, const char* name, double* val);
int fluid_synth_setint(fluid_synth_t* synth, const char* name, int val);
int fluid_synth_getint(fluid_synth_t* synth, const char* name, int* val);
fluid_preset_t* fluid_synth_find_preset(fluid_synth_t* synth,
unsigned int banknum,
unsigned int prognum);

View file

@ -1,3 +0,0 @@
## Process this file with automake to produce Makefile.in
EXTRA_DIST = fluidsynth.mcp README.txt

View file

@ -1,20 +0,0 @@
FluidSynth MacOS9 port
----------------------
Antoine Schmitt March 2003
1) Configuring
As Macintosh cannot run the configure shell command, you need to do it yourself. Mainly, this consists in:
- creating the include/fluidsynth/version.h file by hand, using the version.h.in file as a template, and defining the VERSION* defines by hand, using the values from the 'configure.ac' file.
Example:
#define FLUIDSYNTH_VERSION "1.0.0"
#define FLUIDSYNTH_VERSION_MAJOR 1
#define FLUIDSYNTH_VERSION_MINOR 0
#define FLUIDSYNTH_VERSION_MICRO 0
2) src/config_macos.h file
In this file, you can define which audio driver to use. Only the SoundManager driver has been tested (SNDMAN_SUPPORT). You can choose the PORTAUDIO driver.
3) Compiler, etc..
This project has been compiled with CodeWarrior 4.0 on MacOS9.2.2

Binary file not shown.

View file

@ -1,4 +0,0 @@
## Process this file with automake to produce Makefile.in
SUBDIRS = fluidsynth fluidsynth_dll fluidsynth_lib
EXTRA_DIST = fluidsynth.dsw fluidsynth.sln

View file

@ -1,3 +0,0 @@
## Process this file with automake to produce Makefile.in
EXTRA_DIST = fluidsynth.dsp fluidsynth.vcproj

View file

@ -1,3 +0,0 @@
## Process this file with automake to produce Makefile.in
EXTRA_DIST = fluidsynth_dll.dsp fluidsynth_dll.vcproj

View file

@ -1,3 +0,0 @@
## Process this file with automake to produce Makefile.in
EXTRA_DIST = fluidsynth_lib.dsp fluidsynth_lib.vcproj

File diff suppressed because it is too large Load diff

View file

@ -22,35 +22,26 @@
#ifndef _FLUID_SETTINGS_H
#define _FLUID_SETTINGS_H
/** returns 1 if the option was added, 0 otherwise */
int fluid_settings_add_option(fluid_settings_t* settings, const char* name, const char* s);
/** returns 1 if the option was added, 0 otherwise */
int fluid_settings_remove_option(fluid_settings_t* settings, const char* name, const char* s);
typedef int (*fluid_num_update_t)(void* data, const char* name, double value);
typedef int (*fluid_str_update_t)(void* data, const char* name, const char* value);
typedef int (*fluid_int_update_t)(void* data, const char* name, int value);
/** returns 0 if the value has been registered correctly, non-zero
otherwise */
int fluid_settings_register_str(fluid_settings_t* settings, const char* name, const char* def, int hints,
fluid_str_update_t fun, void* data);
fluid_str_update_t fun, void* data);
typedef int (*fluid_num_update_t)(void* data, const char* name, double value);
/** returns 0 if the value has been registered correctly, non-zero
otherwise */
int fluid_settings_register_num(fluid_settings_t* settings, const char* name, double def,
double min, double max, int hints,
fluid_num_update_t fun, void* data);
/** returns 0 if the value has been registered correctly, non-zero
otherwise */
typedef int (*fluid_int_update_t)(void* data, const char* name, int value);
int fluid_settings_register_int(fluid_settings_t* settings, const char* name, int def,
int min, int max, int hints,
fluid_int_update_t fun, void* data);
#endif /* _FLUID_SETTINGS_H */