On Wed, Jan 18, 2012 at 9:11 PM, Jan Stary <[email protected]> wrote:

> This diff
> - fixes the glib runtime warnings,
> - fixes the glib segfault o start,
> - fixes the immediate segfault when reading router_* commands
>        in a config file (i.e., fixes my original problem).
>
> Thanks!
>
> Anyway, it introduces a new problem (and I don't know if
> it is a problem of the new fluisynth itself, or the port)
>
> $ fluidsynth -f /home/hans/.fluidsynthrc  /home/hans/soundbank/Fluid3_GM.sf2
> FluidSynth version 1.1.5
> Copyright (C) 2000-2011 Peter Hanappe and others.
> Distributed under the LGPL license.
> SoundFont(R) is a registered trademark of E-mu Systems, Inc.
>
> Type 'help' for help topics.
>
>> channels
> chan 0, Yamaha Grand Piano
> chan 1, Yamaha Grand Piano
> chan 2, Yamaha Grand Piano
> chan 3, Yamaha Grand Piano
> chan 4, Yamaha Grand Piano
> chan 5, Yamaha Grand Piano
> chan 6, Yamaha Grand Piano
> chan 7, Yamaha Grand Piano
> chan 8, Yamaha Grand Piano
> chan 9, Standard
> chan 10, Yamaha Grand Piano
> chan 11, Yamaha Grand Piano
> chan 12, Yamaha Grand Piano
> chan 13, Yamaha Grand Piano
> chan 14, Yamaha Grand Piano
> chan 15, Yamaha Grand Piano
>
>
> That is strange: there used to be clavinets etc.
> The SoundFont file hasn't changed of course,
> but now fluidsynth seems to only recognize
> the (default) Grand Piano sound in there.

I'm sorry, but I cannot help you with this specific problem. Try
opening a ticket upstream.

Btw, here's the *properly* fixed diff for this update to 1.1.5: anyone
caring to review it?

Note to myself: "--as-needed" is EVIL and hides itself very well.

ciao,
David
Index: Makefile
===================================================================
RCS file: /cvs/ports/audio/fluidsynth/Makefile,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile
--- Makefile	3 Jan 2012 07:03:54 -0000	1.14
+++ Makefile	18 Jan 2012 20:29:27 -0000
@@ -1,13 +1,12 @@
 # $OpenBSD: Makefile,v 1.14 2012/01/03 07:03:54 ajacoutot Exp $
 
 COMMENT =		SoundFont2 software synthesizer
-DISTNAME =		fluidsynth-1.0.9
-REVISION =		1
+DISTNAME =		fluidsynth-1.1.5
 
-SHARED_LIBS =		fluidsynth	0.1
+SHARED_LIBS =		fluidsynth	1.0
 
 CATEGORIES =		audio
-HOMEPAGE =		http://fluidsynth.resonance.org/trac
+HOMEPAGE =		http://www.fluidsynth.org/
 
 MAINTAINER =		Jacob Meuser <[email protected]>
 
@@ -17,11 +16,16 @@ PERMIT_PACKAGE_FTP =	Yes
 PERMIT_DISTFILES_CDROM = Yes
 PERMIT_DISTFILES_FTP =	Yes
 
-WANTLIB =		c jack m ncurses pthread readline sndio
+WANTLIB =		c glib-2.0 gthread-2.0 jack m ncurses \
+			pcre pthread readline sndfile sndio
 
-MASTER_SITES =		${MASTER_SITE_SAVANNAH:=fluid/}
+MASTER_SITES =		${MASTER_SITE_SOURCEFORGE:=fluidsynth/}
 
-LIB_DEPENDS =		audio/jack
+MODULES =		devel/gettext
+
+LIB_DEPENDS =		audio/jack \
+			devel/glib2 \
+			devel/pcre
 
 AUTOCONF_VERSION =	2.61
 AUTOMAKE_VERSION =	1.9
@@ -34,6 +38,7 @@ BUILD_DEPENDS +=        devel/libtool
 USE_LIBTOOL =		Yes
 CONFIGURE_STYLE =	gnu
 CONFIGURE_ARGS +=	${CONFIGURE_SHARED} \
+			--disable-dbus-support \
 			--disable-lash \
 			--disable-ladcca \
 			--disable-oss-support \
@@ -41,7 +46,7 @@ CONFIGURE_ARGS +=	${CONFIGURE_SHARED} \
 			--disable-pulse-support
 
 post-patch:
