Skip to content

Instantly share code, notes, and snippets.

@badosu
Created March 6, 2015 04:27
Show Gist options
  • Save badosu/465d5b025c159a533af6 to your computer and use it in GitHub Desktop.
Save badosu/465d5b025c159a533af6 to your computer and use it in GitHub Desktop.
#![crate_type = "lib"]
#![crate_name = "ssh"]
extern crate libc;
use std::mem;
/*
struct _LV2_Feature
(const char *) URI
(void *) data
*/
#[repr(C)]
pub struct _LV2_Feature {
URI: *const libc::c_char,
data: *mut libc::c_void,
}
/*
struct _LV2_Descriptor
(const char *) URI
(LV2_Handle (*)(const struct _LV2_Descriptor *, double, const char *, const LV2_Feature *const *)) instantiate [void *(*)(const struct _LV2_Descriptor *, double, const char *, const struct _LV2_Feature *const *)]
(void (*)(LV2_Handle, uint32_t, void *)) connect_port [void (*)(void *, unsigned int, void *)]
(void (*)(LV2_Handle)) activate [void (*)(void *)]
(void (*)(LV2_Handle, uint32_t)) run [void (*)(void *, unsigned int)]
(void (*)(LV2_Handle)) deactivate [void (*)(void *)]
(void (*)(LV2_Handle)) cleanup [void (*)(void *)]
(const void *(*)(const char *)) extension_data [const void *(*)(const char *)]
*/
#[repr(C)]
pub struct _LV2_Descriptor {
URI: *const libc::c_char,
instantiate: Option<extern fn(*const _LV2_Descriptor, libc::c_double, *const libc::c_char, *const *const _LV2_Feature) -> *mut libc::c_void>,
connect_port: Option<extern fn(*mut libc::c_void, libc::c_uint, *mut libc::c_void)>,
activate: Option<extern fn(*mut libc::c_void)>,
run: Option<extern fn(*mut libc::c_void, libc::c_uint)>,
deactivate: Option<extern fn(*mut libc::c_void)>,
cleanup: Option<extern fn(*mut libc::c_void)>,
extension_data: Option<extern fn(*const libc::c_char) -> *const libc::c_void>,
}
/*
struct
(LV2_Lib_Handle) handle [void *]
(uint32_t) size [unsigned int]
(void (*)(LV2_Lib_Handle)) cleanup [void (*)(void *)]
(const LV2_Descriptor *(*)(LV2_Lib_Handle, uint32_t)) get_plugin [const struct _LV2_Descriptor *(*)(void *, unsigned int)]
*/
#[repr(C)]
pub struct {
handle: *mut libc::c_void,
size: libc::c_uint,
cleanup: Option<extern fn(*mut libc::c_void)>,
get_plugin: Option<extern fn(*mut libc::c_void, libc::c_uint) -> *const _LV2_Descriptor>,
}
/*
const LV2_Descriptor * lv2_descriptor() [const struct _LV2_Descriptor *]
(uint32_t) index [unsigned int]
*/
#[link(name="./lv2.h")]
extern "C" {
pub fn lv2_descriptor(index: libc::c_uint) -> *const _LV2_Descriptor;
}
/*
const LV2_Lib_Descriptor * lv2_lib_descriptor() [const LV2_Lib_Descriptor *]
(const char *) bundle_path
(const LV2_Feature *const *) features [const struct _LV2_Feature *const *]
*/
#[link(name="./lv2.h")]
extern "C" {
pub fn lv2_lib_descriptor(bundle_path: *const libc::c_char, features: *const *const _LV2_Feature) -> *const LV2_Lib_Descriptor;
}
/* LV2_H_INCLUDED # */
/* LV2_CORE_URI "http://lv2plug.in/ns/lv2core" # */
/* LV2_CORE_PREFIX LV2_CORE_URI "#" # */
/* LV2_CORE__AllpassPlugin LV2_CORE_PREFIX "AllpassPlugin" # */
/* LV2_CORE__AmplifierPlugin LV2_CORE_PREFIX "AmplifierPlugin" # */
/* LV2_CORE__AnalyserPlugin LV2_CORE_PREFIX "AnalyserPlugin" # */
/* LV2_CORE__AudioPort LV2_CORE_PREFIX "AudioPort" # */
/* LV2_CORE__BandpassPlugin LV2_CORE_PREFIX "BandpassPlugin" # */
/* LV2_CORE__CVPort LV2_CORE_PREFIX "CVPort" # */
/* LV2_CORE__ChorusPlugin LV2_CORE_PREFIX "ChorusPlugin" # */
/* LV2_CORE__CombPlugin LV2_CORE_PREFIX "CombPlugin" # */
/* LV2_CORE__CompressorPlugin LV2_CORE_PREFIX "CompressorPlugin" # */
/* LV2_CORE__ConstantPlugin LV2_CORE_PREFIX "ConstantPlugin" # */
/* LV2_CORE__ControlPort LV2_CORE_PREFIX "ControlPort" # */
/* LV2_CORE__ConverterPlugin LV2_CORE_PREFIX "ConverterPlugin" # */
/* LV2_CORE__DelayPlugin LV2_CORE_PREFIX "DelayPlugin" # */
/* LV2_CORE__DistortionPlugin LV2_CORE_PREFIX "DistortionPlugin" # */
/* LV2_CORE__DynamicsPlugin LV2_CORE_PREFIX "DynamicsPlugin" # */
/* LV2_CORE__EQPlugin LV2_CORE_PREFIX "EQPlugin" # */
/* LV2_CORE__EnvelopePlugin LV2_CORE_PREFIX "EnvelopePlugin" # */
/* LV2_CORE__ExpanderPlugin LV2_CORE_PREFIX "ExpanderPlugin" # */
/* LV2_CORE__ExtensionData LV2_CORE_PREFIX "ExtensionData" # */
/* LV2_CORE__Feature LV2_CORE_PREFIX "Feature" # */
/* LV2_CORE__FilterPlugin LV2_CORE_PREFIX "FilterPlugin" # */
/* LV2_CORE__FlangerPlugin LV2_CORE_PREFIX "FlangerPlugin" # */
/* LV2_CORE__FunctionPlugin LV2_CORE_PREFIX "FunctionPlugin" # */
/* LV2_CORE__GatePlugin LV2_CORE_PREFIX "GatePlugin" # */
/* LV2_CORE__GeneratorPlugin LV2_CORE_PREFIX "GeneratorPlugin" # */
/* LV2_CORE__HighpassPlugin LV2_CORE_PREFIX "HighpassPlugin" # */
/* LV2_CORE__InputPort LV2_CORE_PREFIX "InputPort" # */
/* LV2_CORE__InstrumentPlugin LV2_CORE_PREFIX "InstrumentPlugin" # */
/* LV2_CORE__LimiterPlugin LV2_CORE_PREFIX "LimiterPlugin" # */
/* LV2_CORE__LowpassPlugin LV2_CORE_PREFIX "LowpassPlugin" # */
/* LV2_CORE__MixerPlugin LV2_CORE_PREFIX "MixerPlugin" # */
/* LV2_CORE__ModulatorPlugin LV2_CORE_PREFIX "ModulatorPlugin" # */
/* LV2_CORE__MultiEQPlugin LV2_CORE_PREFIX "MultiEQPlugin" # */
/* LV2_CORE__OscillatorPlugin LV2_CORE_PREFIX "OscillatorPlugin" # */
/* LV2_CORE__OutputPort LV2_CORE_PREFIX "OutputPort" # */
/* LV2_CORE__ParaEQPlugin LV2_CORE_PREFIX "ParaEQPlugin" # */
/* LV2_CORE__PhaserPlugin LV2_CORE_PREFIX "PhaserPlugin" # */
/* LV2_CORE__PitchPlugin LV2_CORE_PREFIX "PitchPlugin" # */
/* LV2_CORE__Plugin LV2_CORE_PREFIX "Plugin" # */
/* LV2_CORE__PluginBase LV2_CORE_PREFIX "PluginBase" # */
/* LV2_CORE__Point LV2_CORE_PREFIX "Point" # */
/* LV2_CORE__Port LV2_CORE_PREFIX "Port" # */
/* LV2_CORE__PortProperty LV2_CORE_PREFIX "PortProperty" # */
/* LV2_CORE__Resource LV2_CORE_PREFIX "Resource" # */
/* LV2_CORE__ReverbPlugin LV2_CORE_PREFIX "ReverbPlugin" # */
/* LV2_CORE__ScalePoint LV2_CORE_PREFIX "ScalePoint" # */
/* LV2_CORE__SimulatorPlugin LV2_CORE_PREFIX "SimulatorPlugin" # */
/* LV2_CORE__SpatialPlugin LV2_CORE_PREFIX "SpatialPlugin" # */
/* LV2_CORE__Specification LV2_CORE_PREFIX "Specification" # */
/* LV2_CORE__SpectralPlugin LV2_CORE_PREFIX "SpectralPlugin" # */
/* LV2_CORE__UtilityPlugin LV2_CORE_PREFIX "UtilityPlugin" # */
/* LV2_CORE__WaveshaperPlugin LV2_CORE_PREFIX "WaveshaperPlugin" # */
/* LV2_CORE__appliesTo LV2_CORE_PREFIX "appliesTo" # */
/* LV2_CORE__binary LV2_CORE_PREFIX "binary" # */
/* LV2_CORE__connectionOptional LV2_CORE_PREFIX "connectionOptional" # */
/* LV2_CORE__control LV2_CORE_PREFIX "control" # */
/* LV2_CORE__default LV2_CORE_PREFIX "default" # */
/* LV2_CORE__designation LV2_CORE_PREFIX "designation" # */
/* LV2_CORE__documentation LV2_CORE_PREFIX "documentation" # */
/* LV2_CORE__enumeration LV2_CORE_PREFIX "enumeration" # */
/* LV2_CORE__extensionData LV2_CORE_PREFIX "extensionData" # */
/* LV2_CORE__freeWheeling LV2_CORE_PREFIX "freeWheeling" # */
/* LV2_CORE__hardRTCapable LV2_CORE_PREFIX "hardRTCapable" # */
/* LV2_CORE__inPlaceBroken LV2_CORE_PREFIX "inPlaceBroken" # */
/* LV2_CORE__index LV2_CORE_PREFIX "index" # */
/* LV2_CORE__integer LV2_CORE_PREFIX "integer" # */
/* LV2_CORE__isLive LV2_CORE_PREFIX "isLive" # */
/* LV2_CORE__latency LV2_CORE_PREFIX "latency" # */
/* LV2_CORE__maximum LV2_CORE_PREFIX "maximum" # */
/* LV2_CORE__microVersion LV2_CORE_PREFIX "microVersion" # */
/* LV2_CORE__minimum LV2_CORE_PREFIX "minimum" # */
/* LV2_CORE__minorVersion LV2_CORE_PREFIX "minorVersion" # */
/* LV2_CORE__name LV2_CORE_PREFIX "name" # */
/* LV2_CORE__optionalFeature LV2_CORE_PREFIX "optionalFeature" # */
/* LV2_CORE__port LV2_CORE_PREFIX "port" # */
/* LV2_CORE__portProperty LV2_CORE_PREFIX "portProperty" # */
/* LV2_CORE__project LV2_CORE_PREFIX "project" # */
/* LV2_CORE__prototype LV2_CORE_PREFIX "prototype" # */
/* LV2_CORE__reportsLatency LV2_CORE_PREFIX "reportsLatency" # */
/* LV2_CORE__requiredFeature LV2_CORE_PREFIX "requiredFeature" # */
/* LV2_CORE__sampleRate LV2_CORE_PREFIX "sampleRate" # */
/* LV2_CORE__scalePoint LV2_CORE_PREFIX "scalePoint" # */
/* LV2_CORE__symbol LV2_CORE_PREFIX "symbol" # */
/* LV2_CORE__toggled LV2_CORE_PREFIX "toggled" # */
/* LV2_SYMBOL_EXTERN # */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment