View | Details | Raw Unified | Return to bug 233448 | Differences between
and this patch

Collapse All | Expand All

(-)audio/fluidsynth/Makefile (-15 / +9 lines)
Lines 2-11 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	fluidsynth
4
PORTNAME=	fluidsynth
5
PORTVERSION=	1.1.11
6
DISTVERSIONPREFIX=	v
5
DISTVERSIONPREFIX=	v
6
DISTVERSION=	2.0.3
7
CATEGORIES=	audio
7
CATEGORIES=	audio
8
8
9
PATCH_SITES=	https://github.com/${GH_ACCOUNT}/${PORTNAME}/commit/
10
PATCHFILES=	6ac6e5983f4169c7a418866319e5bde424d4434c.patch:-p1 \
11
		a92ba4528f0a848e355556010dcc9456b54cd705.patch:-p1
12
9
MAINTAINER=	multimedia@FreeBSD.org
13
MAINTAINER=	multimedia@FreeBSD.org
10
COMMENT=	Real-time software synthesizer based on the SoundFont 2 specifications
14
COMMENT=	Real-time software synthesizer based on the SoundFont 2 specifications
11
15
Lines 12-29 Link Here
12
LICENSE=	LGPL21
16
LICENSE=	LGPL21
13
LICENSE_FILE=	${WRKSRC}/LICENSE
17
LICENSE_FILE=	${WRKSRC}/LICENSE
14
18
15
GH_ACCOUNT=	FluidSynth
16
17
OPTIONS_DEFINE=	JACK ALSA DBUS LADSPA LASH PORTAUDIO PULSEAUDIO READLINE \
19
OPTIONS_DEFINE=	JACK ALSA DBUS LADSPA LASH PORTAUDIO PULSEAUDIO READLINE \
18
		SNDFILE SNDIO
20
		SNDFILE SNDIO
19
OPTIONS_DEFAULT=	JACK READLINE
21
OPTIONS_DEFAULT=	JACK READLINE
20
22
21
USES=		cmake pkgconfig tar:bzip2
23
USES=		cmake gnome pkgconfig
22
USE_GITHUB=	yes
24
USE_GITHUB=	yes
25
GH_ACCOUNT=	FluidSynth
23
USE_GNOME=	glib20
26
USE_GNOME=	glib20
24
USE_LDCONFIG=	yes
27
USE_LDCONFIG=	yes
25
CMAKE_ARGS=	-Denable-ladcca:BOOL=FALSE \
28
CMAKE_OFF=	enable-ladcca enable-midishare
26
		-Denable-midishare:BOOL=FALSE
27
LDFLAGS+=	-lpthread
29
LDFLAGS+=	-lpthread
28
30
29
JACK_LIB_DEPENDS=	libjack.so:audio/jack
31
JACK_LIB_DEPENDS=	libjack.so:audio/jack
Lines 59-71 Link Here
59
61
60
post-patch:
62
post-patch:
61
	${CP} ${FILESDIR}/fluid_sndio.c ${WRKSRC}/src/drivers/
63
	${CP} ${FILESDIR}/fluid_sndio.c ${WRKSRC}/src/drivers/
62
	@${REINPLACE_CMD} -e \
64
	
63
		'/Linux/s|^|#| ; \
64
		 /_init_lib_suffix/s|"64"|""| ; \
65
		 /CMAKE_C_FLAGS_RELEASE/s|-O2|| ; \
66
		 s|enable_midishare|enable-midishare| ; \
67
		 s|$${LIB_INSTALL_DIR}$${LIB_SUFFIX}/pkgconfig|$${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig|' ${WRKSRC}/CMakeLists.txt
68
	@${REINPLACE_CMD} -e \
69
		's|share/man|man|' ${WRKSRC}/cmake_admin/DefaultDirs.cmake
70
71
.include <bsd.port.mk>
65
.include <bsd.port.mk>
(-)audio/fluidsynth/distinfo (-3 / +7 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1527888754
1
TIMESTAMP = 1549176844
2
SHA256 (FluidSynth-fluidsynth-v1.1.11_GH0.tar.gz) = da8878ff374d12392eecf87e96bad8711b8e76a154c25a571dd8614d1af80de8
2
SHA256 (FluidSynth-fluidsynth-v2.0.3_GH0.tar.gz) = 12c7ede220f54a6e52a7e7b0b1729c04a4282685569adf18d932a7dd3c10e759
3
SIZE (FluidSynth-fluidsynth-v1.1.11_GH0.tar.gz) = 634566
3
SIZE (FluidSynth-fluidsynth-v2.0.3_GH0.tar.gz) = 1374835
4
SHA256 (6ac6e5983f4169c7a418866319e5bde424d4434c.patch) = fe87f16d9bcb3911e4bb3ac1810a89cea66466d81c9ae6683b17ee9a05878e30
5
SIZE (6ac6e5983f4169c7a418866319e5bde424d4434c.patch) = 3311
6
SHA256 (a92ba4528f0a848e355556010dcc9456b54cd705.patch) = bc0098e4e4e15a5da6f1c2d1a9ca4135ccd4f4fb630f2234e946a8456cd05792
7
SIZE (a92ba4528f0a848e355556010dcc9456b54cd705.patch) = 1787
(-)audio/fluidsynth/files/fluid_sndio.c (-15 / +15 lines)
Lines 66-72 Link Here
66
  fluid_midi_parser_t *parser;
66
  fluid_midi_parser_t *parser;
67
} fluid_sndio_midi_driver_t;
67
} fluid_sndio_midi_driver_t;
68
68
69
int delete_fluid_sndio_audio_driver(fluid_audio_driver_t* p);
69
//void delete_fluid_sndio_audio_driver(fluid_audio_driver_t* p);
70
70
71
/* local utilities */
71
/* local utilities */
72
static void* fluid_sndio_audio_run(void* d);
72
static void* fluid_sndio_audio_run(void* d);
Lines 76-82 Link Here
76
void
76
void
77
fluid_sndio_audio_driver_settings(fluid_settings_t* settings)
77
fluid_sndio_audio_driver_settings(fluid_settings_t* settings)
78
{
78
{
79
  fluid_settings_register_str(settings, "audio.sndio.device", "default", 0, NULL, NULL);
79
  fluid_settings_register_str(settings, "audio.sndio.device", "default", 0);
80
}
80
}
81
81
82
/*
82
/*
Lines 109-115 Link Here
109
  dev->data = NULL;
109
  dev->data = NULL;
110
  dev->cont = 1;
110
  dev->cont = 1;
111
111
112
  if (!fluid_settings_getstr(settings, "audio.sndio.device", &devname)) {
112
  if (!fluid_settings_dupstr(settings, "audio.sndio.device", &devname)) {
113
    devname = NULL;
113
    devname = NULL;
114
  }
114
  }
115
115
Lines 210-216 Link Here
210
  dev->data = data;
210
  dev->data = data;
211
  dev->cont = 1;
211
  dev->cont = 1;
212
212
213
  if (!fluid_settings_getstr(settings, "audio.sndio.device", &devname)) {
213
  if (!fluid_settings_dupstr(settings, "audio.sndio.device", &devname)) {
214
    devname = NULL;
214
    devname = NULL;
215
  }
215
  }
216
216
Lines 286-304 Link Here
286
/*
286
/*
287
 * delete_fluid_sndio_audio_driver
287
 * delete_fluid_sndio_audio_driver
288
 */
288
 */
