diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-02-04 22:07:55 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-02-04 22:07:55 +0000 |
commit | f08d5081d923805de4db493c424dc73b402d481b (patch) | |
tree | a84883f17dbf86df93c2fd040986fea2b2f4e1d7 /testing/ladspa/0002-plugin-constructor-destructor.patch | |
parent | 40ca5d808acd1a84983977fff3505cf2ba20a83f (diff) | |
download | aports-f08d5081d923805de4db493c424dc73b402d481b.tar.bz2 aports-f08d5081d923805de4db493c424dc73b402d481b.tar.xz |
testing/ladspa: new aport
Linux Audio Developer's Simple Plug-in API, examples and tools
http://www.ladspa.org/
Diffstat (limited to 'testing/ladspa/0002-plugin-constructor-destructor.patch')
-rw-r--r-- | testing/ladspa/0002-plugin-constructor-destructor.patch | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/testing/ladspa/0002-plugin-constructor-destructor.patch b/testing/ladspa/0002-plugin-constructor-destructor.patch new file mode 100644 index 0000000000..f0061e823d --- /dev/null +++ b/testing/ladspa/0002-plugin-constructor-destructor.patch @@ -0,0 +1,119 @@ +From d281f99e3776027e98f3b9d952fad0d456a75b8a Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +Date: Sat, 4 Feb 2012 22:04:33 +0000 +Subject: [PATCH 2/3] plugin constructor destructor + +--- + src/plugins/amp.c | 8 ++++---- + src/plugins/delay.c | 8 ++++---- + src/plugins/filter.c | 8 ++++---- + src/plugins/noise.c | 8 ++++---- + 4 files changed, 16 insertions(+), 16 deletions(-) + +diff --git a/src/plugins/amp.c b/src/plugins/amp.c +index b6d2345..a447fa1 100644 +--- a/src/plugins/amp.c ++++ b/src/plugins/amp.c +@@ -152,8 +152,8 @@ LADSPA_Descriptor * g_psStereoDescriptor = NULL; + + /* _init() is called automatically when the plugin library is first + loaded. */ +-void +-_init() { ++void __attribute__ ((constructor)) ++my_init() { + + char ** pcPortNames; + LADSPA_PortDescriptor * piPortDescriptors; +@@ -335,8 +335,8 @@ deleteDescriptor(LADSPA_Descriptor * psDescriptor) { + /*****************************************************************************/ + + /* _fini() is called automatically when the library is unloaded. */ +-void +-_fini() { ++void __attribute__ ((destructor)) ++my_fini() { + deleteDescriptor(g_psMonoDescriptor); + deleteDescriptor(g_psStereoDescriptor); + } +diff --git a/src/plugins/delay.c b/src/plugins/delay.c +index 8b03979..22e477b 100644 +--- a/src/plugins/delay.c ++++ b/src/plugins/delay.c +@@ -228,8 +228,8 @@ LADSPA_Descriptor * g_psDescriptor = NULL; + + /* _init() is called automatically when the plugin library is first + loaded. */ +-void +-_init() { ++void __attribute__ ((constructor)) ++my_init() { + + char ** pcPortNames; + LADSPA_PortDescriptor * piPortDescriptors; +@@ -322,8 +322,8 @@ _init() { + /*****************************************************************************/ + + /* _fini() is called automatically when the library is unloaded. */ +-void +-_fini() { ++void __attribute__ ((destructor)) ++my_fini() { + long lIndex; + if (g_psDescriptor) { + free((char *)g_psDescriptor->Label); +diff --git a/src/plugins/filter.c b/src/plugins/filter.c +index 3f50457..06f7bc6 100644 +--- a/src/plugins/filter.c ++++ b/src/plugins/filter.c +@@ -252,8 +252,8 @@ LADSPA_Descriptor * g_psHPFDescriptor = NULL; + + /* _init() is called automatically when the plugin library is first + loaded. */ +-void +-_init() { ++void __attribute__ ((constructor)) ++my_init() { + + char ** pcPortNames; + LADSPA_PortDescriptor * piPortDescriptors; +@@ -431,8 +431,8 @@ deleteDescriptor(LADSPA_Descriptor * psDescriptor) { + /*****************************************************************************/ + + /* _fini() is called automatically when the library is unloaded. */ +-void +-_fini() { ++void __attribute__ ((destructor)) ++my_fini() { + deleteDescriptor(g_psLPFDescriptor); + deleteDescriptor(g_psHPFDescriptor); + } +diff --git a/src/plugins/noise.c b/src/plugins/noise.c +index 0fdd938..de6fc81 100644 +--- a/src/plugins/noise.c ++++ b/src/plugins/noise.c +@@ -142,8 +142,8 @@ LADSPA_Descriptor * g_psDescriptor; + + /* _init() is called automatically when the plugin library is first + loaded. */ +-void +-_init() { ++void __attribute__ ((constructor)) ++my_init() { + + char ** pcPortNames; + LADSPA_PortDescriptor * piPortDescriptors; +@@ -219,8 +219,8 @@ _init() { + /*****************************************************************************/ + + /* _fini() is called automatically when the library is unloaded. */ +-void +-_fini() { ++void __attribute__ ((destructor)) ++my_fini() { + long lIndex; + if (g_psDescriptor) { + free((char *)g_psDescriptor->Label); +-- +1.7.9 + |