summaryrefslogtreecommitdiffstats
path: root/bindings/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-12-26 19:22:03 +0100
committerDavid Robillard <d@drobilla.net>2020-12-31 14:15:00 +0100
commit31cc05d5ef6e840ebe2b4c265f374f913f4758cc (patch)
tree87302811f8df1f16e0bd4785ff405906a993b7d0 /bindings/test
parent7a51f0b8e95d29b5e053db97bf72094e847ee7ef (diff)
downloadlilv-31cc05d5ef6e840ebe2b4c265f374f913f4758cc.tar.gz
lilv-31cc05d5ef6e840ebe2b4c265f374f913f4758cc.tar.bz2
lilv-31cc05d5ef6e840ebe2b4c265f374f913f4758cc.zip
Format all code with clang-format
Diffstat (limited to 'bindings/test')
-rw-r--r--bindings/test/bindings_test_plugin.c64
1 files changed, 28 insertions, 36 deletions
diff --git a/bindings/test/bindings_test_plugin.c b/bindings/test/bindings_test_plugin.c
index 1945c0d..0c3af4f 100644
--- a/bindings/test/bindings_test_plugin.c
+++ b/bindings/test/bindings_test_plugin.c
@@ -42,10 +42,10 @@
should be defined for readability.
*/
typedef enum {
- TEST_CONTROL_IN = 0,
- TEST_CONTROL_OUT = 1,
- TEST_AUDIO_IN = 2,
- TEST_AUDIO_OUT = 3
+ TEST_CONTROL_IN = 0,
+ TEST_CONTROL_OUT = 1,
+ TEST_AUDIO_IN = 2,
+ TEST_AUDIO_OUT = 3
} PortIndex;
/**
@@ -54,7 +54,7 @@ typedef enum {
every instance method. In this simple plugin, only port buffers need to be
stored, since there is no additional instance data. */
typedef struct {
- float* buf;
+ float* buf;
} Test;
/**
@@ -73,9 +73,9 @@ instantiate(const LV2_Descriptor* descriptor,
const char* bundle_path,
const LV2_Feature* const* features)
{
- Test* test = (Test*)malloc(sizeof(Test));
+ Test* test = (Test*)malloc(sizeof(Test));
- return (LV2_Handle)test;
+ return (LV2_Handle)test;
}
/**
@@ -87,11 +87,8 @@ instantiate(const LV2_Descriptor* descriptor,
context as run().
*/
static void
-connect_port(LV2_Handle instance,
- uint32_t port,
- void* data)
-{
-}
+connect_port(LV2_Handle instance, uint32_t port, void* data)
+{}
/**
The activate() method is called by the host to initialise and prepare the
@@ -104,14 +101,12 @@ connect_port(LV2_Handle instance,
*/
static void
activate(LV2_Handle instance)
-{
-}
+{}
/** Process a block of audio (audio thread, must be RT safe). */
static void
run(LV2_Handle instance, uint32_t n_samples)
-{
-}
+{}
/**
The deactivate() method is the counterpart to activate() called by the host
@@ -126,8 +121,7 @@ run(LV2_Handle instance, uint32_t n_samples)
*/
static void
deactivate(LV2_Handle instance)
-{
-}
+{}
/**
Destroy a plugin instance (counterpart to instantiate()).
@@ -138,7 +132,7 @@ deactivate(LV2_Handle instance)
static void
cleanup(LV2_Handle instance)
{
- free(instance);
+ free(instance);
}
/**
@@ -154,7 +148,7 @@ cleanup(LV2_Handle instance)
static const void*
extension_data(const char* uri)
{
- return NULL;
+ return NULL;
}
/**
@@ -162,16 +156,14 @@ extension_data(const char* uri)
statically to avoid leaking memory and non-portable shared library
constructors and destructors to clean up properly.
*/
-static const LV2_Descriptor descriptor = {
- TEST_URI,
- instantiate,
- connect_port,
- activate,
- run,
- deactivate,
- cleanup,
- extension_data
-};
+static const LV2_Descriptor descriptor = {TEST_URI,
+ instantiate,
+ connect_port,
+ activate,
+ run,
+ deactivate,
+ cleanup,
+ extension_data};
/**
The lv2_descriptor() function is the entry point to the plugin library. The
@@ -187,10 +179,10 @@ LV2_SYMBOL_EXPORT
const LV2_Descriptor*
lv2_descriptor(uint32_t index)
{
- switch (index) {
- case 0:
- return &descriptor;
- default:
- return NULL;
- }
+ switch (index) {
+ case 0:
+ return &descriptor;
+ default:
+ return NULL;
+ }
}