289
int
289
void
290
delete_fluid_sndio_audio_driver(fluid_audio_driver_t* p)
290
delete_fluid_sndio_audio_driver(fluid_audio_driver_t* p)
291
{
291
{
292
  fluid_sndio_audio_driver_t* dev = (fluid_sndio_audio_driver_t*) p;
292
  fluid_sndio_audio_driver_t* dev = (fluid_sndio_audio_driver_t*) p;
293
293
294
  if (dev == NULL) {
294
  if (dev == NULL) {
295
    return FLUID_OK;
295
    return;
296
  }
296
  }
297
  dev->cont = 0;
297
  dev->cont = 0;
298
  if (dev->thread) {
298
  if (dev->thread) {
299
    if (pthread_join(dev->thread, NULL)) {
299
    if (pthread_join(dev->thread, NULL)) {
300
      FLUID_LOG(FLUID_ERR, "Failed to join the audio thread");
300
      FLUID_LOG(FLUID_ERR, "Failed to join the audio thread");
301
      return FLUID_FAILED;
301
      return;
302
    }
302
    }
303
  }
303
  }
304
  if (dev->hdl) {
304
  if (dev->hdl) {
Lines 308-314 Link Here
308
    FLUID_FREE(dev->buffer);
308
    FLUID_FREE(dev->buffer);
309
  }
309
  }
310
  FLUID_FREE(dev);
310
  FLUID_FREE(dev);
311
  return FLUID_OK;
311
  return;
312
}
312
}
313
313
314
/*
314
/*
Lines 372-381 Link Here
372
372
373
void fluid_sndio_midi_driver_settings(fluid_settings_t* settings)
373
void fluid_sndio_midi_driver_settings(fluid_settings_t* settings)
374
{
374
{
375
  fluid_settings_register_str(settings, "midi.sndio.device", "default", 0, NULL, NULL);
375
  fluid_settings_register_str(settings, "midi.sndio.device", "default", 0);
376
}
376
}
377
377
378
int
378
void
379
delete_fluid_sndio_midi_driver(fluid_midi_driver_t *addr)
379
delete_fluid_sndio_midi_driver(fluid_midi_driver_t *addr)
380
{
380
{
381
  int err;
381
  int err;
Lines 382-388 Link Here
382
  fluid_sndio_midi_driver_t *dev = (fluid_sndio_midi_driver_t *)addr;
382
  fluid_sndio_midi_driver_t *dev = (fluid_sndio_midi_driver_t *)addr;
383
383
384
  if (dev == NULL) {
384
  if (dev == NULL) {
385
    return FLUID_OK;
385
    return;
386
  }
386
  }
387
  dev->status = FLUID_MIDI_DONE;
387
  dev->status = FLUID_MIDI_DONE;
388
388
Lines 391-401 Link Here
391
    err = pthread_cancel(dev->thread);
391
    err = pthread_cancel(dev->thread);
392
    if (err) {
392
    if (err) {
393
      FLUID_LOG(FLUID_ERR, "Failed to cancel the midi thread");
393
      FLUID_LOG(FLUID_ERR, "Failed to cancel the midi thread");
394
      return FLUID_FAILED;
394
      return;
395
    }
395
    }
396
    if (pthread_join(dev->thread, NULL)) {
396
    if (pthread_join(dev->thread, NULL)) {
397
      FLUID_LOG(FLUID_ERR, "Failed to join the midi thread");
397
      FLUID_LOG(FLUID_ERR, "Failed to join the midi thread");
398
      return FLUID_FAILED;
398
      return;
399
    }
399
    }
400
  }
400
  }
401
  if (dev->hdl != NULL) {
401
  if (dev->hdl != NULL) {
Lines 405-411 Link Here
405
    delete_fluid_midi_parser(dev->parser);
405
    delete_fluid_midi_parser(dev->parser);
406
  }
406
  }
407
  FLUID_FREE(dev);
407
  FLUID_FREE(dev);
408
  return FLUID_OK;
408
  return;
409
}
409
}
410
410
411
void *
411
void *
Lines 493-499 Link Here
493
  }
493
  }
494
494
495
  /* get the device name. if none is specified, use the default device. */
495
  /* get the device name. if none is specified, use the default device. */
496
  if (!fluid_settings_getstr(settings, "midi.sndio.device", &device)) {
496
  if (!fluid_settings_dupstr(settings, "midi.sndio.device", &device)) {
497
	device = NULL;
497
	device = NULL;
498
  }
498
  }
