Update of /cvsroot/foo/foo/libfoo/modules/orthodox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25982 Modified Files: FOOMAdd.m FOOMBandlimitedNoise.m FOOMConstant.m FOOMConstantBiquad.m FOOMConstantTwoPole.m FOOMConstantTwoPoleTwoZero.m FOOMDiff.m FOOMDirac.m FOOMDiv.m FOOMExpon.m FOOMFiltreVariableEtat.m FOOMFof.m FOOMGate.m FOOMInteg.m FOOMLine.m FOOMLookup.m FOOMMath.m FOOMMul.m FOOMNeg.m FOOMNoise.h FOOMNoise.m FOOMOscillator.m FOOMReadBpf.h FOOMReadBpf.m FOOMReadSnd.h FOOMReadSnd.m FOOMReadTranspSnd.h FOOMReadTranspSnd.m FOOMReverb.h FOOMReverb.m FOOMReverb8.h FOOMReverb8.m FOOMReverbOutput.h FOOMReverbOutput.m FOOMTransposeBpf.h FOOMTransposeBpf.m FOOMTransposeSnd.h FOOMTransposeSnd.m FOOMVariableTwoPole.m Log Message: finished adding archiving functions. leaving out some modules which didn't have an archiving function before. not yet sure whether we need dummy functions. Index: FOOMConstantTwoPole.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMConstantTwoPole.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMConstantTwoPole.m 14 Aug 2004 07:09:45 -0000 1.2 --- FOOMConstantTwoPole.m 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 39,44 **** #include <math.h> - #import <Foundation/NSKeyedArchiver.h> - #define INFINITE_TAIL 2147483647 // 2^31-1 samples => ~12 hours at 50 kHz --- 39,42 ---- Index: FOOMLookup.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMLookup.m,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FOOMLookup.m 15 Aug 2004 16:48:55 -0000 1.4 --- FOOMLookup.m 15 Aug 2004 17:42:37 -0000 1.5 *************** *** 41,46 **** #include <FOO/FOORegion.h> - #import <Foundation/NSKeyedArchiver.h> - #define SAMPLE_BUFFER_SIZE 1024 // should be several times the taps size --- 41,44 ---- Index: FOOMDiff.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMDiff.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMDiff.m 14 Aug 2004 07:09:45 -0000 1.2 --- FOOMDiff.m 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 37,42 **** #include "FOOMDiff.h" - #import <Foundation/NSKeyedArchiver.h> - @implementation FOOMDiff --- 37,40 ---- Index: FOOMDiv.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMDiv.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMDiv.m 14 Aug 2004 07:09:45 -0000 1.2 --- FOOMDiv.m 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 37,42 **** #include "FOOMDiv.h" - #import <Foundation/NSKeyedArchiver.h> - @implementation FOOMDiv --- 37,40 ---- Index: FOOMReadTranspSnd.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMReadTranspSnd.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMReadTranspSnd.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMReadTranspSnd.h 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 44,48 **** #include <FOO/FOOLookupTable.h> ! @interface FOOMReadTranspSnd : FOOEagerModule { id _substrate; /* input */ --- 44,49 ---- #include <FOO/FOOLookupTable.h> ! ! @interface FOOMReadTranspSnd : FOOEagerModule <NSCoding> { id _substrate; /* input */ Index: FOOMTransposeSnd.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMTransposeSnd.m,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FOOMTransposeSnd.m 6 Aug 2004 05:57:41 -0000 1.4 --- FOOMTransposeSnd.m 15 Aug 2004 17:42:37 -0000 1.5 *************** *** 263,300 **** */ ! #if 0 // to be done ! ! - awake { ! [super awake]; ! _samples = NSZoneCalloc([self zone], _count, sizeof(sample_t)); ! _table = [GlobalsManager getSineXoverXTable:_taps]; ! [self initPos]; ! return self; ! } ! - read:(TypedStream *)stream ! { ! [super read:stream]; ! objc_read_types(stream, "@[8c]ii", ! &_substrate, ! &_beginT, ! &_count, ! &_taps); ! return self; } ! - write:(TypedStream *)stream { ! [super write:stream]; ! objc_write_types(stream, "@[8c]ii", ! &_substrate, ! &_beginT, ! &_count, ! &_taps); ! return self; } - #endif - @end --- 263,313 ---- */ ! - (void) encodeWithCoder: (NSCoder *)coder { ! [super encodeWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeObject: _substrate forKey: @"FOOMTransposeSnd:substrate"]; ! [coder encodeDouble: _beginT forKey: @"FOOMTransposeSnd:beginT"]; ! [coder encodeInt: _count forKey: @"FOOMTransposeSnd:count"]; ! [coder encodeInt: _taps forKey: @"FOOMTransposeSnd:taps"]; ! } ! else ! { ! [coder encodeObject: _substrate]; ! [coder encodeValueOfObjCType: @encode(double) at: &_beginT]; ! [coder encodeValueOfObjCType: @encode(int) at: &_count]; ! [coder encodeValueOfObjCType: @encode(int) at: &_taps]; ! } ! ! return; } ! ! - (id) initWithCoder: (NSCoder *)coder { ! self = [super initWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! _substrate = RETAIN([coder decodeObjectForKey: @"FOOMTransposeSnd:substrate"]); ! _beginT = [coder decodeDoubleForKey: @"FOOMTransposeSnd:beginT"]; ! _count = [coder decodeIntForKey: @"FOOMTransposeSnd:count"]; ! _taps = [coder decodeIntForKey: @"FOOMTransposeSnd:taps"]; ! } ! else ! { ! _substrate = RETAIN([coder decodeObject]); ! [coder decodeValueOfObjCType: @encode(double) at: &_beginT]; ! [coder decodeValueOfObjCType: @encode(int) at: &_count]; ! [coder decodeValueOfObjCType: @encode(int) at: &_taps]; ! } ! ! _samples = NSZoneCalloc([self zone], _count, sizeof(sample_t)); ! _table = [FOOGlobalsManager getSineXoverXTable: _taps]; ! ! return [self initPos]; } @end Index: FOOMTransposeBpf.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMTransposeBpf.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMTransposeBpf.m 1 Aug 2004 23:39:20 -0000 1.2 --- FOOMTransposeBpf.m 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 223,243 **** */ ! #if 0 // to be done ! ! - read:(TypedStream *)stream { ! [super read:stream]; ! objc_read_types(stream, "@[8c]", &_substrate, &_beginT); ! return self; } ! - write:(TypedStream *)stream { ! [super write:stream]; ! objc_write_types(stream, "@[8c]", &_substrate, &_beginT); ! return self; ! } ! #endif @end --- 223,262 ---- */ ! - (void) encodeWithCoder: (NSCoder *)coder { ! [super encodeWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeObject: _substrate forKey: @"FOOMTransposeBpf:substrate"]; ! [coder encodeDouble: _beginT forKey: @"FOOMTransposeBpf:beginT"]; ! } ! else ! { ! [coder encodeObject: _substrate]; ! [coder encodeValueOfObjCType: @encode(double) at: &_beginT]; ! } ! ! return; } ! ! - (id) initWithCoder: (NSCoder *)coder { ! self = [super initWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! _substrate = RETAIN([coder decodeObjectForKey: @"FOOMTransposeBpf:substrate"]); ! _beginT = [coder decodeDoubleForKey: @"FOOMTransposeBpf:beginT"]; ! } ! else ! { ! _substrate = RETAIN([coder decodeObject]); ! [coder decodeValueOfObjCType: @encode(double) at: &_beginT]; ! } ! ! return self; ! } @end Index: FOOMReadTranspSnd.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMReadTranspSnd.m,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FOOMReadTranspSnd.m 6 Aug 2004 05:57:41 -0000 1.4 --- FOOMReadTranspSnd.m 15 Aug 2004 17:42:37 -0000 1.5 *************** *** 339,366 **** */ ! #if 0 // to be done ! ! - awake { ! [super awake]; ! _samples = NULL; ! return self; ! } ! - read:(TypedStream *)stream ! { ! [super read:stream]; ! objc_read_types(stream, "@[8c]", &_substrate, &_beginT); ! return self; } ! - write:(TypedStream *)stream { ! [super write:stream]; ! objc_write_types(stream, "@[8c]", &_substrate, &_beginT); ! return self; ! } ! #endif @end --- 339,380 ---- */ ! - (void) encodeWithCoder: (NSCoder *)coder { ! [super encodeWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeObject: _substrate forKey: @"FOOMReadTranspSnd:substrate"]; ! [coder encodeDouble: _beginT forKey: @"FOOMReadTranspSnd:beginT"]; ! } ! else ! { ! [coder encodeObject: _substrate]; ! [coder encodeValueOfObjCType: @encode(double) at: &_beginT]; ! } ! ! return; } ! ! - (id) initWithCoder: (NSCoder *)coder { ! self = [super initWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! _substrate = RETAIN([coder decodeObjectForKey: @"FOOMReadTranspSnd:substrate"]); ! _beginT = [coder decodeDoubleForKey: @"FOOMReadTranspSnd:beginT"]; ! } ! else ! { ! _substrate = RETAIN([coder decodeObject]); ! [coder decodeValueOfObjCType: @encode(double) at: &_beginT]; ! } ! ! _samples = NULL; ! ! return self; ! } @end Index: FOOMTransposeBpf.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMTransposeBpf.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMTransposeBpf.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMTransposeBpf.h 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 42,46 **** #include <FOO/FOOBreakpointFunction.h> ! @interface FOOMTransposeBpf : FOOEagerModule { /* Substrate *substrate; */ --- 42,46 ---- #include <FOO/FOOBreakpointFunction.h> ! @interface FOOMTransposeBpf : FOOEagerModule <NSCoding> { /* Substrate *substrate; */ Index: FOOMTransposeSnd.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMTransposeSnd.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMTransposeSnd.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMTransposeSnd.h 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 45,49 **** #include "FOOMMath.h" ! @interface FOOMTransposeSnd : FOOEagerModule { /* Substrate *substrate; /\* input *\/ */ --- 45,50 ---- #include "FOOMMath.h" ! ! @interface FOOMTransposeSnd : FOOEagerModule <NSCoding> { /* Substrate *substrate; /\* input *\/ */ Index: FOOMInteg.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMInteg.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMInteg.m 14 Aug 2004 07:09:45 -0000 1.2 --- FOOMInteg.m 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 37,42 **** #include "FOOMInteg.h" - #import <Foundation/NSKeyedArchiver.h> - @implementation FOOMInteg --- 37,40 ---- Index: FOOMReverb8.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMReverb8.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMReverb8.m 6 Aug 2004 05:57:41 -0000 1.2 --- FOOMReverb8.m 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 35,41 **** /* $Id$ */ - #include <stdlib.h> #include "FOOMReverb8.h" /************************** begin reverb code in C ***************************/ --- 35,43 ---- /* $Id$ */ #include "FOOMReverb8.h" + #include <stdlib.h> + + /************************** begin reverb code in C ***************************/ *************** *** 611,627 **** */ ! // - read:(TypedStream *)stream ! // { ! // [super read:stream]; ! // objc_read_types(stream, "[8c][8c][8c][8c][8c][8c]", &tr0, &trl, &trm, &trh, &fl, &fh); ! // return self; ! // } ! // - write:(TypedStream *)stream ! // { ! // [super write:stream]; ! // objc_write_types(stream, "[8c][8c][8c][8c][8c][8c]", &tr0, &trl, &trm, &trh, &fl, &fh); ! // return self; ! // } @end --- 613,668 ---- */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! [super encodeWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeDouble: _tr0 forKey: @"FOOMReverb8:tr0"]; ! [coder encodeDouble: _trl forKey: @"FOOMReverb8:trl"]; ! [coder encodeDouble: _trm forKey: @"FOOMReverb8:trm"]; ! [coder encodeDouble: _trh forKey: @"FOOMReverb8:trh"]; ! [coder encodeDouble: _fl forKey: @"FOOMReverb8:fl"]; ! [coder encodeDouble: _fh forKey: @"FOOMReverb8:fh"]; ! } ! else ! { ! [coder encodeValueOfObjCType: @encode(double) at: &_tr0]; ! [coder encodeValueOfObjCType: @encode(double) at: &_trl]; ! [coder encodeValueOfObjCType: @encode(double) at: &_trm]; ! [coder encodeValueOfObjCType: @encode(double) at: &_trh]; ! [coder encodeValueOfObjCType: @encode(double) at: &_fl]; ! [coder encodeValueOfObjCType: @encode(double) at: &_fh]; ! } ! ! return; ! } ! ! ! - (id) initWithCoder: (NSCoder *)coder ! { ! self = [super initWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! _tr0 = [coder decodeDoubleForKey: @"FOOMReverb8:tr0"]; ! _tr0 = [coder decodeDoubleForKey: @"FOOMReverb8:trl"]; ! _tr0 = [coder decodeDoubleForKey: @"FOOMReverb8:trm"]; ! _tr0 = [coder decodeDoubleForKey: @"FOOMReverb8:trh"]; ! _tr0 = [coder decodeDoubleForKey: @"FOOMReverb8:fl"]; ! _tr0 = [coder decodeDoubleForKey: @"FOOMReverb8:fh"]; ! } ! else ! { ! [coder decodeValueOfObjCType: @encode(double) at: &_tr0]; ! [coder decodeValueOfObjCType: @encode(double) at: &_trl]; ! [coder decodeValueOfObjCType: @encode(double) at: &_trm]; ! [coder decodeValueOfObjCType: @encode(double) at: &_trh]; ! [coder decodeValueOfObjCType: @encode(double) at: &_fl]; ! [coder decodeValueOfObjCType: @encode(double) at: &_fh]; ! } ! ! return self; ! } @end Index: FOOMReverb.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMReverb.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMReverb.m 6 Aug 2004 05:57:41 -0000 1.2 --- FOOMReverb.m 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 645,665 **** */ ! #if 0 // to be done ! ! - read:(TypedStream *)stream { ! [super read:stream]; ! objc_read_types(stream, "i[8c][8c]", &_channels, &_tr0, &_damp); ! return self; } ! - write:(TypedStream *)stream { ! [super write:stream]; ! objc_write_types(stream, "i[8c][8c]", &_channels, &_tr0, &_damp); ! return self; ! } ! #endif @end --- 645,688 ---- */ ! - (void) encodeWithCoder: (NSCoder *)coder { ! [super encodeWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeInt: _channels forKey: @"FOOMReverb:channels"]; ! [coder encodeDouble: _tr0 forKey: @"FOOMReverb:tr0"]; ! [coder encodeDouble: _damp forKey: @"FOOMReverb:damp"]; ! } ! else ! { ! [coder encodeValueOfObjCType: @encode(int) at: &_channels]; ! [coder encodeValueOfObjCType: @encode(double) at: &_tr0]; ! [coder encodeValueOfObjCType: @encode(double) at: &_damp]; ! } ! ! return; } ! ! - (id) initWithCoder: (NSCoder *)coder { ! self = [super initWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! _channels = [coder decodeIntForKey: @"FOOMReverb:channels"]; ! _tr0 = [coder decodeDoubleForKey: @"FOOMReverb:tr0"]; ! _damp = [coder decodeDoubleForKey: @"FOOMReverb:damp"]; ! } ! else ! { ! [coder decodeValueOfObjCType: @encode(int) at: &_channels]; ! [coder decodeValueOfObjCType: @encode(double) at: &_tr0]; ! [coder decodeValueOfObjCType: @encode(double) at: &_damp]; ! } ! ! return self; ! } @end Index: FOOMReverb8.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMReverb8.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMReverb8.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMReverb8.h 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 61,65 **** } filter8_t; ! @interface FOOMReverb8 : FOOEagerModule { NSMutableArray *_buffers; // statically typed --- 61,65 ---- } filter8_t; ! @interface FOOMReverb8 : FOOEagerModule <NSCoding> { NSMutableArray *_buffers; // statically typed Index: FOOMExpon.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMExpon.m,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FOOMExpon.m 14 Aug 2004 07:09:45 -0000 1.3 --- FOOMExpon.m 15 Aug 2004 17:42:37 -0000 1.4 *************** *** 39,44 **** #include <math.h> - #import <Foundation/NSKeyedArchiver.h> - @implementation FOOMExpon --- 39,42 ---- Index: FOOMNeg.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMNeg.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMNeg.m 31 Jul 2004 03:05:30 -0000 1.1 --- FOOMNeg.m 15 Aug 2004 17:42:37 -0000 1.2 *************** *** 37,40 **** --- 37,41 ---- #include "FOOMNeg.h" + @implementation FOOMNeg Index: FOOMReadBpf.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMReadBpf.m,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FOOMReadBpf.m 4 Aug 2004 06:20:31 -0000 1.3 --- FOOMReadBpf.m 15 Aug 2004 17:42:37 -0000 1.4 *************** *** 38,41 **** --- 38,42 ---- #include <FOO/FOOBreakpointFunction.h> + #define FIRST_TIME -1 *************** *** 207,227 **** */ ! #if 0 // to be done ! ! - read:(TypedStream *)stream { ! [super read:stream]; ! objc_read_types(stream, "@[8c]", &_substrate, &_beginT); ! return self; } ! - write:(TypedStream *)stream { ! [super write:stream]; ! objc_write_types(stream, "@[8c]", &_substrate, &_beginT); return self; } - #endif - @end --- 208,247 ---- */ ! - (void) encodeWithCoder: (NSCoder *)coder { ! [super encodeWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeObject: _substrate forKey: @"FOOMReadBpf:substrate"]; ! [coder encodeDouble: _beginT forKey: @"FOOMReadBpf:beginT"]; ! } ! else ! { ! [coder encodeObject: _substrate]; ! [coder encodeValueOfObjCType: @encode(double) at: &_beginT]; ! } ! ! return; } ! ! - (id) initWithCoder: (NSCoder *)coder { ! self = [super initWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! _substrate = RETAIN([coder decodeObjectForKey: @"FOOMReadBpf:substrate"]); ! _beginT = [coder decodeDoubleForKey: @"FOOMReadBpf:beginT"]; ! } ! else ! { ! _substrate = RETAIN([coder decodeObject]); ! [coder decodeValueOfObjCType: @encode(double) at: &_beginT]; ! } ! return self; } @end Index: FOOMReadSnd.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMReadSnd.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMReadSnd.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMReadSnd.h 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 39,47 **** #include <FOO/FOOEagerModule.h> #include <FOO/FOOSoundStream.h> #include <FOO/FOOSoundFile.h> #include <FOO/FOORegion.h> ! @interface FOOMReadSnd : FOOEagerModule { /* Substrate *substrate; */ --- 39,49 ---- #include <FOO/FOOEagerModule.h> + #include <FOO/FOOSubstrate.h> #include <FOO/FOOSoundStream.h> #include <FOO/FOOSoundFile.h> #include <FOO/FOORegion.h> ! ! @interface FOOMReadSnd : FOOEagerModule <NSCoding> { /* Substrate *substrate; */ *************** *** 53,57 **** } ! - initializeWith: substr; @end --- 55,59 ---- } ! - (id) initializeWith: (FOOSubstrate *) substr; @end Index: FOOMReverbOutput.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMReverbOutput.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMReverbOutput.m 31 Jul 2004 03:05:30 -0000 1.1 --- FOOMReverbOutput.m 15 Aug 2004 17:42:37 -0000 1.2 *************** *** 38,41 **** --- 38,42 ---- #include "FOOMReverb.h" + @implementation FOOMReverbOutput *************** *** 73,93 **** */ ! #if 0 // to be done ! ! - read:(TypedStream *)stream { ! [super read:stream]; ! objc_read_type(stream, "i", &_channel); ! return self; } ! - write:(TypedStream *)stream { ! [super write:stream]; ! objc_write_type(stream, "i", &_channel); ! return self; ! } ! #endif @end --- 74,109 ---- */ ! - (void) encodeWithCoder: (NSCoder *)coder { ! [super encodeWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeInt: _channel forKey: @"FOOMReverbOutput:channel"]; ! } ! else ! { ! [coder encodeValueOfObjCType: @encode(int) at: &_channel]; ! } ! ! return; } ! ! - (id) initWithCoder: (NSCoder *)coder { ! self = [super initWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! _channel = [coder decodeIntForKey: @"FOOMReverbOutput:channel"]; ! } ! else ! { ! [coder decodeValueOfObjCType: @encode(int) at: &_channel]; ! } ! ! return self; ! } @end Index: FOOMReadBpf.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMReadBpf.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMReadBpf.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMReadBpf.h 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 42,46 **** #include <FOO/FOOBreakpointFunction.h> ! @interface FOOMReadBpf : FOOEagerModule { FOOBreakpointFunction *_substrate; --- 42,46 ---- #include <FOO/FOOBreakpointFunction.h> ! @interface FOOMReadBpf : FOOEagerModule <NSCoding> { FOOBreakpointFunction *_substrate; Index: FOOMDirac.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMDirac.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMDirac.m 14 Aug 2004 07:09:45 -0000 1.2 --- FOOMDirac.m 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 37,42 **** #include "FOOMDirac.h" - #import <Foundation/NSKeyedArchiver.h> - @implementation FOOMDirac --- 37,40 ---- Index: FOOMReverbOutput.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMReverbOutput.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMReverbOutput.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMReverbOutput.h 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 40,44 **** #include <FOO/FOOModule.h> ! @interface FOOMReverbOutput : FOOModule { int _channel; --- 40,44 ---- #include <FOO/FOOModule.h> ! @interface FOOMReverbOutput : FOOModule <NSCoding> { int _channel; Index: FOOMConstant.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMConstant.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMConstant.m 13 Aug 2004 21:38:46 -0000 1.2 --- FOOMConstant.m 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 37,42 **** #include "FOOMConstant.h" - #import <Foundation/NSKeyedArchiver.h> - @implementation FOOMConstant --- 37,40 ---- Index: FOOMFof.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMFof.m,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FOOMFof.m 14 Aug 2004 07:09:45 -0000 1.3 --- FOOMFof.m 15 Aug 2004 17:42:37 -0000 1.4 *************** *** 40,45 **** #include <math.h> - #import <Foundation/NSKeyedArchiver.h> - static int --- 40,43 ---- Index: FOOMConstantBiquad.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMConstantBiquad.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMConstantBiquad.m 14 Aug 2004 07:09:45 -0000 1.2 --- FOOMConstantBiquad.m 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 39,44 **** #include <math.h> - #import <Foundation/NSKeyedArchiver.h> - #define INFINITE_TAIL 2147483647 // 2^31-1 samples => ~12 hours at 50 kHz --- 39,42 ---- Index: FOOMNoise.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMNoise.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMNoise.m 31 Jul 2004 03:05:30 -0000 1.1 --- FOOMNoise.m 15 Aug 2004 17:42:37 -0000 1.2 *************** *** 37,40 **** --- 37,41 ---- #include "FOOMNoise.h" + @implementation FOOMNoise *************** *** 88,104 **** */ ! // - read:(TypedStream *)stream ! // { ! // [super read:stream]; ! // objc_read_types(stream, "ii", &state, &init); ! // return self; ! // } ! // - write:(TypedStream *)stream ! // { ! // [super write:stream]; ! // objc_write_types(stream, "ii", &state, &init); ! // return self; ! // } @end --- 89,128 ---- */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! [super encodeWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeInt: _state forKey: @"FOOMNoise:state"]; ! [coder encodeInt: _init forKey: @"FOOMNoise:init"]; ! } ! else ! { ! [coder encodeValueOfObjCType: @encode(int) at: &_state]; ! [coder encodeValueOfObjCType: @encode(int) at: &_init]; ! } ! ! return; ! } ! ! ! - (id) initWithCoder: (NSCoder *)coder ! { ! self = [super initWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! _state = [coder decodeIntForKey: @"FOOMNoise:state"]; ! _init = [coder decodeIntForKey: @"FOOMNoise:init"]; ! } ! else ! { ! [coder decodeValueOfObjCType: @encode(int) at: &_state]; ! [coder decodeValueOfObjCType: @encode(int) at: &_init]; ! } ! ! return self; ! } @end Index: FOOMMath.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMMath.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMMath.m 15 Aug 2004 16:48:55 -0000 1.2 --- FOOMMath.m 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 37,42 **** #include "FOOMMath.h" - #import <Foundation/NSKeyedArchiver.h> - #define MAKE_CLASS_IMPL1(name, operation) \ --- 37,40 ---- Index: FOOMNoise.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMNoise.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMNoise.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMNoise.h 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 40,44 **** #include <FOO/FOOModule.h> ! @interface FOOMNoise : FOOModule { int _state; --- 40,44 ---- #include <FOO/FOOModule.h> ! @interface FOOMNoise : FOOModule <NSCoding> { int _state; Index: FOOMConstantTwoPoleTwoZero.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMConstantTwoPoleTwoZero.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMConstantTwoPoleTwoZero.m 14 Aug 2004 07:09:45 -0000 1.2 --- FOOMConstantTwoPoleTwoZero.m 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 39,44 **** #include <math.h> - #import <Foundation/NSKeyedArchiver.h> - #define INFINITE_TAIL 2147483647 // 2^31-1 samples => ~12 hours at 50 kHz --- 39,42 ---- Index: FOOMLine.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMLine.m,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FOOMLine.m 14 Aug 2004 07:09:45 -0000 1.3 --- FOOMLine.m 15 Aug 2004 17:42:37 -0000 1.4 *************** *** 37,42 **** #include "FOOMLine.h" - #import <Foundation/NSKeyedArchiver.h> - @implementation FOOMLine --- 37,40 ---- Index: FOOMBandlimitedNoise.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMBandlimitedNoise.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMBandlimitedNoise.m 14 Aug 2004 07:09:45 -0000 1.2 --- FOOMBandlimitedNoise.m 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 37,42 **** #include "FOOMBandlimitedNoise.h" - #import <Foundation/NSKeyedArchiver.h> - @implementation FOOMBandlimitedNoise --- 37,40 ---- Index: FOOMReverb.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMReverb.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMReverb.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMReverb.h 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 56,60 **** } filter_t; ! @interface FOOMReverb : FOOEagerModule { NSMutableArray *_buffers; // statically typed --- 56,60 ---- } filter_t; ! @interface FOOMReverb : FOOEagerModule <NSCoding> { NSMutableArray *_buffers; // statically typed Index: FOOMAdd.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMAdd.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMAdd.m 14 Aug 2004 07:09:45 -0000 1.2 --- FOOMAdd.m 15 Aug 2004 17:42:36 -0000 1.3 *************** *** 37,42 **** #include "FOOMAdd.h" - #import <Foundation/NSKeyedArchiver.h> - @implementation FOOMAdd --- 37,40 ---- Index: FOOMReadSnd.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMReadSnd.m,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FOOMReadSnd.m 6 Aug 2004 05:57:41 -0000 1.3 --- FOOMReadSnd.m 15 Aug 2004 17:42:37 -0000 1.4 *************** *** 37,44 **** #include "FOOMReadSnd.h" - @implementation FOOMReadSnd ! - initializeWith: substr { if ([substr isKindOfClass: [FOOSoundFile class]] == NO && --- 37,44 ---- #include "FOOMReadSnd.h" + @implementation FOOMReadSnd ! - (id) initializeWith: (FOOSubstrate *) substr { if ([substr isKindOfClass: [FOOSoundFile class]] == NO && *************** *** 138,158 **** */ ! #if 0 // to be done ! ! - read:(TypedStream *)stream { ! [super read:stream]; ! objc_read_types(stream, "@[8c]", &_substrate, &_beginT); ! return self; } ! - write:(TypedStream *)stream { ! [super write:stream]; ! objc_write_types(stream, "@[8c]", &_substrate, &_beginT); return self; } - #endif - @end --- 138,177 ---- */ ! - (void) encodeWithCoder: (NSCoder *)coder { ! [super encodeWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeObject: _substrate forKey: @"FOOMReadSnd:substrate"]; ! [coder encodeDouble: _beginT forKey: @"FOOMReadSnd:beginT"]; ! } ! else ! { ! [coder encodeObject: _substrate]; ! [coder encodeValueOfObjCType: @encode(double) at: &_beginT]; ! } ! ! return; } ! ! - (id) initWithCoder: (NSCoder *)coder { ! self = [super initWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! _substrate = RETAIN([coder decodeObjectForKey: @"FOOMReadSnd:substrate"]); ! _beginT = [coder decodeDoubleForKey: @"FOOMReadSnd:beginT"]; ! } ! else ! { ! _substrate = RETAIN([coder decodeObject]); ! [coder decodeValueOfObjCType: @encode(double) at: &_beginT]; ! } ! return self; } @end Index: FOOMGate.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMGate.m,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FOOMGate.m 14 Aug 2004 07:09:45 -0000 1.3 --- FOOMGate.m 15 Aug 2004 17:42:37 -0000 1.4 *************** *** 37,42 **** #include "FOOMGate.h" - #import <Foundation/NSKeyedArchiver.h> - @implementation FOOMGate --- 37,40 ---- Index: FOOMOscillator.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMOscillator.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMOscillator.m 13 Aug 2004 21:38:46 -0000 1.2 --- FOOMOscillator.m 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 34,41 **** /* $Id$ */ ! #import <Foundation/NSKeyedArchiver.h> #include <math.h> - #include "FOOMOscillator.h" --- 34,40 ---- /* $Id$ */ ! #include "FOOMOscillator.h" #include <math.h> Index: FOOMMul.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMMul.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMMul.m 31 Jul 2004 03:05:30 -0000 1.1 --- FOOMMul.m 15 Aug 2004 17:42:37 -0000 1.2 *************** *** 37,40 **** --- 37,41 ---- #include "FOOMMul.h" + @implementation FOOMMul Index: FOOMVariableTwoPole.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMVariableTwoPole.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMVariableTwoPole.m 31 Jul 2004 03:05:30 -0000 1.1 --- FOOMVariableTwoPole.m 15 Aug 2004 17:42:37 -0000 1.2 *************** *** 35,41 **** /* $Id$ */ - #include <math.h> #include "FOOMVariableTwoPole.h" @implementation FOOMVariableTwoPole --- 35,43 ---- /* $Id$ */ #include "FOOMVariableTwoPole.h" + #include <math.h> + + @implementation FOOMVariableTwoPole Index: FOOMFiltreVariableEtat.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMFiltreVariableEtat.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMFiltreVariableEtat.m 14 Aug 2004 07:09:45 -0000 1.2 --- FOOMFiltreVariableEtat.m 15 Aug 2004 17:42:37 -0000 1.3 *************** *** 39,44 **** #include <math.h> - #import <Foundation/NSKeyedArchiver.h> - @implementation FOOMFiltreVariableEtat --- 39,42 ---- |