$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");