#[macro_export]
macro_rules! plugin_entry {
($plugin_type:ty) => {
#[doc(hidden)]
static __TYMPAN_LADSPA_BUNDLE: ::std::sync::OnceLock<
$crate::descriptor::DescriptorBundle<$plugin_type>,
> = ::std::sync::OnceLock::new();
#[doc(hidden)]
fn __tympan_ladspa_bundle() -> &'static $crate::descriptor::DescriptorBundle<$plugin_type> {
__TYMPAN_LADSPA_BUNDLE.get_or_init(|| {
$crate::descriptor::DescriptorBundle::<$plugin_type>::build(
$crate::descriptor::Callbacks {
instantiate: $crate::entry::instantiate_shim::<$plugin_type>,
connect_port: $crate::entry::connect_port_shim::<$plugin_type>,
run: $crate::entry::run_shim::<$plugin_type>,
cleanup: $crate::entry::cleanup_shim::<$plugin_type>,
activate: ::core::option::Option::Some(
$crate::entry::activate_shim::<$plugin_type>,
),
deactivate: ::core::option::Option::Some(
$crate::entry::deactivate_shim::<$plugin_type>,
),
},
)
})
}
#[no_mangle]
pub unsafe extern "C" fn ladspa_descriptor(
index: ::core::ffi::c_ulong,
) -> *const $crate::raw::Descriptor {
if index == 0 {
__tympan_ladspa_bundle().descriptor_ptr()
} else {
::core::ptr::null()
}
}
};
}