[LAD] Test app for LADSPA plugins
Damon Chaplin
damon at karuna.eclipse.co.uk
Thu Jul 30 10:28:21 UTC 2009
On Thu, 2009-07-30 at 11:55 +0200, xmag wrote:
> Hi,
>
> I wrote all the Glame* filters, did you send me an email, and if, where
> did you send it :-)
I sent Steve Harris an email about some issues in the swh plugins, but
no problems were spotted in the Glame* filters by my test app.
> What is your testapp doing?
> I guess, your probably just calling instantiate and then cleanup.
Just this:
if ((handle = instantiate(descriptor, SRATE))) {
descriptor->cleanup(handle);
}
> The structs are initialized within the activate function. I don't know
> whether it is mandatory to call this function or not.
I don't think it is mandatory. I can't see that in the spec.
> A quick look in my code shows, that in util/iir.h the function
> free_iirf_t does not check if the pointers are different from NULL
> before freeing them. This probably causes the segfault.
> Maybe this should be fixed :)
Yep, that fixes all of them, in iir.h and iir.c.
Thanks.
Damon
--- iir.h.orig 2006-08-08 16:53:50.000000000 +0100
+++ iir.h 2009-07-30 11:09:59.000000000 +0100
@@ -63,9 +63,11 @@ static inline iirf_t* init_iirf_t(iir_st
static inline void free_iirf_t(iirf_t* iirf, iir_stage_t* gt) {
int i;
- for(i=0;i<gt->availst;i++){
- free(iirf[i].iring);
- free(iirf[i].oring);
+ if (gt){
+ for(i=0;i<gt->availst;i++){
+ free(iirf[i].iring);
+ free(iirf[i].oring);
+ }
}
free(iirf);
};
--- iir.c.orig 2003-09-13 12:55:23.000000000 +0100
+++ iir.c 2009-07-30 11:12:45.000000000 +0100
@@ -85,10 +85,12 @@ void combine_iir_stages(int mode, iir_st
void free_iir_stage(iir_stage_t *gt){
int i;
- for(i=0;i<gt->availst;i++)
- free(gt->coeff[i]);
- free(gt->coeff);
- free(gt);
+ if (gt){
+ for(i=0;i<gt->availst;i++)
+ free(gt->coeff[i]);
+ free(gt->coeff);
+ free(gt);
+ }
}
/* center: frequency already normalized between 0 and 0.5 of sampling
More information about the Linux-audio-dev
mailing list