Update of /cvsroot/foo/foo/libfoo/modules In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29085/modules Modified Files: FOOMAllpass.m FOOMBandlimitedNoise.h FOOMComb.m FOOMFof.m FOOMLookup.h FOOMLookup.m FOOMOscillator.m FOOMReadBpf.m FOOMReadSnd.h FOOMReadSnd.m FOOMReadTranspSnd.h FOOMReadTranspSnd.m FOOMReverb.h FOOMReverb8.h FOOMTransposeBpf.h FOOMTransposeBpf.m FOOMTransposeSnd.h FOOMTransposeSnd.m Log Message: fixed another memory leak. lots of cosmetic corrections Index: FOOMLookup.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/FOOMLookup.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMLookup.h 14 Dec 2007 14:16:12 -0000 1.1 --- FOOMLookup.h 23 Mar 2009 00:08:15 -0000 1.2 *************** *** 45,50 **** @interface FOOMLookup : FOOEagerModule <NSCoding> { ! /* Substrate *substrate; // statically typed */ ! id _substrate; sample_t *_samples; int _offset; --- 45,49 ---- @interface FOOMLookup : FOOEagerModule <NSCoding> { ! FOOSubstrate *_substrate; sample_t *_samples; int _offset; Index: FOOMLookup.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/FOOMLookup.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMLookup.m 14 Dec 2007 14:16:12 -0000 1.1 --- FOOMLookup.m 23 Mar 2009 00:08:15 -0000 1.2 *************** *** 57,61 **** } ! _substrate = substr; _taps = n; _count = SAMPLE_BUFFER_SIZE; --- 57,61 ---- } ! _substrate = RETAIN(substr); _taps = n; _count = SAMPLE_BUFFER_SIZE; *************** *** 71,74 **** --- 71,75 ---- { NSZoneFree([self zone], _samples); + RELEASE(_substrate); [super dealloc]; } Index: FOOMReadBpf.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/FOOMReadBpf.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMReadBpf.m 22 Mar 2009 01:11:40 -0000 1.2 --- FOOMReadBpf.m 23 Mar 2009 00:08:15 -0000 1.3 *************** *** 51,55 **** FOO_ERROR(YES, self); } ! _substrate = substr; _beginT = TIMEFRAME; _firsttime = YES; --- 51,55 ---- FOO_ERROR(YES, self); } ! _substrate = RETAIN(substr); _beginT = TIMEFRAME; _firsttime = YES; *************** *** 62,65 **** --- 62,72 ---- + - (void) dealloc + { + RELEASE(_substrate); + [super dealloc]; + } + + - reset { Index: FOOMReadTranspSnd.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/FOOMReadTranspSnd.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMReadTranspSnd.h 14 Dec 2007 14:16:14 -0000 1.1 --- FOOMReadTranspSnd.h 23 Mar 2009 00:08:15 -0000 1.2 *************** *** 48,53 **** @interface FOOMReadTranspSnd : FOOEagerModule <NSCoding> { ! id _substrate; /* input */ ! /* Substrate *substrate; /\* input *\/ */ sample_t *_samples; /* cache */ int _offset; /* cache's sample position in input */ --- 48,52 ---- @interface FOOMReadTranspSnd : FOOEagerModule <NSCoding> { ! FOOSubstrate *_substrate; /* input */ sample_t *_samples; /* cache */ int _offset; /* cache's sample position in input */ *************** *** 63,67 **** } ! - initializeWith: substr; - initializeTaps: (int)n; - initPos; --- 62,66 ---- } ! - initializeWith: (FOOSubstrate *) substr; - initializeTaps: (int)n; - initPos; Index: FOOMTransposeSnd.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/FOOMTransposeSnd.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMTransposeSnd.m 14 Dec 2007 14:16:16 -0000 1.1 --- FOOMTransposeSnd.m 23 Mar 2009 00:08:15 -0000 1.2 *************** *** 45,49 **** @implementation FOOMTransposeSnd ! - initializeWith: substr taps: (int) n { if ([substr isKindOfClass: [FOOSoundFile class]] == NO && --- 45,49 ---- @implementation FOOMTransposeSnd ! - (id) initializeWith: (FOOSubstrate *)substr taps: (int) n { if ([substr isKindOfClass: [FOOSoundFile class]] == NO && *************** *** 54,58 **** } ! _substrate = substr; _beginT = TIMEFRAME; _taps = n; --- 54,58 ---- } ! _substrate = RETAIN(substr); _beginT = TIMEFRAME; _taps = n; *************** *** 88,91 **** --- 88,92 ---- NSZoneFree([self zone], _samples); } + RELEASE(_substrate); [super dealloc]; } Index: FOOMTransposeBpf.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/FOOMTransposeBpf.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMTransposeBpf.m 22 Mar 2009 17:18:33 -0000 1.2 --- FOOMTransposeBpf.m 23 Mar 2009 00:08:15 -0000 1.3 *************** *** 42,46 **** ! - initializeWith: substr { if ([substr isKindOfClass: [FOOBreakpointFunction class]] == NO) --- 42,46 ---- ! - (id) initializeWith: (FOOBreakpointFunction *)substr { if ([substr isKindOfClass: [FOOBreakpointFunction class]] == NO) *************** *** 48,52 **** FOO_ERROR(YES, self); } ! _substrate = substr; _beginT = TIMEFRAME; [self doInit]; --- 48,52 ---- FOO_ERROR(YES, self); } ! _substrate = RETAIN(substr); _beginT = TIMEFRAME; [self doInit]; *************** *** 56,59 **** --- 56,66 ---- + - (void) dealloc + { + RELEASE(_substrate); + [super dealloc]; + } + + - doInit { Index: FOOMReadTranspSnd.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/FOOMReadTranspSnd.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMReadTranspSnd.m 14 Dec 2007 14:16:14 -0000 1.1 --- FOOMReadTranspSnd.m 23 Mar 2009 00:08:15 -0000 1.2 *************** *** 58,62 **** ! - initializeWith: substr { if ([substr isKindOfClass: [FOOSoundFile class]] == NO && --- 58,62 ---- ! - (id) initializeWith: (FOOSubstrate *)substr { if ([substr isKindOfClass: [FOOSoundFile class]] == NO && *************** *** 66,70 **** FOO_ERROR(YES, self); } ! _substrate = substr; _beginT = TIMEFRAME; _taps = 0; --- 66,70 ---- FOO_ERROR(YES, self); } ! _substrate = RETAIN(substr); _beginT = TIMEFRAME; _taps = 0; *************** *** 75,79 **** ! - initializeTaps: (int)n { _taps = n; --- 75,79 ---- ! - (id) initializeTaps: (int)n { _taps = n; *************** *** 95,99 **** ! - initializeWith:substr taps: (int)n { [self initializeWith:substr]; --- 95,99 ---- ! - (id) initializeWith: (FOOSubstrate *)substr taps: (int)n { [self initializeWith:substr]; *************** *** 110,114 **** NSZoneFree([self zone], _samples); } ! [super dealloc]; } --- 110,114 ---- NSZoneFree([self zone], _samples); } ! RELEASE(_substrate); [super dealloc]; } Index: FOOMTransposeBpf.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/FOOMTransposeBpf.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMTransposeBpf.h 14 Dec 2007 14:16:15 -0000 1.1 --- FOOMTransposeBpf.h 23 Mar 2009 00:08:15 -0000 1.2 *************** *** 45,50 **** @interface FOOMTransposeBpf : FOOEagerModule <NSCoding> { ! /* Substrate *substrate; */ ! id _substrate; int _begin; BOOL _end; --- 45,49 ---- @interface FOOMTransposeBpf : FOOEagerModule <NSCoding> { ! FOOBreakpointFunction *_substrate; int _begin; BOOL _end; *************** *** 58,62 **** } ! - initializeWith: substr; - doInit; --- 57,61 ---- } ! - (id) initializeWith: (FOOBreakpointFunction *)substr; - doInit; Index: FOOMTransposeSnd.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/FOOMTransposeSnd.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMTransposeSnd.h 14 Dec 2007 14:16:16 -0000 1.1 --- FOOMTransposeSnd.h 23 Mar 2009 00:08:15 -0000 1.2 *************** *** 49,54 **** @interface FOOMTransposeSnd : FOOEagerModule <NSCoding> { ! /* Substrate *substrate; /\* input *\/ */ ! id _substrate; sample_t *_samples; /* cache */ int _offset; /* cache's sample position in input */ --- 49,53 ---- @interface FOOMTransposeSnd : FOOEagerModule <NSCoding> { ! FOOSubstrate *_substrate; sample_t *_samples; /* cache */ int _offset; /* cache's sample position in input */ *************** *** 63,67 **** } ! - initializeWith: substr taps: (int)n; - initPos; --- 62,66 ---- } ! - (id) initializeWith: (FOOSubstrate *)substr taps: (int)n; - initPos; Index: FOOMComb.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/FOOMComb.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMComb.m 14 Dec 2007 14:16:08 -0000 1.1 --- FOOMComb.m 23 Mar 2009 00:08:15 -0000 1.2 *************** *** 55,60 **** - (void) dealloc { ! NSZoneFree([self zone], _line); ! _line = NULL; [super dealloc]; --- 55,63 ---- - (void) dealloc { ! if (_line) ! { ! NSZoneFree([self zone], _line); ! _line = NULL; ! } [super dealloc]; *************** *** 91,103 **** - (BOOL) activate { - // if (INPUTS < 2 || [INPUT(0) activate] == NO || [INPUT(1) activate] == NO) - // { - // _active = NO; - // } - // else - // { - // _active = YES; - // } - // take feedback in account [INPUT(0) activate]; --- 94,97 ---- Index: FOOMReverb8.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/FOOMReverb8.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMReverb8.h 14 Dec 2007 14:16:15 -0000 1.1 --- FOOMReverb8.h 23 Mar 2009 00:08:15 -0000 1.2 *************** *** 64,69 **** @interface FOOMReverb8 : FOOEagerModule <NSCoding> { ! NSMutableArray *_buffers; // statically typed ! NSMutableArray *_outputs; // statically typed delay8_t **_delays; filter8_t **_filters; --- 64,69 ---- @interface FOOMReverb8 : FOOEagerModule <NSCoding> { ! NSMutableArray *_buffers; ! NSMutableArray *_outputs; delay8_t **_delays; filter8_t **_filters; Index: FOOMOscillator.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/FOOMOscillator.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMOscillator.m 14 Dec 2007 14:16:14 -0000 1.1 --- FOOMOscillator.m 23 Mar 2009 00:08:15 -0000 1.2 *************** *** 137,141 **** { RELEASE(_filename); - [super dealloc]; } --- 137,140 ---- Index: FOOMReverb.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/FOOMReverb.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMReverb.h 14 Dec 2007 14:16:15 -0000 1.1 --- FOOMReverb.h 23 Mar 2009 00:08:15 -0000 1.2 *************** *** 59,64 **** @interface FOOMReverb : FOOEagerModule <NSCoding> { ! NSMutableArray *_buffers; // statically typed ! NSMutableArray *_outputs; // statically typed delay_t **_delays; filter_t **_filters; --- 59,64 ---- @interface FOOMReverb : FOOEagerModule <NSCoding> { ! NSMutableArray *_buffers; ! NSMutableArray *_outputs; delay_t **_delays; filter_t **_filters; Index: FOOMBandlimitedNoise.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/FOOMBandlimitedNoise.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMBandlimitedNoise.h 14 Dec 2007 14:16:08 -0000 1.1 --- FOOMBandlimitedNoise.h 23 Mar 2009 00:08:15 -0000 1.2 *************** *** 47,51 **** int _init; int _taps; ! FOOLookupTable *_table; // statically typed double *_samples; double _phase; --- 47,51 ---- int _init; int _taps; ! FOOLookupTable *_table; double *_samples; double _phase; Index: FOOMReadSnd.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/FOOMReadSnd.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMReadSnd.h 14 Dec 2007 14:16:14 -0000 1.1 --- FOOMReadSnd.h 23 Mar 2009 00:08:15 -0000 1.2 *************** *** 48,53 **** @interface FOOMReadSnd : FOOEagerModule <NSCoding> { ! /* Substrate *substrate; */ ! id _substrate; int _begin; int _end; --- 48,52 ---- @interface FOOMReadSnd : FOOEagerModule <NSCoding> { ! FOOSubstrate *_substrate; int _begin; int _end; Index: FOOMAllpass.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/FOOMAllpass.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMAllpass.m 14 Dec 2007 14:16:08 -0000 1.1 --- FOOMAllpass.m 23 Mar 2009 00:08:15 -0000 1.2 *************** *** 61,73 **** - (BOOL) activate { - // if (INPUTS < 2 || [INPUT(0) activate] == NO || [INPUT(1) activate] == NO) - // { - // _active = NO; - // } - // else - // { - // _active = YES; - // } - // take feedback in account [INPUT(0) activate]; --- 61,64 ---- Index: FOOMReadSnd.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/FOOMReadSnd.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMReadSnd.m 14 Dec 2007 14:16:14 -0000 1.1 --- FOOMReadSnd.m 23 Mar 2009 00:08:15 -0000 1.2 *************** *** 49,53 **** FOO_ERROR(YES, self); } ! _substrate = substr; _beginT = TIMEFRAME; _position = 0; --- 49,53 ---- FOO_ERROR(YES, self); } ! _substrate = RETAIN(substr); _beginT = TIMEFRAME; _position = 0; *************** *** 57,60 **** --- 57,67 ---- + - (void) dealloc + { + RELEASE(_substrate); + [super dealloc]; + } + + - reset { Index: FOOMFof.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/FOOMFof.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMFof.m 14 Dec 2007 14:16:11 -0000 1.1 --- FOOMFof.m 23 Mar 2009 00:08:15 -0000 1.2 *************** *** 103,107 **** if (p[i].next != NULL) { - // (char *)(p[i].next) += offset; // cast as lvalue p[i].next += offset; } --- 103,106 ---- *************** *** 117,121 **** if (x->used.next != NULL) { - // (char *)(x->used.next) += offset; // cast as lvalue x->used.next += offset; } --- 116,119 ---- *************** *** 356,360 **** { fof_free_list(&(_fof.list)); - [super dealloc]; } --- 354,357 ---- |