-	cp ${FILESDIR}/fluid_sndio.c ${WRKSRC}/src/
+	cp ${FILESDIR}/fluid_sndio.c ${WRKSRC}/src/drivers/
 
 pre-configure:
 	cd ${WRKSRC} && AUTOMAKE_VERSION=${AUTOMAKE_VERSION} \
Index: distinfo
===================================================================
RCS file: /cvs/ports/audio/fluidsynth/distinfo,v
retrieving revision 1.2
diff -u -p -r1.2 distinfo
--- distinfo	15 Oct 2009 15:44:50 -0000	1.2
+++ distinfo	18 Jan 2012 20:29:27 -0000
@@ -1,5 +1,5 @@
-MD5 (fluidsynth-1.0.9.tar.gz) = WEdVLglSj8kdyojxDLk5HA==
-RMD160 (fluidsynth-1.0.9.tar.gz) = B37LEwAO5Y68DPzeZTI6ehEo8eI=
-SHA1 (fluidsynth-1.0.9.tar.gz) = /tjc2KgWmB4eMKyIGKRZSetPWcA=
-SHA256 (fluidsynth-1.0.9.tar.gz) = Fxtrt1T7Y0LNAPkTn1hzvBt2TUos/nBAmq5ssfAabmA=
-SIZE (fluidsynth-1.0.9.tar.gz) = 927002
+MD5 (fluidsynth-1.1.5.tar.gz) = ZX5J5oKzFkMqRCHbsDE8Pg==
+RMD160 (fluidsynth-1.1.5.tar.gz) = +V9acJHO3i0Jkbq3+oCJ55klVE8=
+SHA1 (fluidsynth-1.1.5.tar.gz) = L5hpbKCmdXaE8KiBv5KzFJU2/fI=
+SHA256 (fluidsynth-1.1.5.tar.gz) = uBYLqMSCEWROlEluUfJElBkscR27d5u9FnlA8+xQqh8=
+SIZE (fluidsynth-1.1.5.tar.gz) = 932960
Index: patches/patch-configure_ac
===================================================================
RCS file: /cvs/ports/audio/fluidsynth/patches/patch-configure_ac,v
retrieving revision 1.2
diff -u -p -r1.2 patch-configure_ac
--- patches/patch-configure_ac	15 Oct 2009 15:44:50 -0000	1.2
+++ patches/patch-configure_ac	18 Jan 2012 20:29:27 -0000
@@ -1,39 +1,39 @@
 $OpenBSD: patch-configure_ac,v 1.2 2009/10/15 15:44:50 jakemsr Exp $
---- configure.ac.orig	Sat Apr 11 22:06:55 2009
-+++ configure.ac	Tue Oct 13 20:59:08 2009
-@@ -50,7 +50,8 @@ AM_PROG_LIBTOOL
+--- configure.ac.orig	Sun Sep  4 09:38:58 2011
++++ configure.ac	Wed Jan 18 21:08:51 2012
+@@ -49,9 +49,6 @@ AC_LIBTOOL_WIN32_DLL
+ AM_PROG_LIBTOOL
  AC_PROG_MAKE_SET
  
- dnl Check for libraries
+-dnl Check for libraries
 -AC_CHECK_LIB(pthread, pthread_create)
-+dnl AC_CHECK_LIB(pthread, pthread_create)
-+LIBS="$LIBS -pthread"
- 
+-
  dnl Check for header files
  AC_HEADER_STDC