499
499
(-)audio/fluidsynth/files/patch-CMakeLists.txt (-8 / +8 lines)
Lines 1-22 Link Here
1
--- CMakeLists.txt.orig	2018-05-06 07:05:11 UTC
1
--- CMakeLists.txt.orig	2019-02-03 07:13:31 UTC
2
+++ CMakeLists.txt
2
+++ CMakeLists.txt
3
@@ -68,6 +68,7 @@ option ( enable-midishare "compile MidiS
3
@@ -71,6 +71,7 @@ option ( enable-dsound "compile DirectSound support (i
4
 option ( enable-oss "compile OSS support (if it is available)" on )
4
 option ( enable-winmidi "compile Windows MIDI support (if it is available)" on )
5
 option ( enable-pkgconfig "use pkg-config to locate fluidsynth's (mostly optional) dependencies" on )
5
 option ( enable-pkgconfig "use pkg-config to locate fluidsynth's (mostly optional) dependencies" on )
6
 option ( enable-pulseaudio "compile PulseAudio support (if it is available)" on )
6
 option ( enable-pulseaudio "compile PulseAudio support (if it is available)" on )
7
+option ( enable-sndio "compile Sndio support (if it is available)" on )
7
+option ( enable-sndio "compile Sndio support (if it is available)" on )
8
 option ( enable-readline "compile readline lib line editing (if it is available)" on )
8
 option ( enable-readline "compile readline lib line editing (if it is available)" on )
9
 option ( enable-threads "enable multi-threading support (such as parallel voice synthesis)" on )
9
 
10
 
10
 # Platform specific options
11
@@ -481,6 +482,11 @@ else(NOT enable-pkgconfig)
11
@@ -358,6 +359,11 @@ else(NOT enable-pkgconfig)
12
     else ( enable-pulseaudio )
12
     unset_pkg_config ( PULSE )
13
     unset_pkg_config ( PULSE )
13
     endif ( enable-pulseaudio )
14
     endif ( enable-pulseaudio )
14
 
15
+
15
+    unset ( SNDIO_SUPPORT CACHE )
16
+    unset ( SNDIO_SUPPORT CACHE )
16
+    if ( enable-sndio )
17
+    if ( enable-sndio )
17
+      set ( SNDIO_SUPPORT 1 )
18
+      set ( SNDIO_SUPPORT 1 )
18
+    endif ( enable-sndio )
19
+    endif ( enable-sndio )
19
+
20
 
20
     unset ( ALSA_SUPPORT CACHE )
21
     unset ( ALSA_SUPPORT CACHE )
21
     if ( enable-alsa )
22
     if ( enable-alsa )
22
     pkg_check_modules ( ALSA alsa>=0.9.1 )
(-)audio/fluidsynth/files/patch-src_CMakeLists.txt (-8 / +8 lines)
Lines 1-7 Link Here
1
--- src/CMakeLists.txt.orig	2012-08-16 04:01:13 UTC
1
--- src/CMakeLists.txt.orig	2018-12-30 11:42:00 UTC
2
+++ src/CMakeLists.txt
2
+++ src/CMakeLists.txt
3
@@ -47,6 +47,11 @@ if ( PULSE_SUPPORT )
3
@@ -50,6 +50,11 @@ if ( PULSE_SUPPORT )
4
   include_directories ( ${PULSE_INCLUDEDIR} ${PULSE_INCLUDE_DIRS} )
4
   include_directories ( ${PULSE_INCLUDE_DIRS} )
5
 endif ( PULSE_SUPPORT )
5
 endif ( PULSE_SUPPORT )
6
 
6
 
7
+if ( SNDIO_SUPPORT )
7
+if ( SNDIO_SUPPORT )
Lines 11-26 Link Here
11
+
11
+
12
 if ( ALSA_SUPPORT )
12
 if ( ALSA_SUPPORT )
13
   set ( fluid_alsa_SOURCES drivers/fluid_alsa.c )
13
   set ( fluid_alsa_SOURCES drivers/fluid_alsa.c )
14
   include_directories ( ${ALSA_INCLUDEDIR} ${ALSA_INCLUDE_DIRS} )
14
   include_directories ( ${ALSA_INCLUDE_DIRS} )
15
@@ -244,6 +249,7 @@ add_library ( libfluidsynth
15
@@ -247,6 +252,7 @@ add_library ( libfluidsynth-OBJ OBJECT
16
     ${fluid_oss_SOURCES}
16
     ${fluid_oss_SOURCES}
17
     ${fluid_portaudio_SOURCES}
17
     ${fluid_portaudio_SOURCES}
18
     ${fluid_pulse_SOURCES}
18
     ${fluid_pulse_SOURCES}
19
+    ${fluid_sndio_SOURCES}
19
+    ${fluid_sndio_SOURCES}
20
     ${fluid_windows_SOURCES}
20
     ${fluid_dsound_SOURCES}
21
     ${fluid_winmidi_SOURCES}
21
     ${libfluidsynth_SOURCES}
22
     ${libfluidsynth_SOURCES}
22
     ${public_HEADERS}
23
@@ -314,6 +320,7 @@ target_link_libraries ( libfluidsynth
23
@@ -286,6 +292,7 @@ target_link_libraries ( libfluidsynth
24
     ${JACK_LIBRARIES}
24
     ${JACK_LIBRARIES}
25
     ${ALSA_LIBRARIES}
25
     ${ALSA_LIBRARIES}
26
     ${PULSE_LIBRARIES}
26
     ${PULSE_LIBRARIES}
(-)audio/fluidsynth/files/patch-src_bindings_fluid__rtkit.c (-39 lines)
Lines 1-39 Link Here
1
--- src/bindings/fluid_rtkit.c.orig	2012-08-16 04:01:13 UTC
2
+++ src/bindings/fluid_rtkit.c
3
@@ -34,7 +34,7 @@
4
 #include "fluid_rtkit.h"
5
 
6
 
7
-#if defined(__linux__) || defined(__APPLE__)
8
+#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__)
9
 
10
 #ifndef _GNU_SOURCE
11
 #define _GNU_SOURCE
12
@@ -44,12 +44,27 @@
13
 #include <string.h>
14
 #include <unistd.h>
15
 #include <sys/types.h>
16
+#include <sys/time.h>
17
 #include <sys/syscall.h>
18
 #include <sys/resource.h>
19
+#include <sys/param.h>
20
 
21
+#if defined(__FreeBSD__)
22
+#include <pthread_np.h>
23
+#endif
24
 
25
 static pid_t _gettid(void) {
26
+#if defined(__FreeBSD__)
27
+#if __FreeBSD__version > 900030
28
+        return pthread_getthreadid_np();
29
+#else
30
+        long tid;
31
+        syscall(SYS_thr_self, &tid);
32
+        return tid;	
33
+#endif
34
+#else
35
         return (pid_t) syscall(SYS_gettid);
36
+#endif
37
 }
38
 
39
 static int translate_error(const char *name) {
(-)audio/fluidsynth/files/patch-src_config.cmake (-4 / +4 lines)
Lines 1-8 Link Here
1
--- src/config.cmake.orig	2012-08-16 04:01:13 UTC
1
--- src/config.cmake.orig	2018-12-30 11:42:00 UTC
2
+++ src/config.cmake
2
+++ src/config.cmake
3
@@ -178,6 +178,9 @@
3
@@ -199,6 +199,9 @@
4
 /* Define to enable PulseAudio driver */
4
 /* Define to enable Windows MIDI driver */
5
 #cmakedefine PULSE_SUPPORT @PULSE_SUPPORT@
5
 #cmakedefine WINMIDI_SUPPORT @WINMIDI_SUPPORT@
6
 
6
 
7
+/* Define to enable Sndio driver */
7
+/* Define to enable Sndio driver */
8
+#cmakedefine SNDIO_SUPPORT @SNDIO_SUPPORT@
8
+#cmakedefine SNDIO_SUPPORT @SNDIO_SUPPORT@
(-)audio/fluidsynth/files/patch-src_drivers_fluid__adriver.c (-46 / +11 lines)
Lines 1-54 Link Here
1
--- src/drivers/fluid_adriver.c.orig	2018-05-06 07:05:11 UTC
1
--- src/drivers/fluid_adriver.c.orig	2018-12-30 11:42:00 UTC
2
+++ src/drivers/fluid_adriver.c
2
+++ src/drivers/fluid_adriver.c
3
@@ -64,6 +64,15 @@ int delete_fluid_oss_audio_driver(fluid_
3
@@ -39,6 +39,16 @@ struct _fluid_audriver_definition_t
4
 void fluid_oss_audio_driver_settings(fluid_settings_t* settings);
5
 #endif
6
 
7
+#if SNDIO_SUPPORT
8
+fluid_audio_driver_t* new_fluid_sndio_audio_driver(fluid_settings_t* settings,
9
+						   fluid_synth_t* synth);
10
+fluid_audio_driver_t* new_fluid_sndio_audio_driver2(fluid_settings_t* settings,
11
+						    fluid_audio_func_t func, void* data);
12
+int delete_fluid_sndio_audio_driver(fluid_audio_driver_t* p);
13
+void fluid_sndio_audio_driver_settings(fluid_settings_t* settings);
14
+#endif
15
+
16
 #if COREAUDIO_SUPPORT
17
 fluid_audio_driver_t* new_fluid_core_audio_driver(fluid_settings_t* settings,
18
 						  fluid_synth_t* synth);
19
@@ -122,6 +131,14 @@ int delete_fluid_file_audio_driver(fluid
20
 /* Available audio drivers, listed in order of preference */
4
 /* Available audio drivers, listed in order of preference */
21
 static const fluid_audriver_definition_t fluid_audio_drivers[] =
5
 static const fluid_audriver_definition_t fluid_audio_drivers[] =
22
 {
6
 {
23
+#if SNDIO_SUPPORT
7
+#if SNDIO_SUPPORT
24
+    { "sndio",
8
+    { 
25
+        new_fluid_sndio_audio_driver,
9
+       "sndio",
26
+        new_fluid_sndio_audio_driver2,
10
+       new_fluid_sndio_audio_driver,
27
+        delete_fluid_sndio_audio_driver,
11
+       new_fluid_sndio_audio_driver2,
28
+        fluid_sndio_audio_driver_settings },
12
+       delete_fluid_sndio_audio_driver,
13
+       fluid_sndio_audio_driver_settings
14
+    },
29
+#endif
15
+#endif
30
+
16
+
31
 #if JACK_SUPPORT
17
 #if JACK_SUPPORT
32
     { "jack",
18
     {
33
         new_fluid_jack_audio_driver,
19
         "jack",
34
@@ -238,7 +255,9 @@ void fluid_audio_driver_settings(fluid_s
35
                                FLUID_DEFAULT_AUDIO_RT_PRIO, 0, 99, 0, NULL, NULL);
36
 
37
   /* Set the default driver */
38
-#if JACK_SUPPORT
39
+#if SNDIO_SUPPORT
40
+  fluid_settings_register_str(settings, "audio.driver", "sndio", 0, NULL, NULL);
41
+#elif JACK_SUPPORT
42
   fluid_settings_register_str(settings, "audio.driver", "jack", 0, NULL, NULL);
43
 #elif ALSA_SUPPORT
44
   fluid_settings_register_str(settings, "audio.driver", "alsa", 0, NULL, NULL);
45
@@ -272,6 +291,9 @@ void fluid_audio_driver_settings(fluid_s
46
 #if OSS_SUPPORT
47
   fluid_settings_add_option(settings, "audio.driver", "oss");
48
 #endif
49
+#if SNDIO_SUPPORT
50
+  fluid_settings_add_option(settings, "audio.driver", "sndio");
51
+#endif
52
 #if COREAUDIO_SUPPORT
53
   fluid_settings_add_option(settings, "audio.driver", "coreaudio");
54
 #endif
(-)audio/fluidsynth/files/patch-src_drivers_fluid__adriver.h (+17 lines)
Line 0 Link Here
1
--- src/drivers/fluid_adriver.h.orig	2019-02-03 07:07:02 UTC
2
+++ src/drivers/fluid_adriver.h
3
@@ -90,6 +90,14 @@ fluid_audio_driver_t *new_fluid_portaudio_driver(fluid
4
 void delete_fluid_portaudio_driver(fluid_audio_driver_t *p);
5
 #endif
6
 
7
+#if SNDIO_SUPPORT
8
+fluid_audio_driver_t *new_fluid_sndio_audio_driver(fluid_settings_t *settings, fluid_synth_t *synth);
9
+fluid_audio_driver_t *new_fluid_sndio_audio_driver2(fluid_settings_t *settings,
10
+        fluid_audio_func_t func, void *data);
11
+void delete_fluid_sndio_audio_driver(fluid_audio_driver_t *p);
12
+void fluid_sndio_audio_driver_settings(fluid_settings_t *settings);
13
+#endif
14
+
15
 #if JACK_SUPPORT
16
 fluid_audio_driver_t *new_fluid_jack_audio_driver(fluid_settings_t *settings, fluid_synth_t *synth);
17
 fluid_audio_driver_t *new_fluid_jack_audio_driver2(fluid_settings_t *settings,
(-)audio/fluidsynth/files/patch-src_drivers_fluid__mdriver.c (-47 / +12 lines)
Lines 1-53 Link Here
1
$OpenBSD: patch-src_drivers_fluid_mdriver_c,v 1.1 2013/03/29 12:37:43 sthen Exp $
1
$OpenBSD: patch-src_drivers_fluid_mdriver_c,v 1.1 2013/03/29 12:37:43 sthen Exp $
2
--- src/drivers/fluid_mdriver.c.orig	2012-08-16 04:01:13 UTC
2
--- src/drivers/fluid_mdriver.c.orig	2018-12-30 11:42:00 UTC
3
+++ src/drivers/fluid_mdriver.c
3
+++ src/drivers/fluid_mdriver.c
4
@@ -46,6 +46,15 @@ fluid_midi_driver_t *new_fluid_jack_midi
4
@@ -52,6 +52,14 @@ static const fluid_mdriver_definition_t fluid_midi_dri
5
 int delete_fluid_jack_midi_driver(fluid_midi_driver_t *p);
5
         fluid_alsa_rawmidi_driver_settings
6
     },
6
 #endif
7
 #endif
7
 
8
+/* SNDIO */
9
+#if SNDIO_SUPPORT
8
+#if SNDIO_SUPPORT
10
+fluid_midi_driver_t* new_fluid_sndio_midi_driver(fluid_settings_t* settings,
9
+    {
11
+					     handle_midi_event_func_t handler,
10
+        "sndio",
12
+					     void* event_handler_data);
11
+        new_fluid_sndio_midi_driver,
13
+int delete_fluid_sndio_midi_driver(fluid_midi_driver_t* p);
12
+        delete_fluid_sndio_midi_driver,
14
+void fluid_sndio_midi_driver_settings(fluid_settings_t* settings);
13
+        fluid_sndio_midi_driver_settings
14
+    },
15
+#endif
15
+#endif
16
+
17
 /* OSS */
18
 #if OSS_SUPPORT
19
 fluid_midi_driver_t* new_fluid_oss_midi_driver(fluid_settings_t* settings,
20
@@ -96,6 +105,12 @@ struct fluid_mdriver_definition_t {
21
 
22
 
23
 struct fluid_mdriver_definition_t fluid_midi_drivers[] = {
24
+#if SNDIO_SUPPORT
25
+  { "sndio",
26
+    new_fluid_sndio_midi_driver,
27
+    delete_fluid_sndio_midi_driver,
28
+    fluid_sndio_midi_driver_settings },
29
+#endif
30
 #if JACK_SUPPORT
16
 #if JACK_SUPPORT
31
   { "jack",
17
     {
32
     new_fluid_jack_midi_driver,
18
         "jack",
33
@@ -149,7 +164,9 @@ void fluid_midi_driver_settings(fluid_se
34
                                FLUID_DEFAULT_MIDI_RT_PRIO, 0, 99, 0, NULL, NULL);
35
 
36
   /* Set the default driver */
37
-#if ALSA_SUPPORT
38
+#if SNDIO_SUPPORT
39
+  fluid_settings_register_str(settings, "midi.driver", "sndio", 0, NULL, NULL);
40
+#elif ALSA_SUPPORT
41
   fluid_settings_register_str(settings, "midi.driver", "alsa_seq", 0, NULL, NULL);
42
 #elif JACK_SUPPORT
43
   fluid_settings_register_str(settings, "midi.driver", "jack", 0, NULL, NULL);
44
@@ -170,6 +187,9 @@ void fluid_midi_driver_settings(fluid_se
45
   fluid_settings_add_option(settings, "midi.driver", "alsa_seq");
46
   fluid_settings_add_option(settings, "midi.driver", "alsa_raw");
47
 #endif
48
+#if SNDIO_SUPPORT
49
+  fluid_settings_add_option(settings, "midi.driver", "sndio");
50
+#endif
51
 #if JACK_SUPPORT
52
   fluid_settings_add_option(settings, "midi.driver", "jack");
53
 #endif
(-)audio/fluidsynth/files/patch-src_drivers_fluid__mdriver.h (+18 lines)
Line 0 Link Here
1
--- src/drivers/fluid_mdriver.h.orig	2019-02-03 07:13:59 UTC
2
+++ src/drivers/fluid_mdriver.h
3
@@ -53,6 +53,15 @@ void delete_fluid_alsa_seq_driver(fluid_midi_driver_t 
4
 void fluid_alsa_seq_driver_settings(fluid_settings_t *settings);
5
 #endif
6
 
7
+/* SNDIO */
8
+#if SNDIO_SUPPORT
9
+void fluid_sndio_midi_driver_settings(fluid_settings_t *settings);
10
+fluid_midi_driver_t *new_fluid_sndio_midi_driver(fluid_settings_t *settings,
11
+        handle_midi_event_func_t handler,
12
+        void *data);
13
+void delete_fluid_sndio_midi_driver(fluid_midi_driver_t *p);
14
+#endif
15
+
16
 /* JACK */
17
 #if JACK_SUPPORT
18
 void fluid_jack_midi_driver_settings(fluid_settings_t *settings);
(-)audio/fluidsynth/files/patch-src_drivers_fluid__oss.c (-15 lines)
Lines 1-15 Link Here
1
--- src/drivers/fluid_oss.c.orig	2018-05-06 07:05:11 UTC
2
+++ src/drivers/fluid_oss.c
3
@@ -45,9 +45,9 @@
4
 #define BUFFER_LENGTH 512
5
 
6
 // Build issue on some systems (OSS 4.0)?
7
-#if !defined(SOUND_PCM_WRITE_CHANNELS) && defined(SNDCTL_DSP_CHANNELS)
8
-  #define SOUND_PCM_WRITE_CHANNELS        SNDCTL_DSP_CHANNELS
9
-#endif
10
+// #if !defined(SOUND_PCM_WRITE_CHANNELS) && defined(SNDCTL_DSP_CHANNELS)
11
+//   #define SOUND_PCM_WRITE_CHANNELS        SNDCTL_DSP_CHANNELS
12
+// #endif
13
 
14
 /** fluid_oss_audio_driver_t
15
  *
(-)audio/fluidsynth/pkg-plist (-3 / +3 lines)
Lines 3-13 Link Here
3
include/fluidsynth/audio.h
3
include/fluidsynth/audio.h
4
include/fluidsynth/event.h
4
include/fluidsynth/event.h
5
include/fluidsynth/gen.h
5
include/fluidsynth/gen.h
6
include/fluidsynth/ladspa.h
6
include/fluidsynth/log.h
7
include/fluidsynth/log.h
7
include/fluidsynth/midi.h
8
include/fluidsynth/midi.h
8
include/fluidsynth/misc.h
9
include/fluidsynth/misc.h
9
include/fluidsynth/mod.h
10
include/fluidsynth/mod.h
10
include/fluidsynth/ramsfont.h
11
include/fluidsynth/seq.h
11
include/fluidsynth/seq.h
12
include/fluidsynth/seqbind.h
12
include/fluidsynth/seqbind.h
13
include/fluidsynth/settings.h
13
include/fluidsynth/settings.h
Lines 18-24 Link Here
18
include/fluidsynth/version.h
18
include/fluidsynth/version.h
19
include/fluidsynth/voice.h
19
include/fluidsynth/voice.h
20
lib/libfluidsynth.so
20
lib/libfluidsynth.so
21
lib/libfluidsynth.so.1
21
lib/libfluidsynth.so.2
22
lib/libfluidsynth.so.1.7.2
22
lib/libfluidsynth.so.2.1.0
23
libdata/pkgconfig/fluidsynth.pc
23
libdata/pkgconfig/fluidsynth.pc
24
man/man1/fluidsynth.1.gz
24
man/man1/fluidsynth.1.gz

Return to bug 233448