-@@ -87,7 +88,7 @@ AC_SUBST(LIBFLUID_CPPFLAGS)
- AC_SUBST(LIBFLUID_LDFLAGS)
- AC_SUBST(FLUID_CPPFLAGS)
+ 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)
+@@ -94,7 +91,7 @@ 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")
 +AM_CONDITIONAL(MINGW32_SUPPORT, test "$mingw32_support" = "yes")
  
  AC_ARG_ENABLE(double, AS_HELP_STRING([--enable-double],
  	[double floating point for dsp (default=float)]),
-@@ -141,7 +142,7 @@ 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"
-   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 -Wno-unused -Winline"
-+  CFLAGS="${CFLAGS} ${FCCFLAGS} -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wstrict-prototypes -Wno-unused -Winline"
-   AC_DEFINE(DEBUG, 0, [Define to activate debugging message])
+@@ -150,7 +147,7 @@ if test "$GCC" = 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"
++    CFLAGS="${CFLAGS} ${FCCFLAGS} -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wstrict-prototypes -Wno-unused -Winline"
+     AC_DEFINE(DEBUG, 0, [Define to activate debugging message])
+   fi
  fi
- 
-@@ -228,7 +229,27 @@ dnl - Check support for OSS audio
+@@ -291,7 +288,27 @@ dnl - Check support for OSS audio
  AC_OSS_AUDIO
  AM_CONDITIONAL(OSS_SUPPORT, test "$OSS_SUPPORT" = "1")
  
-+dnl - Check for sndio support
++dnl - Check support for sndio support
 +AC_ARG_ENABLE(sndio-support, AS_HELP_STRING([--disable-sndio-support],
 +	[disable sndio support (default=auto)]),
 +  enable_sndio=$enableval, enable_sndio="yes")
@@ -57,16 +57,16 @@ $OpenBSD: patch-configure_ac,v 1.2 2009/
  dnl - Check support for MidiShare
  AC_MIDISHARE
  
-@@ -440,6 +461,12 @@ if test "${OSS_SUPPORT}" = "1"; then
+@@ -517,6 +534,12 @@ if test "${OSS_SUPPORT}" = "1"; then
    echo "OSS:                   yes"
  else 
    echo "OSS:                   no"
 +fi
 +
 +if test "${SNDIO_SUPPORT}" = "1"; then
-+  echo "sndio:                 yes"
++  echo "sndio:                   yes"
 +else 
-+  echo "sndio:                 no"
++  echo "sndio:                   no"
  fi
  
  if test "${MIDISHARE_SUPPORT}" = "1"; then
Index: patches/patch-src_Makefile_am
===================================================================
RCS file: /cvs/ports/audio/fluidsynth/patches/patch-src_Makefile_am,v
retrieving revision 1.2
diff -u -p -r1.2 patch-src_Makefile_am
--- patches/patch-src_Makefile_am	15 Oct 2009 15:44:50 -0000	1.2
+++ patches/patch-src_Makefile_am	18 Jan 2012 20:29:27 -0000
@@ -1,40 +1,47 @@
 $OpenBSD: patch-src_Makefile_am,v 1.2 2009/10/15 15:44:50 jakemsr Exp $
---- src/Makefile.am.orig	Tue Feb  3 23:34:02 2009
-+++ src/Makefile.am	Tue Oct 13 21:12:04 2009
-@@ -33,6 +33,10 @@ if OSS_SUPPORT
- fluid_oss = fluid_oss.c
+--- src/Makefile.am.orig	Sun Sep  4 09:38:58 2011
++++ src/Makefile.am	Wed Jan 18 21:09:10 2012
+@@ -40,6 +40,9 @@ if OSS_SUPPORT
+ fluid_oss = drivers/fluid_oss.c
  endif
  
 +if SNDIO_SUPPORT
-+fluid_sndio = fluid_sndio.c
++fluid_sndio = drivers/fluid_sndio.c
 +endif
-+
+ 
  # if LASH_SUPPORT || LADCCA_SUPPORT (Makefile supports OR?)
  if LASH_SUPPORT
- fluid_lash = fluid_lash.c
-@@ -49,7 +53,7 @@ endif
- # Extra files and optional drivers
- EXTRA_DIST = fluid_dll.c fluid_dsound.c fluid_winmidi.c fluid_portaudio.c \
- 	fluid_coreaudio.c fluid_alsa.c fluid_oss.c fluid_pulse.c \
--	fluid_dsp_simple.c \
-+	fluid_sndio.c fluid_dsp_simple.c \
- 	fluid_sndmgr.c config_macos.h config_macosx.h config_macosx_pb.h \
- 	config_win32.h fluid_jack.c fluid_dart.c
- 
-@@ -65,6 +69,7 @@ libfluidsynth_la_SOURCES = \
+@@ -68,6 +71,7 @@ EXTRA_DIST = fluid_dll.c \
+     drivers/fluid_oss.c \
+     drivers/fluid_portaudio.c \
+     drivers/fluid_pulse.c \
++    drivers/fluid_sndio.c \
+     drivers/fluid_sndmgr.c \
+     drivers/fluid_winmidi.c \
+     config_macos.h \
+@@ -93,6 +97,7 @@ libfluidsynth_la_SOURCES = \
  	$(fluid_oss) \
  	$(fluid_portaudio) \
  	$(fluid_pulse) \
 +	$(fluid_sndio) \
  	$(fluid_windows) \
  	$(fluid_dart) \
- 	fluid_adriver.c \
-@@ -129,7 +134,7 @@ INCLUDES = -I$(top_srcdir)/include $(LASH_CFLAGS) $(LA
- 
+ 	$(fluid_rtkit) \
+@@ -181,7 +186,7 @@ INCLUDES = -I$(top_srcdir)/include \
  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)
-+  $(ALSA_LIBS) $(PULSE_LIBS) $(PORTAUDIO_LIBS) $(DART_LIBS) $(SNDIO_LIBS)
+   $(ALSA_LIBS) $(PULSE_LIBS) $(PORTAUDIO_LIBS) $(DART_LIBS)  \
+-  $(GLIB_LIBS) $(LIBSNDFILE_LIBS) $(DBUS_LIBS)
++  $(GLIB_LIBS) $(LIBSNDFILE_LIBS) $(DBUS_LIBS) $(SNDIO_LIBS)
  
  libfluidsynth_la_LDFLAGS = \
  	-version-info @LT_VERSION_INFO@ \
+@@ -192,8 +197,4 @@ 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
+ 
Index: patches/patch-src_drivers_fluid_adriver_c
===================================================================
RCS file: patches/patch-src_drivers_fluid_adriver_c
diff -N patches/patch-src_drivers_fluid_adriver_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_drivers_fluid_adriver_c	18 Jan 2012 20:29:27 -0000
@@ -0,0 +1,54 @@
+$OpenBSD: patch-src_fluid_adriver_c,v 1.3 2009/12/24 10:34:43 jakemsr Exp $
+--- src/drivers/fluid_adriver.c.orig	Sun Sep  4 09:38:58 2011
++++ src/drivers/fluid_adriver.c	Mon Jan 16 09:24:52 2012
+@@ -64,6 +64,15 @@ int delete_fluid_oss_audio_driver(fluid_audio_driver_t
+ void fluid_oss_audio_driver_settings(fluid_settings_t* settings);
+ #endif
+ 
++#if SNDIO_SUPPORT
++fluid_audio_driver_t* new_fluid_sndio_audio_driver(fluid_settings_t* settings,
++						 fluid_synth_t* synth);
++fluid_audio_driver_t* new_fluid_sndio_audio_driver2(fluid_settings_t* settings,
++						fluid_audio_func_t func, void* data);
++int delete_fluid_sndio_audio_driver(fluid_audio_driver_t* p);
++void fluid_sndio_audio_driver_settings(fluid_settings_t* settings);
++#endif
++
+ #if COREAUDIO_SUPPORT
+ fluid_audio_driver_t* new_fluid_core_audio_driver(fluid_settings_t* settings,
+ 						  fluid_synth_t* synth);
+@@ -120,6 +129,13 @@ int delete_fluid_file_audio_driver(fluid_audio_driver_
+ 
+ /* Available audio drivers, listed in order of preference */
+ fluid_audriver_definition_t fluid_audio_drivers[] = {
++#if SNDIO_SUPPORT
++  { "sndio",
++    new_fluid_sndio_audio_driver,
++    new_fluid_sndio_audio_driver2,
++    delete_fluid_sndio_audio_driver,
++    fluid_sndio_audio_driver_settings },
++#endif
+ #if JACK_SUPPORT
+   { "jack",
+     new_fluid_jack_audio_driver,
+@@ -223,7 +239,9 @@ void fluid_audio_driver_settings(fluid_settings_t* set
+                                FLUID_DEFAULT_AUDIO_RT_PRIO, 0, 99, 0, NULL, NULL);
+ 
+   /* Set the default driver */
+-#if JACK_SUPPORT
++#if SNDIO_SUPPORT
++  fluid_settings_register_str(settings, "audio.driver", "sndio", 0, NULL, NULL);
++#elif JACK_SUPPORT
+   fluid_settings_register_str(settings, "audio.driver", "jack", 0, NULL, NULL);
+ #elif ALSA_SUPPORT
+   fluid_settings_register_str(settings, "audio.driver", "alsa", 0, NULL, NULL);
+@@ -256,6 +274,9 @@ void fluid_audio_driver_settings(fluid_settings_t* set
+ #endif
+ #if OSS_SUPPORT
+   fluid_settings_add_option(settings, "audio.driver", "oss");
++#endif
++#if SNDIO_SUPPORT
++  fluid_settings_add_option(settings, "audio.driver", "sndio");
+ #endif
+ #if COREAUDIO_SUPPORT
+   fluid_settings_add_option(settings, "audio.driver", "coreaudio");
Index: patches/patch-src_drivers_fluid_jack_c
===================================================================
RCS file: patches/patch-src_drivers_fluid_jack_c
diff -N patches/patch-src_drivers_fluid_jack_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_drivers_fluid_jack_c	18 Jan 2012 20:29:27 -0000
@@ -0,0 +1,21 @@
+$OpenBSD: patch-src_fluid_jack_c,v 1.2 2009/10/15 15:44:50 jakemsr Exp $
+--- src/drivers/fluid_jack.c.orig	Sun Sep  4 09:38:58 2011
++++ src/drivers/fluid_jack.c	Mon Jan 16 09:59:11 2012
+@@ -101,7 +101,7 @@ fluid_jack_audio_driver_settings(fluid_settings_t* set
+ {
+   fluid_settings_register_str(settings, "audio.jack.id", "fluidsynth", 0, NULL, NULL);
+   fluid_settings_register_int(settings, "audio.jack.multi", 0, 0, 1, FLUID_HINT_TOGGLED, NULL, NULL);
+-  fluid_settings_register_int(settings, "audio.jack.autoconnect", 0, 0, 1, FLUID_HINT_TOGGLED, NULL, NULL);
++  fluid_settings_register_int(settings, "audio.jack.autoconnect", 1, 0, 1, FLUID_HINT_TOGGLED, NULL, NULL);
+   fluid_settings_register_str(settings, "audio.jack.server", "", 0, NULL, NULL);
+ }
+ 
+@@ -433,7 +433,7 @@ new_fluid_jack_audio_driver2(fluid_settings_t* setting
+         }
+       }
+ 
+-      jack_free (jack_ports);  /* free jack ports array (not the port values!) */
++      free (jack_ports);  /* free jack ports array (not the port values!) */
+     } else {
+       FLUID_LOG(FLUID_WARN, "Could not connect to any physical jack ports; fluidsynth is unconnected");
+     }
Index: patches/patch-src_drivers_fluid_mdriver_c
===================================================================
RCS file: patches/patch-src_drivers_fluid_mdriver_c
diff -N patches/patch-src_drivers_fluid_mdriver_c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_drivers_fluid_mdriver_c	18 Jan 2012 20:29:27 -0000
@@ -0,0 +1,52 @@
+--- src/drivers/fluid_mdriver.c.orig	Sun Sep  4 09:38:58 2011
++++ src/drivers/fluid_mdriver.c	Mon Jan 16 09:24:52 2012
+@@ -46,6 +46,15 @@ fluid_midi_driver_t *new_fluid_jack_midi_driver (fluid
+ int delete_fluid_jack_midi_driver(fluid_midi_driver_t *p);
+ #endif
+ 
++/* SNDIO */
++#if SNDIO_SUPPORT
++fluid_midi_driver_t* new_fluid_sndio_midi_driver(fluid_settings_t* settings,
++					     handle_midi_event_func_t handler,
++					     void* event_handler_data);
++int delete_fluid_sndio_midi_driver(fluid_midi_driver_t* p);
++void fluid_sndio_midi_driver_settings(fluid_settings_t* settings);
++#endif
++
+ /* OSS */
+ #if OSS_SUPPORT
+ fluid_midi_driver_t* new_fluid_oss_midi_driver(fluid_settings_t* settings,
+@@ -96,6 +105,12 @@ struct fluid_mdriver_definition_t {
+ 
+ 
+ struct fluid_mdriver_definition_t fluid_midi_drivers[] = {
++#if SNDIO_SUPPORT
++  { "sndio",
++    new_fluid_sndio_midi_driver,
++    delete_fluid_sndio_midi_driver,
++    fluid_sndio_midi_driver_settings },
++#endif
+ #if JACK_SUPPORT
+   { "jack",
+     new_fluid_jack_midi_driver,
+@@ -149,7 +164,9 @@ void fluid_midi_driver_settings(fluid_settings_t* sett
+                                FLUID_DEFAULT_MIDI_RT_PRIO, 0, 99, 0, NULL, NULL);
+ 
+   /* Set the default driver */
+-#if ALSA_SUPPORT
++#if SNDIO_SUPPORT
++  fluid_settings_register_str(settings, "midi.driver", "sndio", 0, NULL, NULL);
++#elif ALSA_SUPPORT
+   fluid_settings_register_str(settings, "midi.driver", "alsa_seq", 0, NULL, NULL);
+ #elif JACK_SUPPORT
+   fluid_settings_register_str(settings, "midi.driver", "jack", 0, NULL, NULL);
+@@ -169,6 +186,9 @@ void fluid_midi_driver_settings(fluid_settings_t* sett
+ #if ALSA_SUPPORT
+   fluid_settings_add_option(settings, "midi.driver", "alsa_seq");
+   fluid_settings_add_option(settings, "midi.driver", "alsa_raw");
++#endif
++#if SNDIO_SUPPORT
++  fluid_settings_add_option(settings, "midi.driver", "sndio");
+ #endif
+ #if JACK_SUPPORT
+   fluid_settings_add_option(settings, "midi.driver", "jack");
Index: patches/patch-src_fluid_adriver_c
===================================================================
RCS file: patches/patch-src_fluid_adriver_c
diff -N patches/patch-src_fluid_adriver_c
--- patches/patch-src_fluid_adriver_c	24 Dec 2009 10:34:43 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,54 +0,0 @@
-$OpenBSD: patch-src_fluid_adriver_c,v 1.3 2009/12/24 10:34:43 jakemsr Exp $
---- src/fluid_adriver.c.orig	Sun Mar 15 18:02:15 2009
-+++ src/fluid_adriver.c	Wed Dec 23 01:31:00 2009
-@@ -64,6 +64,15 @@ int delete_fluid_oss_audio_driver(fluid_audio_driver_t
- void fluid_oss_audio_driver_settings(fluid_settings_t* settings);
- #endif
- 
-+#if SNDIO_SUPPORT
-+fluid_audio_driver_t* new_fluid_sndio_audio_driver(fluid_settings_t* settings,
-+						 fluid_synth_t* synth);
-+fluid_audio_driver_t* new_fluid_sndio_audio_driver2(fluid_settings_t* settings,
-+						fluid_audio_func_t func, void* data);
-+int delete_fluid_sndio_audio_driver(fluid_audio_driver_t* p);
-+void fluid_sndio_audio_driver_settings(fluid_settings_t* settings);
-+#endif
-+
- #if COREAUDIO_SUPPORT
- fluid_audio_driver_t* new_fluid_core_audio_driver(fluid_settings_t* settings,
- 						  fluid_synth_t* synth);
-@@ -122,6 +131,13 @@ void fluid_file_audio_driver_settings(fluid_settings_t
- 
- /* Available audio drivers, listed in order of preference */
- fluid_audriver_definition_t fluid_audio_drivers[] = {
-+#if SNDIO_SUPPORT
-+  { "sndio",
-+    new_fluid_sndio_audio_driver,
-+    new_fluid_sndio_audio_driver2,
-+    delete_fluid_sndio_audio_driver,
-+    fluid_sndio_audio_driver_settings },
-+#endif
- #if JACK_SUPPORT
-   { "jack",
-     new_fluid_jack_audio_driver,
-@@ -222,7 +238,9 @@ void fluid_audio_driver_settings(fluid_settings_t* set
- #endif
- 
-   /* Set the default driver */
--#if JACK_SUPPORT
-+#if SNDIO_SUPPORT
-+  fluid_settings_register_str(settings, "audio.driver", "sndio", 0, NULL, NULL);
-+#elif JACK_SUPPORT
-   fluid_settings_register_str(settings, "audio.driver", "jack", 0, NULL, NULL);
- #elif ALSA_SUPPORT
-   fluid_settings_register_str(settings, "audio.driver", "alsa", 0, NULL, NULL);
-@@ -255,6 +273,9 @@ void fluid_audio_driver_settings(fluid_settings_t* set
- #endif
- #if OSS_SUPPORT
-   fluid_settings_add_option(settings, "audio.driver", "oss");
-+#endif
-+#if SNDIO_SUPPORT
-+  fluid_settings_add_option(settings, "audio.driver", "sndio");
- #endif
- #if COREAUDIO_SUPPORT
-   fluid_settings_add_option(settings, "audio.driver", "coreaudio");
Index: patches/patch-src_fluid_jack_c
===================================================================
RCS file: patches/patch-src_fluid_jack_c
diff -N patches/patch-src_fluid_jack_c
--- patches/patch-src_fluid_jack_c	15 Oct 2009 15:44:50 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-src_fluid_jack_c,v 1.2 2009/10/15 15:44:50 jakemsr Exp $
---- src/fluid_jack.c.orig	Sun Mar  8 22:43:14 2009
-+++ src/fluid_jack.c	Tue Oct 13 20:47:41 2009
-@@ -90,7 +90,7 @@ fluid_jack_audio_driver_settings(fluid_settings_t* set
- {
-   fluid_settings_register_str(settings, "audio.jack.id", "fluidsynth", 0, NULL, NULL);
-   fluid_settings_register_str(settings, "audio.jack.multi", "no", 0, NULL, NULL);
--  fluid_settings_register_int(settings, "audio.jack.autoconnect", 0, 0, 1, FLUID_HINT_TOGGLED, NULL, NULL);
-+  fluid_settings_register_int(settings, "audio.jack.autoconnect", 1, 0, 1, FLUID_HINT_TOGGLED, NULL, NULL);
- }
- 
- 
Index: patches/patch-src_fluid_mdriver_c
===================================================================
RCS file: patches/patch-src_fluid_mdriver_c
diff -N patches/patch-src_fluid_mdriver_c
--- patches/patch-src_fluid_mdriver_c	24 Dec 2009 10:34:43 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,52 +0,0 @@
---- src/fluid_mdriver.c.orig	Sun Mar  8 21:31:02 2009
-+++ src/fluid_mdriver.c	Wed Dec 23 01:32:21 2009
-@@ -46,6 +46,15 @@ fluid_midi_driver_t *new_fluid_jack_midi_driver (fluid
- int delete_fluid_jack_midi_driver(fluid_midi_driver_t *p);
- #endif
- 
-+/* SNDIO */
-+#if SNDIO_SUPPORT
-+fluid_midi_driver_t* new_fluid_sndio_midi_driver(fluid_settings_t* settings,
-+					     handle_midi_event_func_t handler,
-+					     void* event_handler_data);
-+int delete_fluid_sndio_midi_driver(fluid_midi_driver_t* p);
-+void fluid_sndio_midi_driver_settings(fluid_settings_t* settings);
-+#endif
-+
- /* OSS */
- #if OSS_SUPPORT
- fluid_midi_driver_t* new_fluid_oss_midi_driver(fluid_settings_t* settings,
-@@ -96,6 +105,12 @@ struct fluid_mdriver_definition_t {
- 
- 
- struct fluid_mdriver_definition_t fluid_midi_drivers[] = {
-+#if SNDIO_SUPPORT
-+  { "sndio",
-+    new_fluid_sndio_midi_driver,
-+    delete_fluid_sndio_midi_driver,
-+    fluid_sndio_midi_driver_settings },
-+#endif
- #if JACK_SUPPORT
-   { "jack",
-     new_fluid_jack_midi_driver,
-@@ -146,7 +161,9 @@ void fluid_midi_driver_settings(fluid_settings_t* sett
-   int i;
- 
-   /* Set the default driver */
--#if ALSA_SUPPORT
-+#if SNDIO_SUPPORT
-+  fluid_settings_register_str(settings, "midi.driver", "sndio", 0, NULL, NULL);
-+#elif ALSA_SUPPORT
-   fluid_settings_register_str(settings, "midi.driver", "alsa_seq", 0, NULL, NULL);
- #elif JACK_SUPPORT
-   fluid_settings_register_str(settings, "midi.driver", "jack", 0, NULL, NULL);
-@@ -166,6 +183,9 @@ void fluid_midi_driver_settings(fluid_settings_t* sett
- #if ALSA_SUPPORT
-   fluid_settings_add_option(settings, "midi.driver", "alsa_seq");
-   fluid_settings_add_option(settings, "midi.driver", "alsa_raw");
-+#endif
-+#if SNDIO_SUPPORT
-+  fluid_settings_add_option(settings, "midi.driver", "sndio");
- #endif
- #if JACK_SUPPORT
-   fluid_settings_add_option(settings, "midi.driver", "jack");
Index: patches/patch-src_fluid_sys_c
===================================================================
RCS file: patches/patch-src_fluid_sys_c
diff -N patches/patch-src_fluid_sys_c
--- patches/patch-src_fluid_sys_c	15 Oct 2009 15:44:50 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,30 +0,0 @@
-$OpenBSD: patch-src_fluid_sys_c,v 1.2 2009/10/15 15:44:50 jakemsr Exp $
---- src/fluid_sys.c.orig	Tue Feb  3 23:29:24 2009
-+++ src/fluid_sys.c	Tue Oct 13 20:47:41 2009
-@@ -889,8 +889,10 @@ new_fluid_timer(int msec, fluid_timer_callback_t callb
- {
-   pthread_attr_t *attr = NULL;
-   pthread_attr_t rt_attr;
-+#if !defined(__OpenBSD__)
-   int sched = SCHED_FIFO;
-   struct sched_param priority;
-+#endif
-   int err;
- 
-   fluid_timer_t* timer = FLUID_NEW(fluid_timer_t);
-@@ -906,6 +908,7 @@ new_fluid_timer(int msec, fluid_timer_callback_t callb
-   timer->auto_destroy = auto_destroy;
- 
-   err = pthread_attr_init(&rt_attr);
-+#if !defined(__OpenBSD__)
-   if (err == 0) {
- 	  err = pthread_attr_setschedpolicy(&rt_attr, SCHED_FIFO);
- 	  if (err == 0) {
-@@ -916,6 +919,7 @@ new_fluid_timer(int msec, fluid_timer_callback_t callb
- 		  }
- 	  }
-   }
-+#endif
- 
-   if (new_thread) {
- 	  err = pthread_create(&timer->thread, attr, fluid_timer_start, (void*) timer);
Index: patches/patch-src_fluidsynth_c
===================================================================
RCS file: /cvs/ports/audio/fluidsynth/patches/patch-src_fluidsynth_c,v
retrieving revision 1.2
diff -u -p -r1.2 patch-src_fluidsynth_c
--- patches/patch-src_fluidsynth_c	15 Oct 2009 15:44:50 -0000	1.2
+++ patches/patch-src_fluidsynth_c	18 Jan 2012 20:29:27 -0000
@@ -1,18 +1,18 @@
 $OpenBSD: patch-src_fluidsynth_c,v 1.2 2009/10/15 15:44:50 jakemsr Exp $
---- src/fluidsynth.c.orig	Tue Feb  3 23:45:02 2009
-+++ src/fluidsynth.c	Tue Oct 13 20:57:00 2009
-@@ -212,9 +212,9 @@ int main(int argc, char** argv)
-   int audio_channels = 0;
+--- src/fluidsynth.c.orig	Sun Sep  4 09:38:58 2011
++++ src/fluidsynth.c	Mon Jan 16 09:34:16 2012
+@@ -293,9 +293,9 @@ int main(int argc, char** argv)
    int with_server = 0;
    int dump = 0;
+   int fast_render = 0;
 -  int connect_lash = 1;
-   char *optchars = "a:C:c:df:G:g:hijK:L:lm:no:p:R:r:sVvz:";
+   char *optchars = "a:C:c:dE:f:F:G:g:hijK:L:lm:nO:o:p:R:r:sT:Vvz:";
  #ifdef LASH_ENABLED
 +  int connect_lash = 1;
    int enabled_lash = 0;		/* set to TRUE if lash gets enabled */
    fluid_lash_args_t *lash_args;
  
-@@ -237,7 +237,9 @@ int main(int argc, char** argv)
+@@ -323,7 +323,9 @@ int main(int argc, char** argv)
        {"audio-groups", 1, 0, 'G'},
        {"chorus", 1, 0, 'C'},
        {"connect-jack-outputs", 0, 0, 'j'},
@@ -20,9 +20,9 @@ $OpenBSD: patch-src_fluidsynth_c,v 1.2 2
        {"disable-lash", 0, 0, 'l'},
 +#endif
        {"dump", 0, 0, 'd'},
+       {"fast-render", 1, 0, 'F'},
        {"gain", 1, 0, 'g'},
-       {"help", 0, 0, 'h'},
-@@ -344,9 +346,11 @@ int main(int argc, char** argv)
+@@ -458,9 +460,11 @@ int main(int argc, char** argv)
        audio_channels = atoi(optarg);
        fluid_settings_setint(settings, "synth.audio-channels", audio_channels);
        break;
@@ -32,20 +32,5 @@ $OpenBSD: patch-src_fluidsynth_c,v 1.2 2
        break;
 +#endif
      case 'm':
-       fluid_settings_setstr(settings, "midi.driver", optarg);
-       break;
-@@ -421,12 +425,14 @@ int main(int argc, char** argv)
- #endif
- 
- #ifdef LASH_ENABLED
-+#ifdef LASH_ENABLED
-   /* connect to the lash server */
-   if (connect_lash)
-     {
-       enabled_lash = fluid_lash_connect (lash_args);
-       fluid_settings_setint (settings, "lash.enable", enabled_lash ? 1 : 0);
-     }
-+#endif
- #endif
- 
-   /* The 'groups' setting is only relevant for LADSPA operation
+       if (FLUID_STRCMP (optarg, "help") == 0)
+       {
  • fluidsynth-1.1.5 (Was Re: fluidsynth segfaults when loading th... David Coppa

Reply via email to