You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(22) |
Aug
(270) |
Sep
|
Oct
|
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(8) |
Feb
(24) |
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
|
Aug
(4) |
Sep
|
Oct
|
Nov
(2) |
Dec
(2) |
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
(25) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(6) |
Oct
(3) |
Nov
(1) |
Dec
(14) |
| 2008 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
|
Mar
(31) |
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
(90) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
| 2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
|
From: Martin R. <ru...@us...> - 2004-08-15 20:30:24
|
Update of /cvsroot/foo/foo/libfoo/FOO In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19397/FOO Modified Files: FOOContext.h Log Message: added switch for archiving in binary/xml format Index: FOOContext.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/FOO/FOOContext.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FOOContext.h 14 Aug 2004 06:12:18 -0000 1.4 --- FOOContext.h 15 Aug 2004 20:30:15 -0000 1.5 *************** *** 91,94 **** --- 91,95 ---- - (FOOContext *) initFromArchive: (NSString *)path withKey: (NSString *)key; - (BOOL) archiveToFile: (NSString *)path; + - (BOOL) archiveToFile: (NSString *)path xmlFormat: (BOOL)xml; - (FOOContext *) initWithChans: (int)n; |
|
From: Martin R. <ru...@us...> - 2004-08-15 20:30:24
|
Update of /cvsroot/foo/foo/libfoo/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19397/src Modified Files: FOOContext.m Log Message: added switch for archiving in binary/xml format Index: FOOContext.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOContext.m,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FOOContext.m 14 Aug 2004 06:12:34 -0000 1.5 --- FOOContext.m 15 Aug 2004 20:30:16 -0000 1.6 *************** *** 35,38 **** --- 35,42 ---- /* $Id$ */ + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif + #include <signal.h> *************** *** 113,116 **** --- 117,126 ---- - (BOOL) archiveToFile: (NSString *)path { + return [self archiveToFile: path xmlFormat: NO]; + } + + + - (BOOL) archiveToFile: (NSString *)path xmlFormat: (BOOL)xml + { NSMutableData *data; NSKeyedArchiver *archiver; *************** *** 119,124 **** data = [NSMutableData data]; archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData: data]; ! // use XML format ! [archiver setOutputFormat: NSPropertyListXMLFormat_v1_0]; [archiver encodeObject: self forKey: @"FOOContext"]; [archiver finishEncoding]; --- 129,148 ---- data = [NSMutableData data]; archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData: data]; ! ! if (xml == YES) ! { ! [archiver setOutputFormat: NSPropertyListXMLFormat_v1_0]; ! } ! else ! { ! #ifdef FOO_GNUSTEP ! [archiver setOutputFormat: NSPropertyListGNUstepBinaryFormat]; ! #elif FOO_COCOA ! [archiver setOutputFormat: NSPropertyListBinaryFormat_v1_0]; ! #else ! #error Neither GNUSTEP nor COCOA Foundation present. ! #endif ! } ! [archiver encodeObject: self forKey: @"FOOContext"]; [archiver finishEncoding]; |
|
From: Martin R. <ru...@us...> - 2004-08-15 17:51:59
|
Update of /cvsroot/foo/foo/libfoo/FOO In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27387 Modified Files: FOOModule.h Log Message: added #import for NSKeyedArchiver.h in order to get rid of all the imports in subclasses Index: FOOModule.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/FOO/FOOModule.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FOOModule.h 13 Aug 2004 21:36:50 -0000 1.3 --- FOOModule.h 15 Aug 2004 17:51:48 -0000 1.4 *************** *** 45,48 **** --- 45,49 ---- #import <Foundation/NSArray.h> #import <Foundation/NSString.h> + #import <Foundation/NSKeyedArchiver.h> @class FOONilModule; |
|
From: Martin R. <ru...@us...> - 2004-08-15 17:50:52
|
Update of /cvsroot/foo/foo/libfoo/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27247 Modified Files: FOOEagerModule.m FOOModule.m Log Message: removed unnecessary #import of NSKeyedArchiver.h> Index: FOOEagerModule.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOEagerModule.m,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FOOEagerModule.m 13 Aug 2004 21:38:01 -0000 1.3 --- FOOEagerModule.m 15 Aug 2004 17:50:44 -0000 1.4 *************** *** 39,44 **** #include "FOO/FOOBuffer.h" - #import <Foundation/NSKeyedArchiver.h> - @implementation FOOEagerModule --- 39,42 ---- Index: FOOModule.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOModule.m,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FOOModule.m 13 Aug 2004 21:38:01 -0000 1.5 --- FOOModule.m 15 Aug 2004 17:50:44 -0000 1.6 *************** *** 41,50 **** #include "FOO/FOONilModule.h" - #import <Foundation/NSKeyedArchiver.h> - // static FOONilModule *_nilModule = nil; - @implementation FOOModule --- 41,47 ---- |
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 ---- |
|
From: Martin R. <ru...@us...> - 2004-08-15 16:49:04
|
Update of /cvsroot/foo/foo/libfoo/modules/orthodox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17872/modules/orthodox Modified Files: FOOMLookup.h FOOMLookup.m FOOMMath.h FOOMMath.m Log Message: continued with adding archving methods Index: FOOMLookup.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMLookup.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMLookup.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMLookup.h 15 Aug 2004 16:48:55 -0000 1.3 *************** *** 42,46 **** #include <FOO/FOOLookupTable.h> ! @interface FOOMLookup : FOOEagerModule { /* Substrate *substrate; // statically typed */ --- 42,46 ---- #include <FOO/FOOLookupTable.h> ! @interface FOOMLookup : FOOEagerModule <NSCoding> { /* Substrate *substrate; // statically typed */ Index: FOOMMath.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMMath.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMMath.m 31 Jul 2004 03:05:30 -0000 1.1 --- FOOMMath.m 15 Aug 2004 16:48:55 -0000 1.2 *************** *** 37,40 **** --- 37,42 ---- #include "FOOMMath.h" + #import <Foundation/NSKeyedArchiver.h> + #define MAKE_CLASS_IMPL1(name, operation) \ Index: FOOMLookup.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMLookup.m,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FOOMLookup.m 6 Aug 2004 05:57:41 -0000 1.3 --- FOOMLookup.m 15 Aug 2004 16:48:55 -0000 1.4 *************** *** 36,43 **** --- 36,47 ---- #include "FOOMLookup.h" + #include <FOO/FOOSoundFile.h> #include <FOO/FOOSoundStream.h> #include <FOO/FOORegion.h> + #import <Foundation/NSKeyedArchiver.h> + + #define SAMPLE_BUFFER_SIZE 1024 // should be several times the taps size *************** *** 182,207 **** */ ! // - awake ! // { ! // [super awake]; ! // samples = NSZoneCalloc([self zone], count, sizeof(sample_t)); ! // table = [GlobalsManager getSineXoverXTable:taps]; ! // return self; ! // } ! // - read:(TypedStream *)stream ! // { ! // [super read:stream]; ! // objc_read_types(stream, "@iii", &substrate, &offset, &count, &taps); ! // return self; ! // } ! // - write:(TypedStream *)stream ! // { ! // [super write:stream]; ! // objc_write_types(stream, "@iii", &substrate, &offset, &count, &taps); ! // return self; ! // } @end - --- 186,236 ---- */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! [super encodeWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeObject: _substrate forKey: @"FOOMLookup:substrate"]; ! [coder encodeInt: _offset forKey: @"FOOMLookup:offset"]; ! [coder encodeInt: _count forKey: @"FOOMLookup:count"]; ! [coder encodeInt: _taps forKey: @"FOOMLookup:taps"]; ! } ! else ! { ! [coder encodeObject: _substrate]; ! [coder encodeValueOfObjCType: @encode(int) at: &_offset]; ! [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: @"FOOMLookup:substrate"]); ! _offset = [coder decodeIntForKey: @"FOOMLookup:offset"]; ! _count = [coder decodeIntForKey: @"FOOMLookup:count"]; ! _taps = [coder decodeIntForKey: @"FOOMLookup:taps"]; ! } ! else ! { ! _substrate = RETAIN([coder decodeObject]); ! [coder decodeValueOfObjCType: @encode(int) at: &_offset]; ! [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; ! } @end Index: FOOMMath.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMMath.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMMath.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMMath.h 15 Aug 2004 16:48:55 -0000 1.3 *************** *** 65,78 **** @end ! #define MAKE_CLASS_INT1(name) \ @interface name : FOOMMath1 \ ! { \ ! } \ @end ! #define MAKE_CLASS_INT2(name) \ @interface name : FOOMMath2 \ ! { \ ! } \ @end --- 65,78 ---- @end ! #define MAKE_CLASS_INT1(name) \ @interface name : FOOMMath1 \ ! { \ ! } \ @end ! #define MAKE_CLASS_INT2(name) \ @interface name : FOOMMath2 \ ! { \ ! } \ @end |
|
From: Martin R. <ru...@us...> - 2004-08-15 16:42:30
|
Update of /cvsroot/foo/foo/elkfoo/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16977 Modified Files: modules.m Log Message: changed class name of 'BandlimittedNoise' to 'BandlimitedNoise' Index: modules.m =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/src/modules.m,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** modules.m 13 Aug 2004 21:34:39 -0000 1.4 --- modules.m 15 Aug 2004 16:42:21 -0000 1.5 *************** *** 286,290 **** seed = A_Make_Seed(); } ! module = A_Make_Module([FOOMBandlimittedNoise class]); [IdOf(module) initializeTaps:taps seed:seed]; [IdOf(module) connectInput:0 to:input]; --- 286,290 ---- seed = A_Make_Seed(); } ! module = A_Make_Module([FOOMBandlimitedNoise class]); [IdOf(module) initializeTaps:taps seed:seed]; [IdOf(module) connectInput:0 to:input]; |
|
From: Gerhard E. <gu...@us...> - 2004-08-14 15:57:26
|
Update of /cvsroot/foo/foo/elkfoo/scm/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1899/scm/kernel Modified Files: elkfoo.scm Log Message: added foo:basename and foo:dirname Index: elkfoo.scm =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/scm/kernel/elkfoo.scm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** elkfoo.scm 7 Aug 2004 21:26:11 -0000 1.1 --- elkfoo.scm 14 Aug 2004 15:57:18 -0000 1.2 *************** *** 291,295 **** (loop (1- len)))) ! (define (foo:synthesize channels duration srate filename fileformat filetype thunk) (let ((c (make-context channels)) --- 291,300 ---- (loop (1- len)))) ! (define (foo:basename path) ! (substring path (+ (foo:string-rindex path #\/) 1) (string-length path))) ! ! (define (foo:dirname path) ! (substring path 0 (foo:string-rindex path #\/))) ! (define (foo:synthesize channels duration srate filename fileformat filetype thunk) (let ((c (make-context channels)) |
Update of /cvsroot/foo/foo/libfoo/modules/orthodox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30235 Modified Files: FOOMAdd.h FOOMAdd.m FOOMBandlimitedNoise.h FOOMBandlimitedNoise.m FOOMConstantBiquad.h FOOMConstantBiquad.m FOOMConstantTwoPole.h FOOMConstantTwoPole.m FOOMConstantTwoPoleTwoZero.h FOOMConstantTwoPoleTwoZero.m FOOMDiff.h FOOMDiff.m FOOMDirac.h FOOMDirac.m FOOMDiv.h FOOMDiv.m FOOMExpon.h FOOMExpon.m FOOMFiltreVariableEtat.h FOOMFiltreVariableEtat.m FOOMFof.h FOOMFof.m FOOMGate.h FOOMGate.m FOOMInteg.h FOOMInteg.m FOOMLine.h FOOMLine.m Log Message: started with adding archiving methods Index: FOOMInteg.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMInteg.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMInteg.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMInteg.h 14 Aug 2004 07:09:45 -0000 1.3 *************** *** 40,44 **** #include <FOO/FOOModule.h> ! @interface FOOMInteg : FOOModule { double _last; --- 40,44 ---- #include <FOO/FOOModule.h> ! @interface FOOMInteg : FOOModule <NSCoding> { double _last; Index: FOOMInteg.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMInteg.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMInteg.m 31 Jul 2004 03:05:30 -0000 1.1 --- FOOMInteg.m 14 Aug 2004 07:09:45 -0000 1.2 *************** *** 37,40 **** --- 37,43 ---- #include "FOOMInteg.h" + #import <Foundation/NSKeyedArchiver.h> + + @implementation FOOMInteg *************** *** 86,88 **** --- 89,111 ---- } + + /* + * archiving methods + */ + + - (void) encodeWithCoder: (NSCoder *)coder + { + [super encodeWithCoder: coder]; + + return; + } + + + - (FOOMInteg *) initWithCoder: (NSCoder *)coder + { + self = [super initWithCoder: coder]; + + return self; + } + @end Index: FOOMConstantTwoPole.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMConstantTwoPole.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMConstantTwoPole.m 31 Jul 2004 03:05:29 -0000 1.1 --- FOOMConstantTwoPole.m 14 Aug 2004 07:09:45 -0000 1.2 *************** *** 35,41 **** /* $Id$ */ - #include <math.h> #include "FOOMConstantTwoPole.h" #define INFINITE_TAIL 2147483647 // 2^31-1 samples => ~12 hours at 50 kHz --- 35,45 ---- /* $Id$ */ #include "FOOMConstantTwoPole.h" + #include <math.h> + + #import <Foundation/NSKeyedArchiver.h> + + #define INFINITE_TAIL 2147483647 // 2^31-1 samples => ~12 hours at 50 kHz *************** *** 144,160 **** */ ! // - read:(TypedStream *)stream ! // { ! // [super read:stream]; ! // objc_read_types(stream, "ddddddd", &c1, &c2, &c3, &y1, &y2, ¢erf, &bandw); ! // return self; ! // } ! // - write:(TypedStream *)stream ! // { ! // [super write:stream]; ! // objc_read_types(stream, "ddddddd", &c1, &c2, &c3, &y1, &y2, ¢erf, &bandw); ! // return self; ! // } @end --- 148,207 ---- */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! [super encodeWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeDouble: _c1 forKey: @"FOOMConstantTwoPole:c1"]; ! [coder encodeDouble: _c2 forKey: @"FOOMConstantTwoPole:c2"]; ! [coder encodeDouble: _c3 forKey: @"FOOMConstantTwoPole:c3"]; ! [coder encodeDouble: _y1 forKey: @"FOOMConstantTwoPole:y1"]; ! [coder encodeDouble: _y2 forKey: @"FOOMConstantTwoPole:y2"]; ! [coder encodeDouble: _centerf forKey: @"FOOMConstantTwoPole:centerf"]; ! [coder encodeDouble: _bandw forKey: @"FOOMConstantTwoPole:bandw"]; ! } ! else ! { ! [coder encodeValueOfObjCType: @encode(double) at: &_c1]; ! [coder encodeValueOfObjCType: @encode(double) at: &_c2]; ! [coder encodeValueOfObjCType: @encode(double) at: &_c3]; ! [coder encodeValueOfObjCType: @encode(double) at: &_y1]; ! [coder encodeValueOfObjCType: @encode(double) at: &_y2]; ! [coder encodeValueOfObjCType: @encode(double) at: &_centerf]; ! [coder encodeValueOfObjCType: @encode(double) at: &_bandw]; ! } ! ! return; ! } ! ! ! - (FOOMConstantTwoPole *) initWithCoder: (NSCoder *)coder ! { ! self = [super initWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! _c1 = [coder decodeDoubleForKey: @"FOOMConstantTwoPole:c1"]; ! _c2 = [coder decodeDoubleForKey: @"FOOMConstantTwoPole:c2"]; ! _c3 = [coder decodeDoubleForKey: @"FOOMConstantTwoPole:c3"]; ! _y1 = [coder decodeDoubleForKey: @"FOOMConstantTwoPole:y1"]; ! _y2 = [coder decodeDoubleForKey: @"FOOMConstantTwoPole:y2"]; ! _centerf = [coder decodeDoubleForKey: @"FOOMConstantTwoPole:centerf"]; ! _bandw = [coder decodeDoubleForKey: @"FOOMConstantTwoPole:bandw"]; ! } ! else ! { ! [coder decodeValueOfObjCType: @encode(double) at: &_c1]; ! [coder decodeValueOfObjCType: @encode(double) at: &_c2]; ! [coder decodeValueOfObjCType: @encode(double) at: &_c3]; ! [coder decodeValueOfObjCType: @encode(double) at: &_y1]; ! [coder decodeValueOfObjCType: @encode(double) at: &_y2]; ! [coder decodeValueOfObjCType: @encode(double) at: &_centerf]; ! [coder decodeValueOfObjCType: @encode(double) at: &_bandw]; ! } ! ! return self; ! } @end Index: FOOMDiv.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMDiv.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMDiv.m 31 Jul 2004 03:05:29 -0000 1.1 --- FOOMDiv.m 14 Aug 2004 07:09:45 -0000 1.2 *************** *** 37,40 **** --- 37,43 ---- #include "FOOMDiv.h" + #import <Foundation/NSKeyedArchiver.h> + + @implementation FOOMDiv *************** *** 83,85 **** --- 86,108 ---- } + + /* + * archiving methods + */ + + - (void) encodeWithCoder: (NSCoder *)coder + { + [super encodeWithCoder: coder]; + + return; + } + + + - (FOOMDiv *) initWithCoder: (NSCoder *)coder + { + self = [super initWithCoder: coder]; + + return self; + } + @end Index: FOOMDiff.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMDiff.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMDiff.m 31 Jul 2004 03:05:29 -0000 1.1 --- FOOMDiff.m 14 Aug 2004 07:09:45 -0000 1.2 *************** *** 37,40 **** --- 37,43 ---- #include "FOOMDiff.h" + #import <Foundation/NSKeyedArchiver.h> + + @implementation FOOMDiff *************** *** 83,85 **** --- 86,108 ---- } + + /* + * archiving methods + */ + + - (void) encodeWithCoder: (NSCoder *)coder + { + [super encodeWithCoder: coder]; + + return; + } + + + - (FOOMDiff *) initWithCoder: (NSCoder *)coder + { + self = [super initWithCoder: coder]; + + return self; + } + @end Index: FOOMDiff.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMDiff.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMDiff.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMDiff.h 14 Aug 2004 07:09:45 -0000 1.3 *************** *** 40,44 **** #include <FOO/FOOModule.h> ! @interface FOOMDiff : FOOModule { double _last; --- 40,44 ---- #include <FOO/FOOModule.h> ! @interface FOOMDiff : FOOModule <NSCoding> { double _last; Index: FOOMDiv.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMDiv.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMDiv.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMDiv.h 14 Aug 2004 07:09:45 -0000 1.3 *************** *** 40,44 **** #include <FOO/FOOModule.h> ! @interface FOOMDiv : FOOModule { } --- 40,44 ---- #include <FOO/FOOModule.h> ! @interface FOOMDiv : FOOModule <NSCoding> { } Index: FOOMAdd.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMAdd.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMAdd.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMAdd.h 14 Aug 2004 07:09:45 -0000 1.3 *************** *** 40,44 **** #include <FOO/FOOModule.h> ! @interface FOOMAdd : FOOModule { } --- 40,44 ---- #include <FOO/FOOModule.h> ! @interface FOOMAdd : FOOModule <NSCoding> { } Index: FOOMExpon.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMExpon.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMExpon.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMExpon.h 14 Aug 2004 07:09:45 -0000 1.3 *************** *** 40,44 **** #include <FOO/FOOEagerModule.h> ! @interface FOOMExpon : FOOEagerModule { double _factor; --- 40,44 ---- #include <FOO/FOOEagerModule.h> ! @interface FOOMExpon : FOOEagerModule <NSCoding> { double _factor; Index: FOOMConstantTwoPoleTwoZero.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMConstantTwoPoleTwoZero.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMConstantTwoPoleTwoZero.m 31 Jul 2004 03:05:29 -0000 1.1 --- FOOMConstantTwoPoleTwoZero.m 14 Aug 2004 07:09:45 -0000 1.2 *************** *** 35,41 **** /* $Id$ */ - #include <math.h> #include "FOOMConstantTwoPoleTwoZero.h" #define INFINITE_TAIL 2147483647 // 2^31-1 samples => ~12 hours at 50 kHz --- 35,45 ---- /* $Id$ */ #include "FOOMConstantTwoPoleTwoZero.h" + #include <math.h> + + #import <Foundation/NSKeyedArchiver.h> + + #define INFINITE_TAIL 2147483647 // 2^31-1 samples => ~12 hours at 50 kHz *************** *** 139,155 **** */ ! // - read:(TypedStream *)stream ! // { ! // [super read:stream]; ! // objc_read_types(stream, "dddddd", &c0, &c1, &c2, &d0, &d1, &d2); ! // return self; ! // } ! // - write:(TypedStream *)stream ! // { ! // [super write:stream]; ! // objc_read_types(stream, "dddddd", &c0, &c1, &c2, &d0, &d1, &d2); ! // return self; ! // } @end --- 143,198 ---- */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! [super encodeWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeDouble: _c0 forKey: @"FOOMConstantTwoPoleTwoZero:c0"]; ! [coder encodeDouble: _c1 forKey: @"FOOMConstantTwoPoleTwoZero:c1"]; ! [coder encodeDouble: _c2 forKey: @"FOOMConstantTwoPoleTwoZero:c2"]; ! [coder encodeDouble: _d0 forKey: @"FOOMConstantTwoPoleTwoZero:d0"]; ! [coder encodeDouble: _d1 forKey: @"FOOMConstantTwoPoleTwoZero:d1"]; ! [coder encodeDouble: _d2 forKey: @"FOOMConstantTwoPoleTwoZero:d2"]; ! } ! else ! { ! [coder encodeValueOfObjCType: @encode(double) at: &_c0]; ! [coder encodeValueOfObjCType: @encode(double) at: &_c1]; ! [coder encodeValueOfObjCType: @encode(double) at: &_c2]; ! [coder encodeValueOfObjCType: @encode(double) at: &_d0]; ! [coder encodeValueOfObjCType: @encode(double) at: &_d1]; ! [coder encodeValueOfObjCType: @encode(double) at: &_d2]; ! } ! ! return; ! } ! ! ! - (FOOMConstantTwoPoleTwoZero *) initWithCoder: (NSCoder *)coder ! { ! self = [super initWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! _c0 = [coder decodeDoubleForKey: @"FOOMConstantTwoPoleTwoZero:c0"]; ! _c1 = [coder decodeDoubleForKey: @"FOOMConstantTwoPoleTwoZero:c1"]; ! _c2 = [coder decodeDoubleForKey: @"FOOMConstantTwoPoleTwoZero:c2"]; ! _d0 = [coder decodeDoubleForKey: @"FOOMConstantTwoPoleTwoZero:d0"]; ! _d1 = [coder decodeDoubleForKey: @"FOOMConstantTwoPoleTwoZero:d1"]; ! _d2 = [coder decodeDoubleForKey: @"FOOMConstantTwoPoleTwoZero:d2"]; ! } ! else ! { ! [coder decodeValueOfObjCType: @encode(double) at: &_c0]; ! [coder decodeValueOfObjCType: @encode(double) at: &_c1]; ! [coder decodeValueOfObjCType: @encode(double) at: &_c2]; ! [coder decodeValueOfObjCType: @encode(double) at: &_d0]; ! [coder decodeValueOfObjCType: @encode(double) at: &_d1]; ! [coder decodeValueOfObjCType: @encode(double) at: &_d2]; ! } ! ! return self; ! } @end Index: FOOMExpon.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMExpon.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMExpon.m 6 Aug 2004 05:57:41 -0000 1.2 --- FOOMExpon.m 14 Aug 2004 07:09:45 -0000 1.3 *************** *** 35,41 **** /* $Id$ */ - #include <math.h> #include "FOOMExpon.h" @implementation FOOMExpon --- 35,45 ---- /* $Id$ */ #include "FOOMExpon.h" + #include <math.h> + + #import <Foundation/NSKeyedArchiver.h> + + @implementation FOOMExpon *************** *** 146,170 **** */ ! // - read:(TypedStream *)stream ! // { ! // [super read:stream]; ! // objc_read_types(stream, "[8c][8c][8c][8c]", ! // &beginT, ! // &endT, ! // &startV, ! // &endV); ! // return self; ! // } ! // - write:(TypedStream *)stream ! // { ! // [super write:stream]; ! // objc_write_types(stream, "[8c][8c][8c][8c]", ! // &beginT, ! // &endT, ! // &startV, ! // &endV); ! // return self; ! // } @end --- 150,197 ---- */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! [super encodeWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeDouble: _beginT forKey: @"FOOMExpon:beginT"]; ! [coder encodeDouble: _endT forKey: @"FOOMExpon:endT"]; ! [coder encodeDouble: _startV forKey: @"FOOMExpon:startV"]; ! [coder encodeDouble: _endV forKey: @"FOOMExpon:endV"]; ! } ! else ! { ! [coder encodeValueOfObjCType: @encode(double) at: &_beginT]; ! [coder encodeValueOfObjCType: @encode(double) at: &_endT]; ! [coder encodeValueOfObjCType: @encode(double) at: &_startV]; ! [coder encodeValueOfObjCType: @encode(double) at: &_endV]; ! } ! ! return; ! } ! ! ! - (FOOMExpon *) initWithCoder: (NSCoder *)coder ! { ! self = [super initWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! _beginT = [coder decodeDoubleForKey: @"FOOMExpon:beginT"]; ! _endT = [coder decodeDoubleForKey: @"FOOMExpon:endT"]; ! _startV = [coder decodeDoubleForKey: @"FOOMExpon:startV"]; ! _endV = [coder decodeDoubleForKey: @"FOOMExpon:endV"]; ! } ! else ! { ! [coder decodeValueOfObjCType: @encode(double) at: &_beginT]; ! [coder decodeValueOfObjCType: @encode(double) at: &_endT]; ! [coder decodeValueOfObjCType: @encode(double) at: &_startV]; ! [coder decodeValueOfObjCType: @encode(double) at: &_endV]; ! } ! ! return self; ! } @end Index: FOOMConstantTwoPoleTwoZero.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMConstantTwoPoleTwoZero.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMConstantTwoPoleTwoZero.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMConstantTwoPoleTwoZero.h 14 Aug 2004 07:09:45 -0000 1.3 *************** *** 40,44 **** #include <FOO/FOOEagerModule.h> ! @interface FOOMConstantTwoPoleTwoZero : FOOEagerModule { double _c0, _c1, _c2; --- 40,44 ---- #include <FOO/FOOEagerModule.h> ! @interface FOOMConstantTwoPoleTwoZero : FOOEagerModule <NSCoding> { double _c0, _c1, _c2; Index: FOOMConstantTwoPole.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMConstantTwoPole.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMConstantTwoPole.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMConstantTwoPole.h 14 Aug 2004 07:09:45 -0000 1.3 *************** *** 40,44 **** #include <FOO/FOOEagerModule.h> ! @interface FOOMConstantTwoPole : FOOEagerModule { double _c1, _c2, _c3; --- 40,44 ---- #include <FOO/FOOEagerModule.h> ! @interface FOOMConstantTwoPole : FOOEagerModule <NSCoding> { double _c1, _c2, _c3; Index: FOOMDirac.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMDirac.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMDirac.m 31 Jul 2004 03:05:29 -0000 1.1 --- FOOMDirac.m 14 Aug 2004 07:09:45 -0000 1.2 *************** *** 37,40 **** --- 37,43 ---- #include "FOOMDirac.h" + #import <Foundation/NSKeyedArchiver.h> + + @implementation FOOMDirac *************** *** 90,106 **** */ ! // - read:(TypedStream *)stream ! // { ! // [super read:stream]; ! // objc_read_types(stream, "[8c][4c]", &timeT, &litude); ! // return self; ! // } ! // - write:(TypedStream *)stream ! // { ! // [super write:stream]; ! // objc_write_types(stream, "[8c][4c]", &timeT, &litude); ! // return self; ! // } @end --- 93,132 ---- */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! [super encodeWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeDouble: _timeT forKey: @"FOOMDirac:timeT"]; ! ENCODE_KEYED_SAMPLE_T(_amplitude, @"FOOMDirac:amplitude") ! } ! else ! { ! [coder encodeValueOfObjCType: @encode(double) at: &_timeT]; ! ENCODE_UNKEYED_SAMPLE_T(_amplitude) ! } ! ! return; ! } ! ! ! - (FOOMDirac *) initWithCoder: (NSCoder *)coder ! { ! self = [super initWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! _timeT = [coder decodeDoubleForKey: @"FOOMDirac:timeT"]; ! DECODE_KEYED_SAMPLE_T(_amplitude, @"FOOMDirac:amplitude") ! } ! else ! { ! [coder decodeValueOfObjCType: @encode(double) at: &_timeT]; ! DECODE_UNKEYED_SAMPLE_T(_amplitude) ! } ! ! return self; ! } @end Index: FOOMDirac.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMDirac.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMDirac.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMDirac.h 14 Aug 2004 07:09:45 -0000 1.3 *************** *** 40,44 **** #include <FOO/FOOModule.h> ! @interface FOOMDirac : FOOModule { double _timeT; --- 40,44 ---- #include <FOO/FOOModule.h> ! @interface FOOMDirac : FOOModule <NSCoding> { double _timeT; Index: FOOMFof.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMFof.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMFof.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMFof.h 14 Aug 2004 07:09:45 -0000 1.3 *************** *** 115,119 **** } fof_t; ! @interface FOOMFof : FOOEagerModule { fof_t _fof; --- 115,119 ---- } fof_t; ! @interface FOOMFof : FOOEagerModule <NSCoding> { fof_t _fof; Index: FOOMFof.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMFof.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMFof.m 6 Aug 2004 05:57:41 -0000 1.2 --- FOOMFof.m 14 Aug 2004 07:09:45 -0000 1.3 *************** *** 35,42 **** /* $Id$ */ #include <stdlib.h> #include <math.h> ! #include "FOOMFof.h" --- 35,44 ---- /* $Id$ */ + #include "FOOMFof.h" + #include <stdlib.h> #include <math.h> ! #import <Foundation/NSKeyedArchiver.h> *************** *** 482,484 **** --- 484,506 ---- } + + /* + * archiving methods + */ + + - (void) encodeWithCoder: (NSCoder *)coder + { + [super encodeWithCoder: coder]; + + return; + } + + + - (FOOMFof *) initWithCoder: (NSCoder *)coder + { + self = [super initWithCoder: coder]; + + return self; + } + @end Index: FOOMConstantBiquad.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMConstantBiquad.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMConstantBiquad.m 31 Jul 2004 03:05:29 -0000 1.1 --- FOOMConstantBiquad.m 14 Aug 2004 07:09:45 -0000 1.2 *************** *** 35,41 **** /* $Id$ */ - #include <math.h> #include "FOOMConstantBiquad.h" #define INFINITE_TAIL 2147483647 // 2^31-1 samples => ~12 hours at 50 kHz --- 35,45 ---- /* $Id$ */ #include "FOOMConstantBiquad.h" + #include <math.h> + + #import <Foundation/NSKeyedArchiver.h> + + #define INFINITE_TAIL 2147483647 // 2^31-1 samples => ~12 hours at 50 kHz *************** *** 152,168 **** */ ! // - read:(TypedStream *)stream ! // { ! // [super read:stream]; ! // objc_read_types(stream, "ddddd", &d0, &d1, &d2, &c0, &c1); ! // return self; ! // } ! // - write:(TypedStream *)stream ! // { ! // [super write:stream]; ! // objc_read_types(stream, "ddddd", &d0, &d1, &d2, &c0, &c1); ! // return self; ! // } @end --- 156,207 ---- */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! [super encodeWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeDouble: _c0 forKey: @"FOOMConstantBiquad:c0"]; ! [coder encodeDouble: _c1 forKey: @"FOOMConstantBiquad:c1"]; ! [coder encodeDouble: _d0 forKey: @"FOOMConstantBiquad:d0"]; ! [coder encodeDouble: _d1 forKey: @"FOOMConstantBiquad:d1"]; ! [coder encodeDouble: _d2 forKey: @"FOOMConstantBiquad:d2"]; ! } ! else ! { ! [coder encodeValueOfObjCType: @encode(double) at: &_c0]; ! [coder encodeValueOfObjCType: @encode(double) at: &_c1]; ! [coder encodeValueOfObjCType: @encode(double) at: &_d0]; ! [coder encodeValueOfObjCType: @encode(double) at: &_d1]; ! [coder encodeValueOfObjCType: @encode(double) at: &_d2]; ! } ! ! return; ! } ! ! ! - (FOOMConstantBiquad *) initWithCoder: (NSCoder *)coder ! { ! self = [super initWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! _c0 = [coder decodeDoubleForKey: @"FOOMConstantBiquad:c0"]; ! _c1 = [coder decodeDoubleForKey: @"FOOMConstantBiquad:c1"]; ! _d0 = [coder decodeDoubleForKey: @"FOOMConstantBiquad:d0"]; ! _d1 = [coder decodeDoubleForKey: @"FOOMConstantBiquad:d1"]; ! _d2 = [coder decodeDoubleForKey: @"FOOMConstantBiquad:d2"]; ! } ! else ! { ! [coder decodeValueOfObjCType: @encode(double) at: &_c0]; ! [coder decodeValueOfObjCType: @encode(double) at: &_c1]; ! [coder decodeValueOfObjCType: @encode(double) at: &_d0]; ! [coder decodeValueOfObjCType: @encode(double) at: &_d1]; ! [coder decodeValueOfObjCType: @encode(double) at: &_d2]; ! } ! ! return self; ! } @end Index: FOOMFiltreVariableEtat.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMFiltreVariableEtat.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMFiltreVariableEtat.m 31 Jul 2004 03:05:29 -0000 1.1 --- FOOMFiltreVariableEtat.m 14 Aug 2004 07:09:45 -0000 1.2 *************** *** 35,41 **** /* $Id$ */ - #include <math.h> #include "FOOMFiltreVariableEtat.h" @implementation FOOMFiltreVariableEtat --- 35,45 ---- /* $Id$ */ #include "FOOMFiltreVariableEtat.h" + #include <math.h> + + #import <Foundation/NSKeyedArchiver.h> + + @implementation FOOMFiltreVariableEtat *************** *** 129,131 **** --- 133,155 ---- } + + /* + * archiving methods + */ + + - (void) encodeWithCoder: (NSCoder *)coder + { + [super encodeWithCoder: coder]; + + return; + } + + + - (FOOMFiltreVariableEtat *) initWithCoder: (NSCoder *)coder + { + self = [super initWithCoder: coder]; + + return self; + } + @end Index: FOOMLine.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMLine.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMLine.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMLine.h 14 Aug 2004 07:09:45 -0000 1.3 *************** *** 40,44 **** #include <FOO/FOOEagerModule.h> ! @interface FOOMLine : FOOEagerModule { double _origin; --- 40,44 ---- #include <FOO/FOOEagerModule.h> ! @interface FOOMLine : FOOEagerModule <NSCoding> { double _origin; Index: FOOMConstantBiquad.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMConstantBiquad.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMConstantBiquad.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMConstantBiquad.h 14 Aug 2004 07:09:45 -0000 1.3 *************** *** 40,44 **** #include <FOO/FOOEagerModule.h> ! @interface FOOMConstantBiquad : FOOEagerModule { double _d0, _d1, _d2; --- 40,44 ---- #include <FOO/FOOEagerModule.h> ! @interface FOOMConstantBiquad : FOOEagerModule <NSCoding> { double _d0, _d1, _d2; Index: FOOMLine.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMLine.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMLine.m 6 Aug 2004 05:57:41 -0000 1.2 --- FOOMLine.m 14 Aug 2004 07:09:45 -0000 1.3 *************** *** 37,40 **** --- 37,43 ---- #include "FOOMLine.h" + #import <Foundation/NSKeyedArchiver.h> + + @implementation FOOMLine *************** *** 145,161 **** */ ! // - read:(TypedStream *)stream ! // { ! // [super read:stream]; ! // objc_read_types(stream, "[8c][8c][8c][8c][8c]", &origin, &incr, &beginT, &endT, &range); ! // return self; ! // } - // - write:(TypedStream *)stream - // { - // [super write:stream]; - // objc_write_types(stream, "[8c][8c][8c][8c][8c]", &origin, &incr, &beginT, &endT, &range); - // return self; - // } - @end --- 148,199 ---- */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! [super encodeWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeDouble: _origin forKey: @"FOOMLine:origin"]; ! [coder encodeDouble: _incr forKey: @"FOOMLine:incr"]; ! [coder encodeDouble: _beginT forKey: @"FOOMLine:beginT"]; ! [coder encodeDouble: _endT forKey: @"FOOMLine:endT"]; ! [coder encodeDouble: _range forKey: @"FOOMLine:range"]; ! } ! else ! { ! [coder encodeValueOfObjCType: @encode(double) at: &_origin]; ! [coder encodeValueOfObjCType: @encode(double) at: &_incr]; ! [coder encodeValueOfObjCType: @encode(double) at: &_beginT]; ! [coder encodeValueOfObjCType: @encode(double) at: &_endT]; ! [coder encodeValueOfObjCType: @encode(double) at: &_range]; ! } ! ! return; ! } ! ! ! - (FOOMLine *) initWithCoder: (NSCoder *)coder ! { ! self = [super initWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! _origin = [coder decodeDoubleForKey: @"FOOMLine:origin"]; ! _incr = [coder decodeDoubleForKey: @"FOOMLine:incr"]; ! _beginT = [coder decodeDoubleForKey: @"FOOMLine:beginT"]; ! _endT = [coder decodeDoubleForKey: @"FOOMLine:endT"]; ! _range = [coder decodeDoubleForKey: @"FOOMLine:range"]; ! } ! else ! { ! [coder decodeValueOfObjCType: @encode(double) at: &_origin]; ! [coder decodeValueOfObjCType: @encode(double) at: &_incr]; ! [coder decodeValueOfObjCType: @encode(double) at: &_beginT]; ! [coder decodeValueOfObjCType: @encode(double) at: &_endT]; ! [coder decodeValueOfObjCType: @encode(double) at: &_range]; ! } ! ! return self; ! } @end Index: FOOMFiltreVariableEtat.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMFiltreVariableEtat.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMFiltreVariableEtat.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMFiltreVariableEtat.h 14 Aug 2004 07:09:45 -0000 1.3 *************** *** 41,45 **** #include <FOO/FOOGlobal.h> ! @interface FOOMFiltreVariableEtat : FOOEagerModule { sample_t _Lt1, _Bt1; --- 41,45 ---- #include <FOO/FOOGlobal.h> ! @interface FOOMFiltreVariableEtat : FOOEagerModule <NSCoding> { sample_t _Lt1, _Bt1; Index: FOOMGate.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMGate.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMGate.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMGate.h 14 Aug 2004 07:09:45 -0000 1.3 *************** *** 40,44 **** #include <FOO/FOOModule.h> ! @interface FOOMGate : FOOModule { int _begin; --- 40,44 ---- #include <FOO/FOOModule.h> ! @interface FOOMGate : FOOModule <NSCoding> { int _begin; Index: FOOMAdd.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMAdd.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMAdd.m 31 Jul 2004 03:05:29 -0000 1.1 --- FOOMAdd.m 14 Aug 2004 07:09:45 -0000 1.2 *************** *** 37,40 **** --- 37,43 ---- #include "FOOMAdd.h" + #import <Foundation/NSKeyedArchiver.h> + + @implementation FOOMAdd *************** *** 97,99 **** --- 100,122 ---- } + + /* + * archiving methods + */ + + - (void) encodeWithCoder: (NSCoder *)coder + { + [super encodeWithCoder: coder]; + + return; + } + + + - (FOOMAdd *) initWithCoder: (NSCoder *)coder + { + self = [super initWithCoder: coder]; + + return self; + } + @end Index: FOOMGate.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMGate.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMGate.m 6 Aug 2004 05:57:41 -0000 1.2 --- FOOMGate.m 14 Aug 2004 07:09:45 -0000 1.3 *************** *** 37,40 **** --- 37,43 ---- #include "FOOMGate.h" + #import <Foundation/NSKeyedArchiver.h> + + @implementation FOOMGate *************** *** 134,150 **** */ ! // - read:(TypedStream *)stream ! // { ! // [super read:stream]; ! // objc_read_types(stream, "[8c][8c]", &beginT, &endT); ! // return self; ! // } ! // - write:(TypedStream *)stream ! // { ! // [super write:stream]; ! // objc_write_types(stream, "[8c][8c]", &beginT, &endT); ! // return self; ! // } @end --- 137,176 ---- */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! [super encodeWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeDouble: _beginT forKey: @"FOOMGate:beginT"]; ! [coder encodeDouble: _endT forKey: @"FOOMGate:endT"]; ! } ! else ! { ! [coder encodeValueOfObjCType: @encode(double) at: &_beginT]; ! [coder encodeValueOfObjCType: @encode(double) at: &_endT]; ! } ! ! return; ! } ! ! ! - (FOOMGate *) initWithCoder: (NSCoder *)coder ! { ! self = [super initWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! _beginT = [coder decodeDoubleForKey: @"FOOMGate:beginT"]; ! _endT = [coder decodeDoubleForKey: @"FOOMGate:endT"]; ! } ! else ! { ! [coder decodeValueOfObjCType: @encode(double) at: &_beginT]; ! [coder decodeValueOfObjCType: @encode(double) at: &_endT]; ! } ! ! return self; ! } @end Index: FOOMBandlimitedNoise.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMBandlimitedNoise.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMBandlimitedNoise.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMBandlimitedNoise.h 14 Aug 2004 07:09:45 -0000 1.3 *************** *** 41,45 **** #include <FOO/FOOLookupTable.h> ! @interface FOOMBandlimittedNoise : FOOModule { int _state; --- 41,45 ---- #include <FOO/FOOLookupTable.h> ! @interface FOOMBandlimitedNoise : FOOModule <NSCoding> { int _state; Index: FOOMBandlimitedNoise.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMBandlimitedNoise.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMBandlimitedNoise.m 31 Jul 2004 03:05:29 -0000 1.1 --- FOOMBandlimitedNoise.m 14 Aug 2004 07:09:45 -0000 1.2 *************** *** 37,41 **** #include "FOOMBandlimitedNoise.h" ! @implementation FOOMBandlimittedNoise - initializeTaps: (int)n seed: (int)seed --- 37,44 ---- #include "FOOMBandlimitedNoise.h" ! #import <Foundation/NSKeyedArchiver.h> ! ! ! @implementation FOOMBandlimitedNoise - initializeTaps: (int)n seed: (int)seed *************** *** 140,164 **** */ ! // - awake ! // { ! // [super awake]; ! // table = [GlobalsManager getSineXoverXTable:taps]; ! // samples = NSZoneCalloc([self zone], taps, sizeof(double)); ! // return self; ! // } ! // - read:(TypedStream *)stream ! // { ! // [super read:stream]; ! // objc_read_types(stream, "iii", &state, &taps, &init); ! // return self; ! // } ! // - write:(TypedStream *)stream ! // { ! // [super write:stream]; ! // objc_write_types(stream, "iii", &state, &taps, &init); ! // return self; ! // } @end --- 143,189 ---- */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! [super encodeWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeInt: _state forKey: @"FOOMBandlimitedNoise:state"]; ! [coder encodeInt: _taps forKey: @"FOOMBandlimitedNoise:taps"]; ! [coder encodeInt: _init forKey: @"FOOMBandlimitedNoise:init"]; ! } ! else ! { ! [coder encodeValueOfObjCType: @encode(int) at: &_state]; ! [coder encodeValueOfObjCType: @encode(int) at: &_taps]; ! [coder encodeValueOfObjCType: @encode(int) at: &_init]; ! } ! return; ! } ! ! ! - (FOOMBandlimitedNoise *) initWithCoder: (NSCoder *)coder ! { ! self = [super initWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! _state = [coder decodeIntForKey: @"FOOMBandlimitedNoise:state"]; ! _taps = [coder decodeIntForKey: @"FOOMBandlimitedNoise:taps"]; ! _init = [coder decodeIntForKey: @"FOOMBandlimitedNoise:init"]; ! } ! else ! { ! [coder decodeValueOfObjCType: @encode(int) at: &_state]; ! [coder decodeValueOfObjCType: @encode(int) at: &_taps]; ! [coder decodeValueOfObjCType: @encode(int) at: &_init]; ! } ! ! _table = [FOOGlobalsManager getSineXoverXTable: _taps]; ! _samples = NSZoneCalloc([self zone], _taps, sizeof(double)); ! ! return self; ! } @end |
|
From: Martin R. <ru...@us...> - 2004-08-14 06:13:45
|
Update of /cvsroot/foo/foo/elkfoo/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24455 Modified Files: context.m Log Message: adopted archiving methods to new location in libfoo Index: context.m =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/src/context.m,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** context.m 14 Aug 2004 03:07:01 -0000 1.7 --- context.m 14 Aug 2004 06:13:35 -0000 1.8 *************** *** 37,41 **** #import <Foundation/NSData.h> - #include <FOO/FOOGlobalsManager.h> #include <FOO/FOOContext.h> #include <FOO/FOOModule.h> --- 37,40 ---- *************** *** 276,280 **** // NS_DURING ! [FOOGlobalsManager archiveContext: context toFile: [NSString stringWithCString: path]]; // NS_HANDLER // yet to implement --- 275,279 ---- // NS_DURING ! [context archiveToFile: [NSString stringWithCString: path]]; // NS_HANDLER // yet to implement *************** *** 347,351 **** // NS_DURING ! *context = [FOOGlobalsManager unArchiveContextWithFile: [NSString stringWithCString: path]]; // NS_HANDLER // yet to implement --- 346,350 ---- // NS_DURING ! *context = [[FOOContext alloc] initFromArchive: [NSString stringWithCString: path]]; // NS_HANDLER // yet to implement |
|
From: Martin R. <ru...@us...> - 2004-08-14 06:12:42
|
Update of /cvsroot/foo/foo/libfoo/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24307 Modified Files: FOOContext.m FOOGlobalsManager.m Log Message: moved archiving entry methods from FOOGlobalsManager to FOOContext, where they belong to Index: FOOGlobalsManager.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOGlobalsManager.m,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FOOGlobalsManager.m 13 Aug 2004 21:38:01 -0000 1.4 --- FOOGlobalsManager.m 14 Aug 2004 06:12:34 -0000 1.5 *************** *** 43,51 **** #import <Foundation/NSArray.h> - #import <Foundation/NSDictionary.h> #import <Foundation/NSValue.h> ! #import <Foundation/NSData.h> ! #import <Foundation/NSKeyedArchiver.h> ! #import <Foundation/NSPropertyList.h> #include "FOO/FOOGlobalsManager.h" --- 43,48 ---- #import <Foundation/NSArray.h> #import <Foundation/NSValue.h> ! #import <Foundation/NSDictionary.h> #include "FOO/FOOGlobalsManager.h" *************** *** 202,241 **** } - - + (BOOL) archiveContext: (FOOContext *)context - toFile: (NSString *)path - { - NSMutableData *data; - NSKeyedArchiver *archiver; - BOOL result; - - data = [NSMutableData data]; - archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData: data]; - // use XML format - [archiver setOutputFormat: NSPropertyListXMLFormat_v1_0]; - [archiver encodeObject: context forKey: @"FOOContext"]; - [archiver finishEncoding]; - result = [data writeToFile: path atomically: YES]; - RELEASE(archiver); - // RELEASE(data); // ??? autoreleased or not? - - return result; - } - - - + (FOOContext *) unArchiveContextWithFile: (NSString *)path - { - FOOContext *context; - NSData *data; - NSKeyedUnarchiver *unarchiver; - - data = [NSData dataWithContentsOfFile: path]; - unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData: data]; - context = [unarchiver decodeObjectForKey: @"FOOContext"]; - [unarchiver finishDecoding]; - [unarchiver release]; - - return context; - } - @end --- 199,201 ---- Index: FOOContext.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOContext.m,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FOOContext.m 13 Aug 2004 21:38:01 -0000 1.4 --- FOOContext.m 14 Aug 2004 06:12:34 -0000 1.5 *************** *** 47,55 **** --- 47,134 ---- #include "FOO/FOOBuffer.h" + #import <Foundation/NSString.h> + #import <Foundation/NSDictionary.h> + #import <Foundation/NSData.h> #import <Foundation/NSKeyedArchiver.h> + #import <Foundation/NSPropertyList.h> @implementation FOOContext + + (BOOL) archiveContext: (FOOContext *)context toFile: (NSString *)path + { + return [context archiveToFile: path]; + } + + + // + (BOOL) archiveContextsWithKeys: (NSDictionary *)contexts toFile: (NSString *)path + // { + + // } + + + + (FOOContext *) contextFromArchive: (NSString *)path + { + FOOContext *context; + + context = [[self class] alloc]; + context = [context initFromArchive: path]; + + return AUTORELEASE(context); + } + + + + (FOOContext *) contextFromArchive: (NSString *)path withKey: (NSString *)key + { + FOOContext *context; + + context = [[self class] alloc]; + context = [context initFromArchive: path withKey: key]; + + return AUTORELEASE(context); + } + + + - (FOOContext *) initFromArchive: (NSString *)path + { + return [self initFromArchive: path withKey: @"FOOContext"]; + } + + + - (FOOContext *) initFromArchive: (NSString *)path withKey: (NSString *)key + { + NSData *data; + NSKeyedUnarchiver *unarchiver; + + data = [NSData dataWithContentsOfFile: path]; + unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData: data]; + self = RETAIN([unarchiver decodeObjectForKey: key]); + [unarchiver finishDecoding]; + RELEASE(unarchiver); + + return self; + } + + + - (BOOL) archiveToFile: (NSString *)path + { + NSMutableData *data; + NSKeyedArchiver *archiver; + BOOL result; + + data = [NSMutableData data]; + archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData: data]; + // use XML format + [archiver setOutputFormat: NSPropertyListXMLFormat_v1_0]; + [archiver encodeObject: self forKey: @"FOOContext"]; + [archiver finishEncoding]; + result = [data writeToFile: path atomically: YES]; + RELEASE(archiver); + // RELEASE(data); // ??? autoreleased or not? + + return result; + } + + - (FOOContext *) initWithChans: (int)n { |
|
From: Martin R. <ru...@us...> - 2004-08-14 06:12:29
|
Update of /cvsroot/foo/foo/libfoo/FOO In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24268 Modified Files: FOOContext.h FOOGlobalsManager.h Log Message: moved archiving entry methods from FOOGlobalsManager to FOOContext, where they belong to Index: FOOContext.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/FOO/FOOContext.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FOOContext.h 13 Aug 2004 21:36:50 -0000 1.3 --- FOOContext.h 14 Aug 2004 06:12:18 -0000 1.4 *************** *** 55,58 **** --- 55,61 ---- @class FOOBuffer; + @class NSString; + @class NSDictionary; + // extern id getCurrentContext(); // exported by ../objc/context.m *************** *** 80,83 **** --- 83,95 ---- } + + (BOOL) archiveContext: (FOOContext *)context toFile: (NSString *)path; + // + (BOOL) archiveContextsWithKeys: (NSDictionary *)contexts toFile: (NSString *)path; + + (FOOContext *) contextFromArchive: (NSString *)path; + + (FOOContext *) contextFromArchive: (NSString *)path withKey: (NSString *)key; + + - (FOOContext *) initFromArchive: (NSString *)path; + - (FOOContext *) initFromArchive: (NSString *)path withKey: (NSString *)key; + - (BOOL) archiveToFile: (NSString *)path; + - (FOOContext *) initWithChans: (int)n; - (FOOContext *) setTime: (double)value; Index: FOOGlobalsManager.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/FOO/FOOGlobalsManager.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FOOGlobalsManager.h 13 Aug 2004 21:36:50 -0000 1.4 --- FOOGlobalsManager.h 14 Aug 2004 06:12:18 -0000 1.5 *************** *** 89,95 **** + (void) setDefaultBlockSize: (int)size; - + (BOOL) archiveContext: (FOOContext *)context toFile: (NSString *)path; - + (FOOContext *) unArchiveContextWithFile: (NSString *)path; - @end --- 89,92 ---- |
|
From: Martin R. <ru...@us...> - 2004-08-14 03:07:10
|
Update of /cvsroot/foo/foo/elkfoo/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3437 Modified Files: context.m Log Message: slighty changed archiving mechanism Index: context.m =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/src/context.m,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** context.m 13 Aug 2004 21:34:39 -0000 1.6 --- context.m 14 Aug 2004 03:07:01 -0000 1.7 *************** *** 267,278 **** int ! Write_Context (NSString *path, FOOContext *context) { ! NS_DURING ! [FOOGlobalsManager archiveContext: context toFile: path]; ! NS_HANDLER // yet to implement ! NS_ENDHANDLER return 0; --- 267,283 ---- int ! Write_Context (const char *path, FOOContext *context) { ! /* we have to implement the exception handler here macros are ! * commented out since they don't let pass exceptions (we'll never ! * now what's wrong) ! */ ! ! // NS_DURING ! [FOOGlobalsManager archiveContext: context toFile: [NSString stringWithCString: path]]; ! // NS_HANDLER // yet to implement ! // NS_ENDHANDLER return 0; *************** *** 319,324 **** } ! switch (Write_Context([NSString stringWithCString: path], ! CONTEXT_T(context)->pointer)) { case -1: --- 324,328 ---- } ! switch (Write_Context(path, CONTEXT_T(context)->pointer)) { case -1: *************** *** 334,345 **** int ! Read_Context (NSString *path, FOOContext **context) { ! NS_DURING ! *context = [FOOGlobalsManager unArchiveContextWithFile: path]; ! NS_HANDLER // yet to implement ! NS_ENDHANDLER if (*context == nil) --- 338,354 ---- int ! Read_Context (const char *path, FOOContext **context) { ! /* we have to implement the exception handler here macros are ! * commented out since they don't let pass exceptions (we'll never ! * now what's wrong) ! */ ! ! // NS_DURING ! *context = [FOOGlobalsManager unArchiveContextWithFile: [NSString stringWithCString: path]]; ! // NS_HANDLER // yet to implement ! // NS_ENDHANDLER if (*context == nil) *************** *** 390,394 **** } ! switch (Read_Context([NSString stringWithCString: path], &context)) { case -1: --- 399,403 ---- } ! switch (Read_Context(path, &context)) { case -1: |
|
From: Martin R. <ru...@us...> - 2004-08-14 02:01:40
|
Update of /cvsroot/foo/foo/libfoo/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28480 Modified Files: FOOObjectManager.m Log Message: corrected bug discovered when archiving Index: FOOObjectManager.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOObjectManager.m,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FOOObjectManager.m 13 Aug 2004 21:38:01 -0000 1.4 --- FOOObjectManager.m 14 Aug 2004 02:01:32 -0000 1.5 *************** *** 45,49 **** { [super init]; ! _objects = [NSMutableArray array]; return self; --- 45,49 ---- { [super init]; ! _objects = [[NSMutableArray alloc] init]; return self; |
|
From: Martin R. <ru...@us...> - 2004-08-13 22:52:34
|
Update of /cvsroot/foo/foo/libfoo/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32713 Modified Files: FOONilModule.m Log Message: corrected archive methods Index: FOONilModule.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOONilModule.m,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FOONilModule.m 13 Aug 2004 22:26:13 -0000 1.3 --- FOONilModule.m 13 Aug 2004 22:52:25 -0000 1.4 *************** *** 48,52 **** - (void) encodeWithCoder: (NSCoder *)coder { ! [super encodeWithCoder: coder]; return; --- 48,53 ---- - (void) encodeWithCoder: (NSCoder *)coder { ! // currently, FOONilModule doesn't inherit from FOOModule ! // [super encodeWithCoder: coder]; return; *************** *** 56,60 **** - (FOONilModule *) initWithCoder: (NSCoder *)coder { ! self = [super initWithCoder: coder]; return self; --- 57,63 ---- - (FOONilModule *) initWithCoder: (NSCoder *)coder { ! // self = [super initWithCoder: coder]; ! // currently, FOONilModule doesn't inherit from FOOModule ! self = [super init]; return self; |
|
From: Martin R. <ru...@us...> - 2004-08-13 22:26:22
|
Update of /cvsroot/foo/foo/libfoo/FOO In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28186/FOO Modified Files: FOONilModule.h Log Message: added archiving methods Index: FOONilModule.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/FOO/FOONilModule.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOONilModule.h 4 Aug 2004 06:15:57 -0000 1.2 --- FOONilModule.h 13 Aug 2004 22:26:13 -0000 1.3 *************** *** 41,45 **** ! @interface FOONilModule : FOOObject { --- 41,45 ---- ! @interface FOONilModule : FOOObject <NSCoding> { |
|
From: Martin R. <ru...@us...> - 2004-08-13 22:26:22
|
Update of /cvsroot/foo/foo/libfoo/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28186/src Modified Files: FOONilModule.m Log Message: added archiving methods Index: FOONilModule.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOONilModule.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOONilModule.m 4 Aug 2004 06:16:41 -0000 1.2 --- FOONilModule.m 13 Aug 2004 22:26:13 -0000 1.3 *************** *** 37,41 **** --- 37,63 ---- #include "FOO/FOONilModule.h" + #import <Foundation/NSKeyedArchiver.h> + + @implementation FOONilModule + /* + * archiving methods + */ + + - (void) encodeWithCoder: (NSCoder *)coder + { + [super encodeWithCoder: coder]; + + return; + } + + + - (FOONilModule *) initWithCoder: (NSCoder *)coder + { + self = [super initWithCoder: coder]; + + return self; + } + @end |
|
From: Martin R. <ru...@us...> - 2004-08-13 21:39:24
|
Update of /cvsroot/foo/foo/libfoo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18443 Modified Files: configure.ac Log Message: added -Wno-import switch to avoid warnings regarding #import usage on linux/gcc < 3.4 Index: configure.ac =================================================================== RCS file: /cvsroot/foo/foo/libfoo/configure.ac,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** configure.ac 10 Aug 2004 03:19:45 -0000 1.13 --- configure.ac 13 Aug 2004 21:39:15 -0000 1.14 *************** *** 129,142 **** use_foundation="GNUstep" ! AC_DEFINE(FOO_GNUSTEP, 1, Define if we are using GNUstep) FOO_GNUSTEP_OBJCFLAGS="\$(GNUSTEP_HEADERS_FLAGS) \$(AUXILIARY_OBJCFLAGS)" FOO_GNUSTEP_LDFLAGS="\$(GNUSTEP_LIBRARIES_FLAGS)" else # set flags for cocoa framework FOO_LIBS="${FOO_LIBS} -framework Cocoa" use_foundation="Cocoa" ! AC_DEFINE(FOO_COCOA, 1, Define if we are using Cocoa) fi AM_CONDITIONAL(USE_GNUSTEP_BASE, test "$use_gnustep_base" = yes) --- 129,146 ---- use_foundation="GNUstep" ! AC_DEFINE(FOO_GNUSTEP, 1, Define whether we are using GNUstep) FOO_GNUSTEP_OBJCFLAGS="\$(GNUSTEP_HEADERS_FLAGS) \$(AUXILIARY_OBJCFLAGS)" FOO_GNUSTEP_LDFLAGS="\$(GNUSTEP_LIBRARIES_FLAGS)" + # get rid of warnings regarding #import + FOO_OBJCFLAGS="${FOO_OBJCFLAGS} -Wno-import" + else # set flags for cocoa framework + AC_MSG_WARN([FIXME: check for framework Cocoa and its version]) FOO_LIBS="${FOO_LIBS} -framework Cocoa" use_foundation="Cocoa" ! AC_DEFINE(FOO_COCOA, 1, Define whether we are using Cocoa) fi AM_CONDITIONAL(USE_GNUSTEP_BASE, test "$use_gnustep_base" = yes) |
|
From: Martin R. <ru...@us...> - 2004-08-13 21:38:55
|
Update of /cvsroot/foo/foo/libfoo/modules/orthodox In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18321 Modified Files: FOOMConstant.h FOOMConstant.m FOOMOscillator.h FOOMOscillator.m Log Message: started adding archving methods. by now just FOOMOscillator and -Constant for first tests Index: FOOMOscillator.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMOscillator.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMOscillator.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMOscillator.h 13 Aug 2004 21:38:46 -0000 1.3 *************** *** 43,47 **** #include <Foundation/NSString.h> ! @interface FOOMOscillator : FOOModule { FOOLookupTable *_table; --- 43,47 ---- #include <Foundation/NSString.h> ! @interface FOOMOscillator : FOOModule <NSCoding> { FOOLookupTable *_table; Index: FOOMOscillator.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMOscillator.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMOscillator.m 31 Jul 2004 03:05:30 -0000 1.1 --- FOOMOscillator.m 13 Aug 2004 21:38:46 -0000 1.2 *************** *** 32,41 **** * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - /* $Id$ */ #include <math.h> #include "FOOMOscillator.h" #define TWO_PI (M_PI*2) --- 32,43 ---- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* $Id$ */ + #import <Foundation/NSKeyedArchiver.h> + #include <math.h> #include "FOOMOscillator.h" + #define TWO_PI (M_PI*2) *************** *** 144,171 **** */ ! // - awake ! // { ! // [super awake]; ! // if (filename == NULL) { ! // table = [GlobalsManager getSineTable]; ! // } else { ! // table = [GlobalsManager getFileTable: [filename cString]]; ! // } ! // return self; ! // } ! // - read:(TypedStream *)stream ! // { ! // [super read:stream]; ! // objc_read_types(stream, "[8c]@", &phase, &filename); ! // return self; ! // } ! // - write:(TypedStream *)stream ! // { ! // [super write:stream]; ! // objc_write_types(stream, "[8c]@", &phase, &filename); ! // return self; ! // } @end --- 146,194 ---- */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! [super encodeWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeObject: _filename forKey: @"FOOMOscillator:filename"]; ! [coder encodeDouble: _phase forKey: @"FOOMOscillator:phase"]; ! } ! else ! { ! [coder encodeObject: _filename]; ! [coder encodeValueOfObjCType: @encode(double) at: &_phase]; ! } ! return; ! } ! ! ! - (FOOMOscillator *) initWithCoder: (NSCoder *)coder ! { ! self = [super initWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! _filename = RETAIN([coder decodeObjectForKey: @"FOOMOscillator:filename"]); ! _phase = [coder decodeDoubleForKey: @"FOOMOscillator:phase"]; ! } ! else ! { ! _filename = RETAIN([coder decodeObject]); ! [coder decodeValueOfObjCType: @encode(double) at: &_phase]; ! } ! ! if (_filename == nil) ! { ! _table = [FOOGlobalsManager getSineTable]; ! } ! else ! { ! _table = [FOOGlobalsManager getFileTable: _filename]; ! } ! ! return self; ! } @end Index: FOOMConstant.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMConstant.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOMConstant.h 4 Aug 2004 06:20:31 -0000 1.2 --- FOOMConstant.h 13 Aug 2004 21:38:46 -0000 1.3 *************** *** 40,44 **** #include <FOO/FOOModule.h> ! @interface FOOMConstant : FOOModule { sample_t _value; --- 40,44 ---- #include <FOO/FOOModule.h> ! @interface FOOMConstant : FOOModule <NSCoding> { sample_t _value; Index: FOOMConstant.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/modules/orthodox/FOOMConstant.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FOOMConstant.m 31 Jul 2004 03:05:29 -0000 1.1 --- FOOMConstant.m 13 Aug 2004 21:38:46 -0000 1.2 *************** *** 37,40 **** --- 37,43 ---- #include "FOOMConstant.h" + #import <Foundation/NSKeyedArchiver.h> + + @implementation FOOMConstant *************** *** 71,87 **** */ ! // - read:(TypedStream *)stream ! // { ! // [super read:stream]; ! // objc_read_type(stream, "[4c]", &value); ! // return self; ! // } ! // - write:(TypedStream *)stream ! // { ! // [super write:stream]; ! // objc_write_type(stream, "[4c]", &value); ! // return self; ! // } @end --- 74,109 ---- */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! [super encodeWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! ENCODE_KEYED_SAMPLE_T(_value, @"FOOMConstant:value") ! } ! else ! { ! ENCODE_UNKEYED_SAMPLE_T(_value) ! } ! ! return; ! } ! ! ! - (FOOMConstant *) initWithCoder: (NSCoder *)coder ! { ! self = [super initWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! DECODE_KEYED_SAMPLE_T(_value, @"FOOMConstant:value") ! } ! else ! { ! DECODE_UNKEYED_SAMPLE_T(_value) ! } ! ! return self; ! } @end |
|
From: Martin R. <ru...@us...> - 2004-08-13 21:38:13
|
Update of /cvsroot/foo/foo/libfoo/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18143 Modified Files: FOOBreakpointFunction.m FOOBufferManager.m FOOContext.m FOOContextPart.m FOOEagerModule.m FOOEagerModuleManager.m FOOGlobalsManager.m FOOModule.m FOOModuleManager.m FOOObjectManager.m FOOOutput.m FOOOutputManager.m FOORegion.m FOOSoundFile.m FOOSoundStream.m FOOSubstrate.m FOOSubstrateManager.m Log Message: added archiving methods Index: FOOSubstrateManager.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOSubstrateManager.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOSubstrateManager.m 4 Aug 2004 06:16:41 -0000 1.2 --- FOOSubstrateManager.m 13 Aug 2004 21:38:01 -0000 1.3 *************** *** 38,41 **** --- 38,43 ---- #include "FOO/FOOSubstrate.h" + #import <Foundation/NSKeyedArchiver.h> + @implementation FOOSubstrateManager *************** *** 54,56 **** --- 56,78 ---- } + + /* + * archiving methods + */ + + - (void) encodeWithCoder: (NSCoder *)coder + { + [super encodeWithCoder: coder]; + + return; + } + + + - (FOOSubstrateManager *) initWithCoder: (NSCoder *)coder + { + self = [super initWithCoder: coder]; + + return self; + } + @end Index: FOORegion.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOORegion.m,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FOORegion.m 4 Aug 2004 06:16:41 -0000 1.3 --- FOORegion.m 13 Aug 2004 21:38:01 -0000 1.4 *************** *** 40,43 **** --- 40,45 ---- #include "FOO/FOOContext.h" + #import <Foundation/NSKeyedArchiver.h> + @implementation FOORegion *************** *** 46,50 **** offset: (double)off size: (double)siz ! rev:(BOOL)rev { if ([substrate isKindOfClass: [FOOSoundFile class]] == NO && --- 48,52 ---- offset: (double)off size: (double)siz ! rev: (BOOL)rev { if ([substrate isKindOfClass: [FOOSoundFile class]] == NO && *************** *** 112,132 **** ! // /* ! // * archiving methods ! // */ ! // - read:(TypedStream *)stream ! // { ! // [super read:stream]; ! // objc_read_types(stream, "@iii", &substrate, &offset, &size, &reverse); ! // return self; ! // } ! // - write:(TypedStream *)stream ! // { ! // [super write:stream]; ! // objc_write_types(stream, "@iii", &substrate, &offset, &size, &reverse); ! // return self; ! // } @end --- 114,165 ---- ! /* ! * archiving methods ! */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! [super encodeWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeObject: _substrate forKey: @"FOORegion:substrate"]; ! [coder encodeInt64: _offset forKey: @"FOORegion:offset"]; ! [coder encodeInt64: _size forKey: @"FOORegion:size"]; ! [coder encodeBool: _reverse forKey: @"FOORegion:reverse"]; ! } ! else ! { ! [coder encodeObject: _substrate]; ! [coder encodeValueOfObjCType: @encode(long) at: &_offset]; ! [coder encodeValueOfObjCType: @encode(long) at: &_size]; ! [coder encodeValueOfObjCType: @encode(BOOL) at: &_reverse]; ! } ! ! return; ! } ! ! ! - (FOORegion *) initWithCoder: (NSCoder *)coder ! { ! self = [super initWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! _substrate = RETAIN([coder decodeObjectForKey: @"FOORegion:substrate"]); ! _offset = [coder decodeInt64ForKey: @"FOORegion:offset"]; ! _size = [coder decodeInt64ForKey: @"FOORegion:size"]; ! _reverse = [coder decodeBoolForKey: @"FOORegion:reverse"]; ! } ! else ! { ! _substrate = RETAIN([coder decodeObject]); ! [coder decodeValueOfObjCType: @encode(long) at: &_offset]; ! [coder decodeValueOfObjCType: @encode(long) at: &_size]; ! [coder decodeValueOfObjCType: @encode(BOOL) at: &_reverse]; ! } ! ! return self; ! } @end Index: FOOContextPart.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOContextPart.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOContextPart.m 4 Aug 2004 06:16:41 -0000 1.2 --- FOOContextPart.m 13 Aug 2004 21:38:01 -0000 1.3 *************** *** 38,41 **** --- 38,43 ---- #include "FOO/FOOContext.h" + #import <Foundation/NSKeyedArchiver.h> + extern FOOContext *getCurrentContext(); // exported by ../fooLiface/context.m *************** *** 74,95 **** ! // /* ! // * archiving methods ! // */ ! // - read:(TypedStream *)stream ! // { ! // [super read:stream]; ! // objc_read_object(stream, &context); ! // return self; ! // } ! // - write:(TypedStream *)stream ! // { ! // [super write:stream]; ! // objc_write_object(stream, context); ! // return self; ! // } @end --- 76,114 ---- ! /* ! * archiving methods ! */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! // no [super encode ...] call, since FOOObject doesn't implement <NSCoding> ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeObject: _context forKey: @"FOOContextPart:context"]; ! } ! else ! { ! [coder encodeObject: _context]; ! } ! return; ! } ! ! ! - (FOOContextPart *) initWithCoder: (NSCoder *)coder ! { ! self = [super init]; ! ! if ([coder allowsKeyedCoding]) ! { ! _context = RETAIN([coder decodeObjectForKey: @"FOOContextPart:context"]); ! } ! else ! { ! _context = RETAIN([coder decodeObject]); ! } + return self; + } @end Index: FOOSoundFile.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOSoundFile.m,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FOOSoundFile.m 13 Aug 2004 00:34:34 -0000 1.3 --- FOOSoundFile.m 13 Aug 2004 21:38:01 -0000 1.4 *************** *** 38,41 **** --- 38,43 ---- #include "FOO/FOOSoundFile.h" + #import <Foundation/NSKeyedArchiver.h> + // #define FOOSOUNDFILE_DEBUG *************** *** 826,857 **** */ ! // - awake ! // { ! // [super awake]; ! // [self doInit]; ! // if ([self open: [_fileName cString] mode: _fileMode] == NO) ! // { ! // FOO_ERROR(YES, self); ! // } ! // return self; ! // } // awake - // - read: (TypedStream *) stream - // { - // [super read: stream]; - // objc_read_types(stream, "@i", &_fileName, &_fileMode); - // return self; - // } // read ! // - write: (TypedStream *) stream ! // { ! // [super write: stream]; ! // objc_write_types(stream, "@i", &_fileName, &_fileMode); ! // return self; ! // } // write @end --- 828,874 ---- */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! [super encodeWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeObject: _fileName forKey: @"FOOSoundFile:fileName"]; ! [coder encodeInt: _fileMode forKey: @"FOOSoundFile:fileMode"]; ! } ! else ! { ! [coder encodeObject: _fileName]; ! [coder encodeValueOfObjCType: @encode(int) at: &_fileMode]; ! } + return; + } + - (FOOSoundFile *) initWithCoder: (NSCoder *)coder + { + self = [super initWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! _fileName = RETAIN([coder decodeObjectForKey: @"FOOSoundFile:fileName"]); ! _fileMode = [coder decodeIntForKey: @"FOOSoundFile:fileMode"]; ! } ! else ! { ! _fileName = RETAIN([coder decodeObject]); ! [coder decodeValueOfObjCType: @encode(int) at: &_fileMode]; ! } + [self doInit]; + + if ([self open: _fileName mode: _fileMode] == NO) + { + FOO_ERROR(YES, self); + } + + return self; + } @end Index: FOOGlobalsManager.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOGlobalsManager.m,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FOOGlobalsManager.m 4 Aug 2004 06:43:55 -0000 1.3 --- FOOGlobalsManager.m 13 Aug 2004 21:38:01 -0000 1.4 *************** *** 41,47 **** --- 41,51 ---- #include <math.h> #include <stdio.h> + #import <Foundation/NSArray.h> #import <Foundation/NSDictionary.h> #import <Foundation/NSValue.h> + #import <Foundation/NSData.h> + #import <Foundation/NSKeyedArchiver.h> + #import <Foundation/NSPropertyList.h> #include "FOO/FOOGlobalsManager.h" *************** *** 49,72 **** #include "FOO/FOOSineXoverXTable.h" #include "FOO/FOOFileTable.h" ! ! ! // this is loadClass etc. which is not used in foo ! // /* objc-load.h seems to be no longer exported by the base library ! // * declaring functions manually ! // */ ! // //#include <GNUstepBase/objc-load.h> ! ! // extern long objc_load_modules( ! // char *files[], ! // FILE *errorStream, ! // void (*callback)(Class,struct objc_category *), ! // void **header, ! // char *debugFilename); ! ! // extern long objc_unload_modules( ! // FILE *errorStream, ! // void (*unloadCallback)(Class, struct objc_category *)); ! ! // /* end objc-load.h stuff */ --- 53,57 ---- #include "FOO/FOOSineXoverXTable.h" #include "FOO/FOOFileTable.h" ! #include "FOO/FOOContext.h" *************** *** 116,143 **** - // seems not to be used in foo - // + (void) loadClass:(char *)path - // { - // char *files[] = {NULL, NULL}; - - // files[0] = path; - // // if (objc_loadModules(files, NULL, NULL, NULL, NULL) != 0) - // if (objc_load_modules(files, NULL, NULL, NULL, NULL) != 0) - // { - // FOO_ERROR(YES, self); - // } - // } - - - // + (void) unloadLast - // { - // // if (objc_unloadModules(NULL, NULL) != 0) - // if (objc_unload_modules(NULL, NULL) != 0) - // { - // FOO_ERROR(YES, self); - // } - // } - - + (void) schemeOutput: (NSString *)string { --- 101,104 ---- *************** *** 236,243 **** ! + (void) setDefaultBlockSize:(int) size { _defaultBlockSize = size; } @end --- 197,241 ---- ! + (void) setDefaultBlockSize: (int)size { _defaultBlockSize = size; } + + + (BOOL) archiveContext: (FOOContext *)context + toFile: (NSString *)path + { + NSMutableData *data; + NSKeyedArchiver *archiver; + BOOL result; + + data = [NSMutableData data]; + archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData: data]; + // use XML format + [archiver setOutputFormat: NSPropertyListXMLFormat_v1_0]; + [archiver encodeObject: context forKey: @"FOOContext"]; + [archiver finishEncoding]; + result = [data writeToFile: path atomically: YES]; + RELEASE(archiver); + // RELEASE(data); // ??? autoreleased or not? + + return result; + } + + + + (FOOContext *) unArchiveContextWithFile: (NSString *)path + { + FOOContext *context; + NSData *data; + NSKeyedUnarchiver *unarchiver; + + data = [NSData dataWithContentsOfFile: path]; + unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData: data]; + context = [unarchiver decodeObjectForKey: @"FOOContext"]; + [unarchiver finishDecoding]; + [unarchiver release]; + + return context; + } + @end Index: FOOModuleManager.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOModuleManager.m,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FOOModuleManager.m 4 Aug 2004 06:16:41 -0000 1.3 --- FOOModuleManager.m 13 Aug 2004 21:38:01 -0000 1.4 *************** *** 38,41 **** --- 38,43 ---- #include "FOO/FOOModule.h" + #import <Foundation/NSKeyedArchiver.h> + @implementation FOOModuleManager *************** *** 129,131 **** --- 131,153 ---- } + + /* + * archiving methods + */ + + - (void) encodeWithCoder: (NSCoder *)coder + { + [super encodeWithCoder: coder]; + + return; + } + + + - (FOOModuleManager *) initWithCoder: (NSCoder *)coder + { + self = [super initWithCoder: coder]; + + return self; + } + @end Index: FOOBufferManager.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOBufferManager.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOBufferManager.m 4 Aug 2004 06:16:41 -0000 1.2 --- FOOBufferManager.m 13 Aug 2004 21:38:01 -0000 1.3 *************** *** 38,41 **** --- 38,43 ---- #include "FOO/FOOBuffer.h" + #import <Foundation/NSKeyedArchiver.h> + @implementation FOOBufferManager *************** *** 95,115 **** ! // /* ! // * archiving methods ! // */ ! // - read:(TypedStream *)stream ! // { ! // [super read:stream]; ! // objc_read_type(stream, "i", &bufferSize); ! // return self; ! // } ! // - write:(TypedStream *)stream ! // { ! // [super write:stream]; ! // objc_write_type(stream, "i", &bufferSize); ! // return self; ! // } @end --- 97,138 ---- ! /* ! * archiving methods ! */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! [super encodeWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeInt: _bufferSize forKey: @"FOOBufferManager:bufferSize"]; ! } ! else ! { ! [coder encodeValueOfObjCType: @encode(int) at: &_bufferSize]; ! } ! ! return; ! } ! ! ! - (FOOBufferManager *) initWithCoder: (NSCoder *)coder ! { ! self = [super initWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! _bufferSize = [coder decodeIntForKey: @"FOOBufferManager:bufferSize"]; ! } ! else ! { ! [coder decodeValueOfObjCType: @encode(int) at: &_bufferSize]; ! ! return; ! } ! ! return self; ! } @end Index: FOOObjectManager.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOObjectManager.m,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FOOObjectManager.m 4 Aug 2004 06:16:41 -0000 1.3 --- FOOObjectManager.m 13 Aug 2004 21:38:01 -0000 1.4 *************** *** 37,40 **** --- 37,42 ---- #include "FOO/FOOObjectManager.h" + #import <Foundation/NSKeyedArchiver.h> + @implementation FOOObjectManager *************** *** 116,133 **** */ ! // - read:(TypedStream *)stream ! // { ! // [super read:stream]; ! // // objects = NXReadObject(stream); ! // objc_read_object(stream, &objects); ! // return self; ! // } ! // - write:(TypedStream *)stream ! // { ! // [super write:stream]; ! // objc_write_object(stream, objects); ! // return self; ! // } @end --- 118,152 ---- */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! // no [super encode ...] call, since FOOObject doesn't implement <NSCoding> ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeObject: _objects forKey: @"FOOObjectManager:objects"]; ! } ! else ! { ! [coder encodeObject: _objects]; ! } ! return; ! } ! ! ! - (FOOObjectManager *) initWithCoder: (NSCoder *)coder ! { ! self = [super init]; ! ! if ([coder allowsKeyedCoding]) ! { ! _objects = RETAIN([coder decodeObjectForKey: @"FOOObjectManager:objects"]); ! } ! else ! { ! _objects = RETAIN([coder decodeObject]); ! } ! ! return self; ! } @end Index: FOOEagerModuleManager.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOEagerModuleManager.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOEagerModuleManager.m 4 Aug 2004 06:16:41 -0000 1.2 --- FOOEagerModuleManager.m 13 Aug 2004 21:38:01 -0000 1.3 *************** *** 38,41 **** --- 38,43 ---- #include "FOO/FOOEagerModule.h" + #import <Foundation/NSKeyedArchiver.h> + @implementation FOOEagerModuleManager *************** *** 54,56 **** --- 56,78 ---- } + + /* + * archiving methods + */ + + - (void) encodeWithCoder: (NSCoder *)coder + { + [super encodeWithCoder: coder]; + + return; + } + + + - (FOOEagerModuleManager *) initWithCoder: (NSCoder *)coder + { + self = [super initWithCoder: coder]; + + return self; + } + @end Index: FOOSubstrate.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOSubstrate.m,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FOOSubstrate.m 4 Aug 2004 06:16:41 -0000 1.4 --- FOOSubstrate.m 13 Aug 2004 21:38:01 -0000 1.5 *************** *** 38,41 **** --- 38,43 ---- #include "FOO/FOOContext.h" + #import <Foundation/NSKeyedArchiver.h> + @implementation FOOSubstrate *************** *** 98,100 **** --- 100,122 ---- } + + /* + * archiving methods + */ + + - (void) encodeWithCoder: (NSCoder *)coder + { + [super encodeWithCoder: coder]; + + return; + } + + + - (FOOSubstrate *) initWithCoder: (NSCoder *)coder + { + self = [super initWithCoder: coder]; + + return self; + } + @end Index: FOOSoundStream.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOSoundStream.m,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FOOSoundStream.m 4 Aug 2004 06:16:41 -0000 1.3 --- FOOSoundStream.m 13 Aug 2004 21:38:01 -0000 1.4 *************** *** 38,41 **** --- 38,43 ---- #include "FOO/FOOSoundFile.h" + #import <Foundation/NSKeyedArchiver.h> + @implementation FOOSoundStream *************** *** 82,102 **** ! // /* ! // * archiving methods ! // */ ! // - read:(TypedStream *)stream ! // { ! // [super read:stream]; ! // objc_read_types(stream, "@i", &soundFile, &channelNumber); ! // return self; ! // } ! // - write:(TypedStream *)stream ! // { ! // [super write:stream]; ! // objc_write_types(stream, "@i", &soundFile, &channelNumber); ! // return self; ! // } @end --- 84,127 ---- ! /* ! * archiving methods ! */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! [super encodeWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeObject: _soundFile forKey: @"FOOSoundStream:soundFile"]; ! [coder encodeInt: _channelNumber forKey: @"FOOSoundStream:channelNumber"]; ! } ! else ! { ! [coder encodeObject: _soundFile]; ! [coder encodeValueOfObjCType: @encode(int) at: &_channelNumber]; ! } ! ! return; ! } ! ! ! - (FOOSoundStream *) initWithCoder: (NSCoder *)coder ! { ! self = [super initWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! _soundFile = RETAIN([coder decodeObjectForKey: @"FOOSoundStream:soundFile"]); ! _channelNumber = [coder decodeIntForKey: @"FOOSoundStream:channelNumber"]; ! } ! else ! { ! _soundFile = RETAIN([coder decodeObject]); ! [coder decodeValueOfObjCType: @encode(int) at: &_channelNumber]; ! } ! ! return self; ! } @end Index: FOOOutput.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOOutput.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOOutput.m 4 Aug 2004 06:16:41 -0000 1.2 --- FOOOutput.m 13 Aug 2004 21:38:01 -0000 1.3 *************** *** 52,55 **** --- 52,57 ---- #include "FOO/FOOBuffer.h" + #import <Foundation/NSKeyedArchiver.h> + @implementation FOOOutput *************** *** 101,122 **** ! // /* ! // * archiving methods ! // */ ! // - read:(TypedStream *)stream ! // { ! // [super read:stream]; ! // objc_read_types(stream, "@i", &input, &channel); ! // return self; ! // } ! // - write:(TypedStream *)stream ! // { ! // [super write:stream]; ! // objc_write_types(stream, "@i", &input, &channel); ! // return self; ! // } @end ! --- 103,147 ---- ! /* ! * archiving methods ! */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! [super encodeWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeObject: _input forKey: @"FOOOutput:input"]; ! [coder encodeInt: _channel forKey: @"FOOOutput:channel"]; ! } ! else ! { ! [coder encodeObject: _input]; ! [coder encodeValueOfObjCType: @encode(int) at: &_channel]; ! } ! ! return; ! } ! ! ! - (FOOOutput *) initWithCoder: (NSCoder *)coder ! { ! self = [super initWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! _input = RETAIN([coder decodeObjectForKey: @"FOOOutput:input"]); ! _channel = [coder decodeIntForKey: @"FOOOutput:channel"]; ! } ! else ! { ! _input = RETAIN([coder decodeObject]); ! [coder decodeValueOfObjCType: @encode(int) at: &_channel]; ! } ! ! return self; ! } @end ! Index: FOOOutputManager.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOOutputManager.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOOutputManager.m 4 Aug 2004 06:16:41 -0000 1.2 --- FOOOutputManager.m 13 Aug 2004 21:38:01 -0000 1.3 *************** *** 41,44 **** --- 41,46 ---- #include "FOO/FOOContext.h" + #import <Foundation/NSKeyedArchiver.h> + @implementation FOOOutputManager *************** *** 335,364 **** ! // /* ! // * archiving methods ! // */ ! // - awake ! // { ! // [super awake]; ! // soundfile = nil; ! // buffers = nil; ! // filename = nil; ! // return self; ! // } ! // - read:(TypedStream *)stream ! // { ! // [super read:stream]; ! // objc_read_types(stream, "@i", &context, &channels); ! // return self; ! // } ! // - write:(TypedStream *)stream ! // { ! // [super write:stream]; ! // objc_write_types(stream, "@i", &context, &channels); ! // return self; ! // } @end --- 337,384 ---- ! /* ! * archiving methods ! */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! [super encodeWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeObject: _context forKey: @"FOOOutputManager:context"]; ! [coder encodeInt: _channels forKey: @"FOOOutputManager:channels"]; ! } ! else ! { ! [coder encodeObject: _context]; ! [coder encodeValueOfObjCType: @encode(int) at: &_channels]; ! } ! return; ! } ! ! ! - (FOOOutputManager *) initWithCoder: (NSCoder *)coder ! { ! self = [super initWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! _context = RETAIN([coder decodeObjectForKey: @"FOOOutputManager:context"]); ! _channels = [coder decodeIntForKey: @"FOOOutputManager:channels"]; ! } ! else ! { ! _context = RETAIN([coder decodeObject]); ! [coder decodeValueOfObjCType: @encode(int) at: &_channels]; ! } ! ! _soundfile = nil; ! _buffers = nil; ! _filename = nil; ! ! return self; ! } @end Index: FOOEagerModule.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOEagerModule.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOEagerModule.m 4 Aug 2004 06:16:41 -0000 1.2 --- FOOEagerModule.m 13 Aug 2004 21:38:01 -0000 1.3 *************** *** 39,42 **** --- 39,44 ---- #include "FOO/FOOBuffer.h" + #import <Foundation/NSKeyedArchiver.h> + @implementation FOOEagerModule *************** *** 61,63 **** --- 63,85 ---- } + + /* + * archiving methods + */ + + - (void) encodeWithCoder: (NSCoder *)coder + { + [super encodeWithCoder: coder]; + + return; + } + + + - (FOOEagerModule *) initWithCoder: (NSCoder *)coder + { + self = [super initWithCoder: coder]; + + return self; + } + @end Index: FOOModule.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOModule.m,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FOOModule.m 4 Aug 2004 06:16:41 -0000 1.4 --- FOOModule.m 13 Aug 2004 21:38:01 -0000 1.5 *************** *** 41,44 **** --- 41,47 ---- #include "FOO/FOONilModule.h" + #import <Foundation/NSKeyedArchiver.h> + + // static FOONilModule *_nilModule = nil; *************** *** 265,285 **** ! // /* ! // * archiving methods ! // */ ! // - read:(TypedStream *)stream ! // { ! // [super read:stream]; ! // objc_read_types(stream, "@@", &inputs, &output); ! // return self; ! // } ! // - write:(TypedStream *)stream ! // { ! // [super write:stream]; ! // objc_write_types(stream, "@@", &inputs, &output); ! // return self; ! // } @end --- 268,311 ---- ! /* ! * archiving methods ! */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! [super encodeWithCoder: coder]; ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeObject: _inputs forKey: @"FOOModule:inputs"]; ! [coder encodeObject: _output forKey: @"FOOOutput:output"]; ! } ! else ! { ! [coder encodeObject: _inputs]; ! [coder encodeObject: _output]; ! } ! ! return; ! } ! ! ! - (FOOModule *) initWithCoder: (NSCoder *)coder ! { ! self = [super initWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! _inputs = RETAIN([coder decodeObjectForKey: @"FOOModule:inputs"]); ! _output = RETAIN([coder decodeObjectForKey: @"FOOModule:output"]); ! } ! else ! { ! _inputs = RETAIN([coder decodeObject]); ! _output = RETAIN([coder decodeObject]); ! } ! ! return self; ! } @end Index: FOOBreakpointFunction.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOBreakpointFunction.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOBreakpointFunction.m 4 Aug 2004 06:16:41 -0000 1.2 --- FOOBreakpointFunction.m 13 Aug 2004 21:38:01 -0000 1.3 *************** *** 43,46 **** --- 43,51 ---- #include "FOO/FOOContext.h" + #import <Foundation/NSKeyedArchiver.h> + #import <Foundation/NSArray.h> + #import <Foundation/NSValue.h> + #import <Foundation/NSException.h> + /* transexp from cmusic's 'transit' by Dick Moore */ *************** *** 164,168 **** b = [NSString stringWithFormat: @"beginT = %f, endT = %f\n", _beginT, _endT]; - AUTORELEASE(b); [FOOGlobalsManager schemeOutput: b]; while (sp->count != 0) --- 169,172 ---- *************** *** 170,174 **** b = [NSString stringWithFormat: @"%2d: %f %f %f %f %d\n", i, sp->value, sp->time, sp->delta, sp->alpha, sp->count]; - AUTORELEASE(b); [FOOGlobalsManager schemeOutput: b]; ++sp; --- 174,177 ---- *************** *** 283,309 **** ! // /* ! // * archiving methods ! // v */ ! // - read:(TypedStream *)stream ! // { ! // [super read:stream]; ! // objc_read_types(stream, "i[8c][8c][8c]", &length, &beginT, &endT, &firstV); ! // segments = NSZoneCalloc([self zone], length, sizeof(lineseg_t)); ! // objc_read_array(stream, "{ff[8c][8c]i}", length, segments); ! // return self; ! // } ! // - write:(TypedStream *)stream ! // { ! // lineseg_t *original = [self restoreSegments]; ! // [super write:stream]; ! // objc_write_types(stream, "i[8c][8c][8c]", &length, &beginT, &endT, &firstV); ! // objc_write_array(stream, "{ff[8c][8c]i}", length, original); ! // NSZoneFree([self zone], original); ! // return self; ! // } @end --- 286,427 ---- ! /* ! * archiving methods ! */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! [super encodeWithCoder: coder]; ! lineseg_t *original = [self restoreSegments]; ! // _segments: wrap all the stuff into one NSArray of NSArrays of ! // NSNumbers ! NSMutableArray *segments = [NSMutableArray array]; // AUTORELEASEd ! int i; ! ! for (i = 0; i < _length; ++i) ! { ! NSNumber *numarray[5]; ! ! if (IS_SAMPLE_T(@encode(float))) ! { ! numarray[0] = [NSNumber numberWithFloat: original[i].value]; ! numarray[1] = [NSNumber numberWithFloat: original[i].delta]; ! } ! else if (IS_SAMPLE_T(@encode(double))) ! { ! numarray[0] = [NSNumber numberWithDouble: original[i].value]; ! numarray[1] = [NSNumber numberWithDouble: original[i].delta]; ! } ! else ! { ! [NSException raise: @"FOOUnknownSampleFormatException" ! format: @"sample_t neither float nor double"]; ! } ! ! numarray[2] = [NSNumber numberWithDouble: original[i].alpha]; ! numarray[3] = [NSNumber numberWithDouble: original[i].time]; ! numarray[4] = [NSNumber numberWithInt: original[i].count]; ! ! [segments insertObject: [NSArray arrayWithObjects: numarray count: 5] ! atIndex: i]; ! } ! ! if ([coder allowsKeyedCoding]) ! { ! // _segments ! [coder encodeObject: segments forKey: @"FOOBreakpointFunction:segments"]; ! // rest of the members ! [coder encodeInt: _length forKey: @"FOOBreakpointFunction:length"]; ! [coder encodeDouble: _beginT forKey: @"FOOBreakpointFunction:beginT"]; ! [coder encodeDouble: _endT forKey: @"FOOBreakpointFunction:endT"]; ! [coder encodeDouble: _firstV forKey: @"FOOBreakpointFunction:firstV"]; ! [coder encodeDouble: _firstA forKey: @"FOOBreakpointFunction:firstA"]; ! } ! else ! { ! [coder encodeObject: segments]; ! [coder encodeValueOfObjCType: @encode(int) at: &_length]; ! [coder encodeValueOfObjCType: @encode(double) at: &_beginT]; ! [coder encodeValueOfObjCType: @encode(double) at: &_endT]; ! [coder encodeValueOfObjCType: @encode(double) at: &_firstV]; ! [coder encodeValueOfObjCType: @encode(double) at: &_firstA]; ! } ! ! NSZoneFree([self zone], original); ! ! return; ! } ! ! ! - (FOOBreakpointFunction *) initWithCoder: (NSCoder *)coder ! { ! NSArray *segments; ! int i, count; ! ! self = [super initWithCoder: coder]; ! ! if ([coder allowsKeyedCoding]) ! { ! // don't RETAIN the following, since we still have to unpack it ! segments = [coder decodeObjectForKey: @"FOOBreakpointFunction:segments"]; ! _length = [coder decodeIntForKey: @"FOOBreakpointFunction:length"]; ! _beginT = [coder decodeDoubleForKey: @"FOOBreakpointFunction:beginT"]; ! _endT = [coder decodeDoubleForKey: @"FOOBreakpointFunction:endT"]; ! _firstV = [coder decodeDoubleForKey: @"FOOBreakpointFunction:firstV"]; ! _firstA = [coder decodeDoubleForKey: @"FOOBreakpointFunction:firstA"]; ! } ! else ! { ! segments = [coder decodeObject]; ! [coder decodeValueOfObjCType: @encode(int) at: &_length]; ! [coder decodeValueOfObjCType: @encode(double) at: &_beginT]; ! [coder decodeValueOfObjCType: @encode(double) at: &_endT]; ! [coder decodeValueOfObjCType: @encode(double) at: &_firstV]; ! [coder decodeValueOfObjCType: @encode(double) at: &_firstA]; ! } ! ! // unpack segments ! count = [segments count]; ! ! // check consistency ! if (count != _length) ! { ! [NSException raise: @"FOOUnarchiveInconsistencyException" ! format: @"_segments in archive not of length _length"]; ! } ! ! _segments = NSZoneMalloc([self zone], count * sizeof(lineseg_t)); ! ! for (i = 0; i < count; ++i) ! { ! NSNumber *numarray[5]; ! ! [[segments objectAtIndex: i] getObjects: numarray]; ! ! if (IS_SAMPLE_T(@encode(float))) ! { ! _segments[i].value = [numarray[0] floatValue]; ! _segments[i].delta = [numarray[1] floatValue]; ! } ! else if (IS_SAMPLE_T(@encode(double))) ! { ! _segments[i].value = [numarray[0] doubleValue]; ! _segments[i].delta = [numarray[1] doubleValue]; ! } ! else ! { ! [NSException raise: @"FOOUnknownSampleFormatException" ! format: @"sample_t neither float nor double"]; ! } ! ! _segments[i].alpha = [numarray[2] doubleValue]; ! _segments[i].time = [numarray[3] doubleValue]; ! _segments[i].count = [numarray[4] intValue]; ! } ! ! return self; ! } @end Index: FOOContext.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOContext.m,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FOOContext.m 5 Aug 2004 21:14:03 -0000 1.3 --- FOOContext.m 13 Aug 2004 21:38:01 -0000 1.4 *************** *** 47,50 **** --- 47,52 ---- #include "FOO/FOOBuffer.h" + #import <Foundation/NSKeyedArchiver.h> + @implementation FOOContext *************** *** 365,413 **** ! // /* ! // * archiving methods ! // */ ! // - awake ! // { ! // NSZone *zone = [self zone]; ! // [super awake]; ! // volatileBufferManager = [[BufferManager allocWithZone:zone] init]; ! // sharedBufferManager = [[BufferManager allocWithZone:zone] init]; ! // numberOfSharedBuffers = 0; ! // locked = NO; ! // return self; ! // } - // - read:(TypedStream *)stream - // { - // [super read:stream]; - // // objc_read_types(stream, "di@@@@i", - // objc_read_types(stream, "[8c]i@@@@i", - // &samplingRate, - // &bufferSize, - // &moduleManager, - // &substrateManager, - // &outputManager, - // &nilModule, - // &numberOfChannels); - // return self; - // } ! // - write:(TypedStream *)stream ! // { ! // [super write:stream]; ! // // objc_write_types(stream, "di@@@@i", ! // objc_write_types(stream, "[8c]i@@@@i", ! // &samplingRate, ! // &bufferSize, ! // &moduleManager, ! // &substrateManager, ! // &outputManager, ! // &nilModule, ! // &numberOfChannels); ! // return self; ! // } @end --- 367,440 ---- ! /* ! * archiving methods ! */ ! - (void) encodeWithCoder: (NSCoder *)coder ! { ! // no [super encode ...] call, since FOOObject doesn't implement <NSCoding> ! if ([coder allowsKeyedCoding]) ! { ! [coder encodeDouble: _samplingRate forKey: @"FOOContext:samplingRate"]; ! [coder encodeInt: _bufferSize forKey: @"FOOContext:bufferSize"]; ! [coder encodeObject: _moduleManager forKey: @"FOOContext:moduleManager"]; ! [coder encodeObject: _eagerModuleManager forKey: @"FOOContext:eagerModuleManager"]; ! [coder encodeObject: _substrateManager forKey: @"FOOContext:substrateManager"]; ! [coder encodeObject: _outputManager forKey: @"FOOContext:outputManager"]; ! [coder encodeObject: _nilModule forKey: @"FOOContext:nilModule"]; ! [coder encodeInt: _numberOfChannels forKey: @"FOOContext:numberOfChannels"]; ! } ! else ! { ! [coder encodeValueOfObjCType: @encode(double) at: &_samplingRate]; ! [coder encodeValueOfObjCType: @encode(int) at: &_bufferSize]; ! [coder encodeObject: _moduleManager]; ! [coder encodeObject: _eagerModuleManager]; ! [coder encodeObject: _substrateManager]; ! [coder encodeObject: _outputManager]; ! [coder encodeObject: _nilModule]; ! [coder encodeValueOfObjCType: @encode(int) at: &_numberOfChannels]; ! } ! return; ! } ! - (FOOContext *) initWithCoder: (NSCoder *)coder ! { ! self = [super init]; ! NSZone *zone; ! ! if ([coder allowsKeyedCoding]) ! { ! _samplingRate = [coder decodeDoubleForKey: @"FOOContext:samplingRate"]; ! _bufferSize = [coder decodeIntForKey: @"FOOContext:bufferSize"]; ! _moduleManager = RETAIN([coder decodeObjectForKey: @"FOOContext:moduleManager"]); ! _eagerModuleManager = RETAIN([coder decodeObjectForKey: @"FOOContext:eagerModuleManager"]); ! _substrateManager = RETAIN([coder decodeObjectForKey: @"FOOContext:substrateManager"]); ! _outputManager = RETAIN([coder decodeObjectForKey: @"FOOContext:outputManager"]); ! _nilModule = RETAIN([coder decodeObjectForKey: @"FOOContext:nilModule"]); ! _numberOfChannels = [coder decodeIntForKey: @"FOOContext:numberOfChannels"]; ! } ! else ! { ! [coder decodeValueOfObjCType: @encode(double) at: &_samplingRate]; ! [coder decodeValueOfObjCType: @encode(int) at: &_bufferSize]; ! _moduleManager = RETAIN([coder decodeObject]); ! _eagerModuleManager = RETAIN([coder decodeObject]); ! _substrateManager = RETAIN([coder decodeObject]); ! _outputManager = RETAIN([coder decodeObject]); ! _nilModule = RETAIN([coder decodeObject]); ! [coder decodeValueOfObjCType: @encode(int) at: &_numberOfChannels]; ! } ! ! zone = [self zone]; ! _volatileBufferManager = [[FOOBufferManager allocWithZone: zone] init]; ! _sharedBufferManager = [[FOOBufferManager allocWithZone: zone] init]; ! _numberOfSharedBuffers = 0; ! _locked = NO; ! ! return self; ! } @end |
Update of /cvsroot/foo/foo/libfoo/FOO In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17943 Modified Files: FOOBreakpointFunction.h FOOBufferManager.h FOOContext.h FOOContextPart.h FOOEagerModule.h FOOEagerModuleManager.h FOOGlobal.h FOOGlobalsManager.h FOOModule.h FOOModuleManager.h FOOObjectManager.h FOOOutput.h FOOOutputManager.h FOORegion.h FOOSoundFile.h FOOSoundStream.h FOOSubstrate.h FOOSubstrateManager.h Log Message: archivable kernel objects do conform to <NSCoding> protocol now Index: FOOContextPart.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/FOO/FOOContextPart.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOContextPart.h 4 Aug 2004 06:15:57 -0000 1.2 --- FOOContextPart.h 13 Aug 2004 21:36:50 -0000 1.3 *************** *** 43,47 **** ! @interface FOOContextPart : FOOObject { FOOContext *_context; --- 43,47 ---- ! @interface FOOContextPart : FOOObject <NSCoding> { FOOContext *_context; Index: FOOSoundFile.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/FOO/FOOSoundFile.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOSoundFile.h 4 Aug 2004 06:15:57 -0000 1.2 --- FOOSoundFile.h 13 Aug 2004 21:36:50 -0000 1.3 *************** *** 71,75 **** ! @interface FOOSoundFile : FOOSubstrate { NSString *_fileName; --- 71,75 ---- ! @interface FOOSoundFile : FOOSubstrate <NSCoding> { NSString *_fileName; Index: FOOGlobalsManager.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/FOO/FOOGlobalsManager.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FOOGlobalsManager.h 4 Aug 2004 06:43:02 -0000 1.3 --- FOOGlobalsManager.h 13 Aug 2004 21:36:50 -0000 1.4 *************** *** 44,48 **** @class FOOLookupTable; ! #define SINXOVERX_POINTS_PER_TAP 500 --- 44,48 ---- @class FOOLookupTable; ! @class FOOContext; #define SINXOVERX_POINTS_PER_TAP 500 *************** *** 71,78 **** + (void) setTrace: (BOOL)val; - // this seems not to be used in foo - // + (void) loadClass: (NSString *)path; - // + (void) unloadLast; - + (void) schemeOutput: (NSString *)string; --- 71,74 ---- *************** *** 93,96 **** --- 89,95 ---- + (void) setDefaultBlockSize: (int)size; + + (BOOL) archiveContext: (FOOContext *)context toFile: (NSString *)path; + + (FOOContext *) unArchiveContextWithFile: (NSString *)path; + @end Index: FOOSubstrateManager.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/FOO/FOOSubstrateManager.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOSubstrateManager.h 4 Aug 2004 06:15:57 -0000 1.2 --- FOOSubstrateManager.h 13 Aug 2004 21:36:50 -0000 1.3 *************** *** 41,45 **** ! @interface FOOSubstrateManager : FOOObjectManager { --- 41,45 ---- ! @interface FOOSubstrateManager : FOOObjectManager <NSCoding> { Index: FOOEagerModuleManager.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/FOO/FOOEagerModuleManager.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOEagerModuleManager.h 4 Aug 2004 06:15:57 -0000 1.2 --- FOOEagerModuleManager.h 13 Aug 2004 21:36:50 -0000 1.3 *************** *** 41,45 **** ! @interface FOOEagerModuleManager : FOOObjectManager { --- 41,45 ---- ! @interface FOOEagerModuleManager : FOOObjectManager <NSCoding> { Index: FOOBreakpointFunction.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/FOO/FOOBreakpointFunction.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOBreakpointFunction.h 4 Aug 2004 06:15:57 -0000 1.2 --- FOOBreakpointFunction.h 13 Aug 2004 21:36:50 -0000 1.3 *************** *** 53,57 **** ! @interface FOOBreakpointFunction : FOOSubstrate { lineseg_t *_segments; --- 53,57 ---- ! @interface FOOBreakpointFunction : FOOSubstrate <NSCoding> { lineseg_t *_segments; Index: FOOOutput.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/FOO/FOOOutput.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOOutput.h 4 Aug 2004 06:15:57 -0000 1.2 --- FOOOutput.h 13 Aug 2004 21:36:50 -0000 1.3 *************** *** 45,49 **** ! @interface FOOOutput : FOOContextPart { FOOModule *_input; --- 45,49 ---- ! @interface FOOOutput : FOOContextPart <NSCoding> { FOOModule *_input; *************** *** 52,57 **** - (FOOOutput *) initWithChannel: (int)chan; ! - (FOOOutput *) connect: (FOOModule *) aModule; ! - (FOOOutput *) output: (FOOOutputManager *) outputManager; - (FOOOutput *) assignBuffers; --- 52,57 ---- - (FOOOutput *) initWithChannel: (int)chan; ! - (FOOOutput *) connect: (FOOModule *)aModule; ! - (FOOOutput *) output: (FOOOutputManager *)outputManager; - (FOOOutput *) assignBuffers; Index: FOOBufferManager.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/FOO/FOOBufferManager.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOBufferManager.h 4 Aug 2004 06:15:57 -0000 1.2 --- FOOBufferManager.h 13 Aug 2004 21:36:50 -0000 1.3 *************** *** 45,49 **** ! @interface FOOBufferManager : FOOObjectManager { int _bufferSize; --- 45,49 ---- ! @interface FOOBufferManager : FOOObjectManager <NSCoding> { int _bufferSize; Index: FOOGlobal.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/FOO/FOOGlobal.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOGlobal.h 4 Aug 2004 06:15:57 -0000 1.2 --- FOOGlobal.h 13 Aug 2004 21:36:50 -0000 1.3 *************** *** 40,49 **** #include <assert.h> #include <math.h> #import <Foundation/NSString.h> #include <FOO/FOOGlobalsManager.h> ! typedef float sample_t; ! #define FOO_ERROR(ret, val) { \ NSString *_buffeR_; \ --- 40,51 ---- #include <assert.h> #include <math.h> + #include <string.h> + #import <Foundation/NSString.h> + #import <Foundation/NSException.h> #include <FOO/FOOGlobalsManager.h> ! /* error printing macro */ #define FOO_ERROR(ret, val) { \ NSString *_buffeR_; \ *************** *** 54,60 **** --- 56,144 ---- if (ret) return val; } + /* convenience stuff */ #define SAMPLERATE ([_context getSamplingRate]) #define SEC_TO_SAM(s) ((int) (rint((s) * SAMPLERATE))) #define SAM_TO_SEC(s) ((s) / SAMPLERATE) + + /* our sample type */ + typedef float sample_t; /* c typedef */ + #define SAMPLE_T @encode(float) /* objc encoded type string */ + + /* helper method to determine sample type with ObjC */ + #define IS_SAMPLE_T(comp_t) \ + ! strcmp(SAMPLE_T, (comp_t)) + + /* archiving data with sample type + * convenience macros for getting the right NSArchiver call */ + + /* REMINDER: whenever adding types here, remember to add them to + * FOOBreakpointFunction as well, since the _segments array of structs + * needs special treatment + */ + + /* keyed archiving */ + #define ENCODE_KEYED_SAMPLE_T(arch_data, arch_key) \ + if (IS_SAMPLE_T(@encode(float))) \ + { \ + [coder encodeFloat: arch_data forKey: arch_key]; \ + } \ + else if (IS_SAMPLE_T(@encode(double))) \ + { \ + [coder encodeDouble: arch_data forKey: arch_key]; \ + } \ + else \ + { \ + [NSException raise: @"FOOUnknownSampleFormatException" \ + format: @"sample_t neither float nor double"]; \ + } + + /* keyed unarchiving */ + #define DECODE_KEYED_SAMPLE_T(arch_data, arch_key) \ + if (IS_SAMPLE_T(@encode(float))) \ + { \ + arch_data = [coder decodeFloatForKey: arch_key]; \ + } \ + else if (IS_SAMPLE_T(@encode(double))) \ + { \ + arch_data = [coder decodeDoubleForKey: arch_key]; \ + } \ + else \ + { \ + [NSException raise: @"FOOUnknownSampleFormatException" \ + format: @"sample_t neither float nor double"]; \ + } + + /* non-keyed archiving */ + #define ENCODE_UNKEYED_SAMPLE_T(arch_data) \ + if (IS_SAMPLE_T(@encode(float))) \ + { \ + [coder encodeValueOfObjCType: @encode(float) at: &arch_data]; \ + } \ + if (IS_SAMPLE_T(@encode(double))) \ + { \ + [coder encodeValueOfObjCType: @encode(double) at: &arch_data]; \ + } \ + else \ + { \ + [NSException raise: @"FOOUnknownSampleFormatException" \ + format: @"sample_t neither float nor double"]; \ + } + + /* non-keyed unarchiving */ + #define DECODE_UNKEYED_SAMPLE_T(arch_data) \ + if (IS_SAMPLE_T(@encode(float))) \ + { \ + [coder decodeValueOfObjCType: @encode(float) at: &arch_data]; \ + } \ + if (IS_SAMPLE_T(@encode(double))) \ + { \ + [coder decodeValueOfObjCType: @encode(double) at: &arch_data]; \ + } \ + else \ + { \ + [NSException raise: @"FOOUnknownSampleFormatException" \ + format: @"sample_t neither float nor double"]; \ + } + #endif /* #ifndef FOO_FOOGLOBAL_H_INCLUDED */ Index: FOOObjectManager.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/FOO/FOOObjectManager.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOObjectManager.h 4 Aug 2004 06:15:57 -0000 1.2 --- FOOObjectManager.h 13 Aug 2004 21:36:50 -0000 1.3 *************** *** 44,48 **** ! @interface FOOObjectManager : FOOObject { NSMutableArray* _objects; --- 44,48 ---- ! @interface FOOObjectManager : FOOObject <NSCoding> { NSMutableArray* _objects; Index: FOOSoundStream.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/FOO/FOOSoundStream.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOSoundStream.h 4 Aug 2004 06:15:57 -0000 1.2 --- FOOSoundStream.h 13 Aug 2004 21:36:50 -0000 1.3 *************** *** 45,49 **** ! @interface FOOSoundStream : FOOSubstrate { FOOSoundFile *_soundFile; --- 45,49 ---- ! @interface FOOSoundStream : FOOSubstrate <NSCoding> { FOOSoundFile *_soundFile; Index: FOOSubstrate.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/FOO/FOOSubstrate.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOSubstrate.h 4 Aug 2004 06:15:57 -0000 1.2 --- FOOSubstrate.h 13 Aug 2004 21:36:50 -0000 1.3 *************** *** 42,46 **** ! @interface FOOSubstrate : FOOContextPart { --- 42,46 ---- ! @interface FOOSubstrate : FOOContextPart <NSCoding> { Index: FOOModuleManager.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/FOO/FOOModuleManager.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOModuleManager.h 4 Aug 2004 06:15:57 -0000 1.2 --- FOOModuleManager.h 13 Aug 2004 21:36:50 -0000 1.3 *************** *** 41,45 **** ! @interface FOOModuleManager : FOOObjectManager { --- 41,45 ---- ! @interface FOOModuleManager : FOOObjectManager <NSCoding> { Index: FOOModule.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/FOO/FOOModule.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOModule.h 4 Aug 2004 06:15:57 -0000 1.2 --- FOOModule.h 13 Aug 2004 21:36:50 -0000 1.3 *************** *** 76,80 **** ! @interface FOOModule : FOOContextPart { NSMutableArray *_inputs; --- 76,80 ---- ! @interface FOOModule : FOOContextPart <NSCoding> { NSMutableArray *_inputs; Index: FOOContext.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/FOO/FOOContext.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOContext.h 4 Aug 2004 06:15:57 -0000 1.2 --- FOOContext.h 13 Aug 2004 21:36:50 -0000 1.3 *************** *** 58,62 **** // extern id getCurrentContext(); // exported by ../objc/context.m ! @interface FOOContext : FOOObject { double _time; --- 58,62 ---- // extern id getCurrentContext(); // exported by ../objc/context.m ! @interface FOOContext : FOOObject <NSCoding> { double _time; Index: FOOOutputManager.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/FOO/FOOOutputManager.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOOutputManager.h 4 Aug 2004 06:15:57 -0000 1.2 --- FOOOutputManager.h 13 Aug 2004 21:36:50 -0000 1.3 *************** *** 49,53 **** ! @interface FOOOutputManager : FOOObjectManager { FOOContext *_context; --- 49,53 ---- ! @interface FOOOutputManager : FOOObjectManager <NSCoding> { FOOContext *_context; Index: FOOEagerModule.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/FOO/FOOEagerModule.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOEagerModule.h 4 Aug 2004 06:15:57 -0000 1.2 --- FOOEagerModule.h 13 Aug 2004 21:36:50 -0000 1.3 *************** *** 40,44 **** #include <FOO/FOOModule.h> ! @interface FOOEagerModule : FOOModule { --- 40,44 ---- #include <FOO/FOOModule.h> ! @interface FOOEagerModule : FOOModule <NSCoding> { Index: FOORegion.h =================================================================== RCS file: /cvsroot/foo/foo/libfoo/FOO/FOORegion.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOORegion.h 4 Aug 2004 06:15:57 -0000 1.2 --- FOORegion.h 13 Aug 2004 21:36:50 -0000 1.3 *************** *** 42,46 **** ! @interface FOORegion : FOOSubstrate { /* Substrate *substrate; // statically typed */ --- 42,46 ---- ! @interface FOORegion : FOOSubstrate <NSCoding> { /* Substrate *substrate; // statically typed */ |
|
From: Martin R. <ru...@us...> - 2004-08-13 21:35:45
|
Update of /cvsroot/foo/foo/elkfoo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17784 Modified Files: configure.ac Log Message: added -Wno-import switch to avoid warnings regarding #import usage on linux/gcc < 3.4 Index: configure.ac =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/configure.ac,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** configure.ac 12 Aug 2004 23:15:37 -0000 1.11 --- configure.ac 13 Aug 2004 21:35:36 -0000 1.12 *************** *** 101,104 **** --- 101,107 ---- FOO_GNUSTEP_LDFLAGS="\$(GNUSTEP_LIBRARIES_FLAGS)" + # get rid of warnings regarding #import + ELKFOO_OBJCFLAGS="${ELKFOO_OBJCFLAGS} -Wno-import" + else # set flags for cocoa framework |
|
From: Martin R. <ru...@us...> - 2004-08-13 21:34:52
|
Update of /cvsroot/foo/foo/elkfoo/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17518 Modified Files: bpf.m context.m defaults.m foofun.m fooinit.m module.m modules.m pointer.m signals.m snd.m soundfile.m task.m tell.m types.m Log Message: new include policy. the return of write-context, read-context, copy-context Index: foofun.m =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/src/foofun.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** foofun.m 6 Aug 2004 02:52:59 -0000 1.2 --- foofun.m 13 Aug 2004 21:34:39 -0000 1.3 *************** *** 31,45 **** */ ! #ifdef HAVE_CONFIG_H ! #include "config.h" ! #endif ! ! #define Object SchemeObject /* avoid Obj-C type clash */ ! #ifdef HAVE_FOOELK_SCHEME_H ! #include <fooelk/scheme.h> ! #else ! #include <elk/scheme.h> ! #endif ! #undef Object #include <math.h> --- 31,35 ---- */ ! #include "elkfoo.h" #include <math.h> Index: tell.m =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/src/tell.m,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** tell.m 9 Aug 2004 17:30:47 -0000 1.14 --- tell.m 13 Aug 2004 21:34:39 -0000 1.15 *************** *** 31,37 **** */ ! #ifdef HAVE_CONFIG_H ! #include "config.h" ! #endif #import <Foundation/NSObjCRuntime.h> --- 31,35 ---- */ ! #include "elkfoo.h" #import <Foundation/NSObjCRuntime.h> *************** *** 42,55 **** #include <strings.h> - #define Object SchemeObject /* avoid Obj-C type clash */ - #ifdef HAVE_FOOELK_SCHEME_H - #include <fooelk/scheme.h> - #else - #include <elk/scheme.h> - #endif - #undef Object - - #include "elkfoo.h" - static SchemeObject --- 40,43 ---- Index: signals.m =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/src/signals.m,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** signals.m 6 Aug 2004 02:52:59 -0000 1.4 --- signals.m 13 Aug 2004 21:34:39 -0000 1.5 *************** *** 31,52 **** */ - #ifdef HAVE_CONFIG_H - #include "config.h" - #endif - - // #include <objc/objc-class.h> /* objc_class */ - // #include <objc/objc-api.h> /* objc_class */ - // #include <objc/Object.h> - - #define Object SchemeObject /* avoid Obj-C type clash */ - #ifdef HAVE_FOOELK_SCHEME_H - #include <fooelk/scheme.h> - #else - #include <elk/scheme.h> - #endif - #undef Object - #include "elkfoo.h" int T_Signal; --- 31,37 ---- */ #include "elkfoo.h" + int T_Signal; Index: module.m =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/src/module.m,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** module.m 6 Aug 2004 02:52:59 -0000 1.5 --- module.m 13 Aug 2004 21:34:39 -0000 1.6 *************** *** 31,37 **** */ ! #ifdef HAVE_CONFIG_H ! #include "config.h" ! #endif #ifdef NeXT_RUNTIME --- 31,35 ---- */ ! #include "elkfoo.h" #ifdef NeXT_RUNTIME *************** *** 44,62 **** #import <Foundation/NSString.h> - // #include <objc/Object.h> - #define Object SchemeObject /* avoid Obj-C type clash */ - #ifdef HAVE_FOOELK_SCHEME_H - #include <fooelk/scheme.h> - #else - #include <elk/scheme.h> - #endif - #undef Object - - #include "elkfoo.h" int T_Module; - SchemeObject Get_Context (); /* defined in context.m */ --- 42,49 ---- Index: modules.m =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/src/modules.m,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** modules.m 6 Aug 2004 02:52:59 -0000 1.3 --- modules.m 13 Aug 2004 21:34:39 -0000 1.4 *************** *** 31,37 **** */ ! #ifdef HAVE_CONFIG_H ! #include "config.h" ! #endif #include <FOO/FOOContext.h> --- 31,35 ---- */ ! #include "elkfoo.h" #include <FOO/FOOContext.h> *************** *** 71,90 **** #include "FOOMVariableTwoPole.h" - #define Object SchemeObject /* avoid Obj-C type clash */ - #ifdef HAVE_FOOELK_SCHEME_H - #include <fooelk/scheme.h> - #else - #include <elk/scheme.h> - #endif - #undef Object - #include <sys/types.h> #include <sys/timeb.h> - #include "elkfoo.h" #define IdOf(module) (MODULE_T(module)->pointer) - static int Get_Taps (SchemeObject taps) --- 69,78 ---- Index: soundfile.m =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/src/soundfile.m,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** soundfile.m 5 Aug 2004 22:30:31 -0000 1.3 --- soundfile.m 13 Aug 2004 21:34:39 -0000 1.4 *************** *** 31,44 **** */ ! #ifdef HAVE_CONFIG_H ! #include "config.h" ! #endif #include <FOO/FOOSoundFile.h> - #include <signal.h> - #include <sndfile.h> #include <limits.h> /* for PATH_MAX */ #include <sys/types.h> --- 31,41 ---- */ ! #include "elkfoo.h" #include <FOO/FOOSoundFile.h> #include <sndfile.h> + #include <signal.h> #include <limits.h> /* for PATH_MAX */ #include <sys/types.h> *************** *** 46,58 **** #include <sys/stat.h> - #define Object SchemeObject /* avoid Obj-C type clash */ - #ifdef HAVE_FOOELK_SCHEME_H - #include <fooelk/scheme.h> - #else - #include <elk/scheme.h> - #endif - #undef Object - - #include "elkfoo.h" SchemeObject General_File_Operation (SchemeObject s, int op); --- 43,46 ---- Index: bpf.m =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/src/bpf.m,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** bpf.m 6 Aug 2004 05:59:07 -0000 1.6 --- bpf.m 13 Aug 2004 21:34:38 -0000 1.7 *************** *** 31,47 **** */ - #ifdef HAVE_CONFIG_H - #include "config.h" - #endif - - #define Object SchemeObject /* avoid Obj-C type clash */ - #ifdef HAVE_FOOELK_SCHEME_H - #include <fooelk/scheme.h> - #else - #include <elk/scheme.h> - #endif - #undef Object - #include "elkfoo.h" #include <FOO/FOOBreakpointFunction.h> --- 31,36 ---- */ #include "elkfoo.h" + #include <FOO/FOOBreakpointFunction.h> Index: snd.m =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/src/snd.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** snd.m 5 Aug 2004 18:58:52 -0000 1.2 --- snd.m 13 Aug 2004 21:34:39 -0000 1.3 *************** *** 31,37 **** */ ! #ifdef HAVE_CONFIG_H ! #include "config.h" ! #endif #include <FOO/FOOSoundFile.h> --- 31,35 ---- */ ! #include "elkfoo.h" #include <FOO/FOOSoundFile.h> *************** *** 45,57 **** #include <sys/stat.h> - #define Object SchemeObject /* avoid Obj-C type clash */ - #ifdef HAVE_FOOELK_SCHEME_H - #include <fooelk/scheme.h> - #else - #include <elk/scheme.h> - #endif - #undef Object - - #include "elkfoo.h" int T_Snd; --- 43,46 ---- *************** *** 180,184 **** s = A_Make_Snd([FOOSoundFile class]); ! filename = AUTORELEASE([NSString stringWithCString: cn]); if ([IdOf(s) initWithFile: filename] == nil) --- 169,173 ---- s = A_Make_Snd([FOOSoundFile class]); ! filename = [NSString stringWithCString: cn]; if ([IdOf(s) initWithFile: filename] == nil) Index: context.m =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/src/context.m,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** context.m 6 Aug 2004 02:52:59 -0000 1.5 --- context.m 13 Aug 2004 21:34:39 -0000 1.6 *************** *** 31,56 **** */ ! #ifdef HAVE_CONFIG_H ! #include "config.h" ! #endif #include <FOO/FOOContext.h> #include <FOO/FOOModule.h> - #define Object SchemeObject /* avoid Obj-C type clash */ - #ifdef HAVE_FOOELK_SCHEME_H - #include <fooelk/scheme.h> - #else - #include <elk/scheme.h> - #endif - #undef Object - - #include "elkfoo.h" int T_Context; - SchemeObject V_Context; - static void Check_Context (SchemeObject o) --- 31,48 ---- */ ! #include "elkfoo.h" ! ! #import <Foundation/NSKeyedArchiver.h> ! #import <Foundation/NSException.h> ! #import <Foundation/NSData.h> + #include <FOO/FOOGlobalsManager.h> #include <FOO/FOOContext.h> #include <FOO/FOOModule.h> int T_Context; SchemeObject V_Context; static void Check_Context (SchemeObject o) *************** *** 82,89 **** ! id getCurrentContext () /* used in ../kernel/Context.h */ { ! id context; const char *oldErrorTag; --- 74,81 ---- ! FOOContext * getCurrentContext () /* used in ../kernel/Context.h */ { ! FOOContext *context; const char *oldErrorTag; *************** *** 174,178 **** SchemeObject ! A_Make_Context (id c) { SchemeObject context = Null, zero = Make_Integer(0); --- 166,170 ---- SchemeObject ! A_Make_Context (FOOContext *c) { SchemeObject context = Null, zero = Make_Integer(0); *************** *** 275,360 **** int ! Write_Context (FILE *fp, ! id context) { ! Primitive_Error("sorry. not yet ported"); ! ! // // NXStream *s; ! // TypedStream *ts; ! ! // // if ((s = NXOpenFile(fileno(fp), OBJC_WRITEONLY)) == NULL) ! // // return -1; ! ! // // if ((ts = objc_open_typed_stream(s, OBJC_WRITEONLY)) == NULL) { ! // if ((ts = objc_open_typed_stream(fp, OBJC_WRITEONLY)) == NULL) { ! // // NXClose(s); ! // return -2; ! // } ! // objc_write_root_object(ts, context); ! // objc_close_typed_stream(ts); ! // // NXClose(s); ! return 1; } ! static SchemeObject P_Context_Write(argc, argv) ! int argc; ! SchemeObject *argv; { ! Primitive_Error("sorry. not yet ported"); ! // // NXStream *s; ! // // TypedStream *ts; ! // SchemeObject context = argv[0], port; ! ! // if (argc < 2) ! // port = Curr_Output_Port; ! // else ! // port = argv[1]; ! // Check_Context(context); ! // Check_Type(port, T_Port); ! // if (!IS_OUTPUT(port)) ! // Primitive_Error("not an output port: ~a", port); ! // if (PORT(port)->flags & P_STRING) ! // Primitive_Error("not a file port: ~a", port); ! // switch (Write_Context(PORT(port)->file, CONTEXT_T(context)->pointer)) { ! // case -1: ! // Primitive_Error("cannot open stream for: ~a", port); ! // case -2: ! // // NXClose(s); ! // Primitive_Error("cannot open typed stream for: ~a", port); ! // } ! return True; } int ! Read_Context (FILE *fp, ! id *context) { ! Primitive_Error("sorry. not yet ported"); ! // // NXStream *s; ! // TypedStream *ts; ! // // id c; ! ! // // if ((s = NXOpenFile(fileno(fp), NX_READONLY)) == NULL) ! // // return -1; ! // // if ((ts = NXOpenTypedStream(s, NX_READONLY)) == NULL) { ! // if ((ts = objc_open_typed_stream(fp, OBJC_READONLY)) == NULL) { ! // // NXClose(s); ! // return -2; ! // } ! // if (objc_read_object(ts, context) == -1) { ! // objc_close_typed_stream(ts); ! // // NXClose(s); ! // return -3; ! // } ! // objc_close_typed_stream(ts); ! // // NXClose(s); ! // // *context = c; ! return 1; } --- 267,352 ---- int ! Write_Context (NSString *path, ! FOOContext *context) { ! NS_DURING ! [FOOGlobalsManager archiveContext: context toFile: path]; ! NS_HANDLER ! // yet to implement ! NS_ENDHANDLER ! return 0; } ! static SchemeObject ! P_Context_Write (int argc, ! SchemeObject *argv) { ! SchemeObject context = argv[0], port = Null; ! const char *path; ! ! Check_Context(context); ! if (argc < 2) ! { ! port = Curr_Output_Port; ! } ! else if (TYPE(argv[1]) == T_Port) ! { ! port = argv[1]; ! } ! else if (TYPE(argv[1]) == T_String) ! { ! path = Get_String(argv[1]); ! } ! else ! { ! Wrong_Type_Combination(argv[1], "string or port"); ! } ! ! if (! Nullp(port)) ! { ! if (! IS_OUTPUT(port)) ! { ! Primitive_Error("not an output port: ~a", port); ! } ! if (PORT(port)->flags & P_STRING) ! { ! Primitive_Error("not a file port: ~a", port); ! } ! path = Get_String(PORT(port)->name); ! } ! ! switch (Write_Context([NSString stringWithCString: path], ! CONTEXT_T(context)->pointer)) ! { ! case -1: ! Primitive_Error("cannot open file ~a", path); ! ! case -2: ! Primitive_Error("error while archiving context to ~a", path); ! } ! ! return True; } int ! Read_Context (NSString *path, ! FOOContext **context) { ! NS_DURING ! *context = [FOOGlobalsManager unArchiveContextWithFile: path]; ! NS_HANDLER ! // yet to implement ! NS_ENDHANDLER ! if (*context == nil) ! { ! return -3; ! } ! return 0; } *************** *** 364,448 **** SchemeObject *argv) { ! Primitive_Error("sorry. not yet ported"); ! return True; ! // SchemeObject port; ! // // NXStream *s; ! // // TypedStream *ts; ! // id c; ! ! // if (argc < 1) ! // port = Curr_Input_Port; ! // else ! // port = argv[0]; ! // Check_Type(port, T_Port); ! // if (!IS_INPUT(port)) ! // Primitive_Error("not an input port: ~a", port); ! // if (PORT(port)->flags & P_STRING) ! // Primitive_Error("not a file port: ~a", port); ! // switch (Read_Context(PORT(port)->file, &c)) { ! // case -1: ! // Primitive_Error("cannot open stream for: ~a", port); ! // case -2: ! // Primitive_Error("cannot open typed stream for: ~a", port); ! // case -3: ! // Primitive_Error("cannot read from typed stream for: ~a", port); ! // } ! // return A_Make_Context(c); ! } ! ! ! static SchemeObject ! P_Context_Copy (SchemeObject context) ! { ! Primitive_Error("sorry. not yet ported"); ! return True; ! // id c; ! // // NXStream *ws, *rs; ! // FILE *stream; ! // TypedStream *ts; ! // // char *buffer; ! // // int len, maxlen; ! ! // /* use tempfile instead of memory stream (workaround = ugly) */ ! // Check_Context(context); ! // // if ((ws = NXOpenMemory(NULL, 0, NX_WRITEONLY)) == NULL) ! // // Primitive_Error("cannot open memory write stream"); ! // // create tempfile ! // if (! (stream = tmpfile())) ! // { ! // Primitive_Error("cannot create temporary file"); ! // } - // // create typed stream - // if ((ts = objc_open_typed_stream(stream, OBJC_WRITEONLY)) == NULL) { - // // NXCloseMemory(ws, NX_FREEBUFFER); - // Primitive_Error("cannot open typed write stream"); - // } - // objc_write_root_object(ts, CONTEXT_T(context)->pointer); - // objc_close_typed_stream(ts); ! // // NXGetMemoryBuffer(ws, &buffer, &len, &maxlen); ! // // if ((rs = NXOpenMemory(buffer, len, NX_READONLY)) == NULL) ! // // Primitive_Error("cannot open memory read stream"); ! // rewind(stream); ! // if ((ts = objc_open_typed_stream(stream, OBJC_READONLY)) == NULL) { ! // // NXCloseMemory(ws, NX_FREEBUFFER); ! // Primitive_Error("cannot open typed read stream"); ! // } ! // if (objc_read_object(ts, &c) == -1) ! // Primitive_Error("bad context read"); ! // objc_close_typed_stream(ts); ! // // NXCloseMemory(ws, NX_FREEBUFFER); ! // // NXCloseMemory(rs, NX_FREEBUFFER); ! // fclose(stream); ! // return A_Make_Context(c); } --- 356,434 ---- SchemeObject *argv) { ! SchemeObject port = Null; ! FOOContext *context; ! const char *path; ! if (argc < 1) ! { ! port = Curr_Input_Port; ! } ! else if (TYPE(argv[0]) == T_Port) ! { ! port = argv[0]; ! } ! else if (TYPE(argv[0]) == T_String) ! { ! path = Get_String(argv[0]); ! } ! else ! { ! Wrong_Type_Combination(argv[0], "string or port"); ! } ! if (! Nullp(port)) ! { ! if (! IS_INPUT(port)) ! { ! Primitive_Error("not an input port: ~a", port); ! } ! if (PORT(port)->flags & P_STRING) ! { ! Primitive_Error("not a file port: ~a", port); ! } ! path = Get_String(PORT(port)->name); ! } ! switch (Read_Context([NSString stringWithCString: path], &context)) ! { ! case -1: ! Primitive_Error("cannot open stream for: ~a", port); ! case -2: ! Primitive_Error("cannot open typed stream for: ~a", port); ! case -3: ! Primitive_Error("cannot read from typed stream for: ~a", port); ! } ! return A_Make_Context(context); ! } ! static SchemeObject ! P_Context_Copy (SchemeObject context) ! { ! /* in the future, we want to conform to the <NSCopying> protocol in ! * all related classes instead of using the archiving mechanism for ! * copying ! */ ! FOOContext *c; ! NSMutableData *data; ! NSKeyedArchiver *archiver; ! NSKeyedUnarchiver *unarchiver; ! Check_Context(context); ! data = [NSMutableData data]; ! archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData: data]; ! [archiver encodeObject: CONTEXT_T(context)->pointer forKey: @"FOOContext"]; ! [archiver finishEncoding]; ! RELEASE(archiver); ! // RELEASE(data); // ??? autoreleased or not? ! unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData: data]; ! c = [unarchiver decodeObjectForKey: @"FOOContext"]; ! [unarchiver finishDecoding]; ! [unarchiver release]; ! return A_Make_Context(c); } Index: types.m =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/src/types.m,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** types.m 9 Aug 2004 01:47:34 -0000 1.1 --- types.m 13 Aug 2004 21:34:39 -0000 1.2 *************** *** 32,38 **** */ ! #ifdef HAVE_CONFIG_H ! #include "config.h" ! #endif #ifdef NeXT_RUNTIME --- 32,36 ---- */ ! #include "elkfoo.h" #ifdef NeXT_RUNTIME *************** *** 44,57 **** #endif - #define Object SchemeObject /* avoid Obj-C type clash */ - #ifdef HAVE_FOOELK_SCHEME_H - #include <fooelk/scheme.h> - #else - #include <elk/scheme.h> - #endif - #undef Object - - #include "elkfoo.h" - #define SKIP_BODY(p, c) \ --- 42,45 ---- Index: fooinit.m =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/src/fooinit.m,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** fooinit.m 5 Aug 2004 18:58:52 -0000 1.3 --- fooinit.m 13 Aug 2004 21:34:39 -0000 1.4 *************** *** 33,39 **** /* $Id */ ! #ifdef HAVE_CONFIG_H ! #include "config.h" ! #endif #include <stdio.h> --- 33,37 ---- /* $Id */ ! #include "elkfoo.h" #include <stdio.h> *************** *** 43,56 **** #include <strings.h> ! #define Object SchemeObject /* avoid Obj-C type clash */ ! #ifdef HAVE_FOOELK_SCHEME_H ! #include <fooelk/scheme.h> ! #else ! #include <elk/scheme.h> ! #endif ! #undef Object #import <Foundation/NSAutoreleasePool.h> - #include <FOO/FOOGlobalsManager.h> --- 41,47 ---- #include <strings.h> ! #include <FOO/FOOGlobalsManager.h> #import <Foundation/NSAutoreleasePool.h> Index: pointer.m =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/src/pointer.m,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** pointer.m 9 Aug 2004 17:30:47 -0000 1.8 --- pointer.m 13 Aug 2004 21:34:39 -0000 1.9 *************** *** 31,37 **** */ ! #ifdef HAVE_CONFIG_H ! #include "config.h" ! #endif #include <strings.h> --- 31,35 ---- */ ! #include "elkfoo.h" #include <strings.h> *************** *** 45,57 **** #endif - #define Object SchemeObject /* avoid Obj-C type clash */ - #ifdef HAVE_FOOELK_SCHEME_H - #include <fooelk/scheme.h> - #else - #include <elk/scheme.h> - #endif - #undef Object - - #include "elkfoo.h" int T_Pointer; --- 43,46 ---- Index: task.m =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/src/task.m,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** task.m 6 Aug 2004 02:52:59 -0000 1.3 --- task.m 13 Aug 2004 21:34:39 -0000 1.4 *************** *** 31,37 **** */ ! #ifdef HAVE_CONFIG_H ! #include "config.h" ! #endif #include <FOO/FOOContext.h> --- 31,35 ---- */ ! #include "elkfoo.h" #include <FOO/FOOContext.h> *************** *** 44,56 **** #include <strings.h> - #define Object SchemeObject /* avoid Obj-C type clash */ - #ifdef HAVE_FOOELK_SCHEME_H - #include <fooelk/scheme.h> - #else - #include <elk/scheme.h> - #endif - #undef Object - - #include "elkfoo.h" SchemeObject General_File_Operation (SchemeObject s, int op); /* in io.c */ --- 42,45 ---- Index: defaults.m =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/src/defaults.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** defaults.m 6 Aug 2004 02:52:59 -0000 1.2 --- defaults.m 13 Aug 2004 21:34:39 -0000 1.3 *************** *** 31,48 **** */ ! #ifdef HAVE_CONFIG_H ! #include "config.h" ! #endif #include <FOO/FOOGlobalsManager.h> - #define Object SchemeObject /* avoid Obj-C type clash */ - #ifdef HAVE_FOOELK_SCHEME_H - #include <fooelk/scheme.h> - #else - #include <elk/scheme.h> - #endif - #undef Object - static SchemeObject --- 31,38 ---- */ ! #include "elkfoo.h" #include <FOO/FOOGlobalsManager.h> static SchemeObject |
|
From: Martin R. <ru...@us...> - 2004-08-13 21:34:10
|
Update of /cvsroot/foo/foo/elkfoo/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17401 Modified Files: elkfoo.h Log Message: restructured #include policy Index: elkfoo.h =================================================================== RCS file: /cvsroot/foo/foo/elkfoo/include/elkfoo.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** elkfoo.h 9 Aug 2004 01:42:04 -0000 1.4 --- elkfoo.h 13 Aug 2004 21:33:57 -0000 1.5 *************** *** 38,41 **** --- 38,53 ---- #define FOO_ELKFOO_H_INCLUDED + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif + + #define Object SchemeObject /* avoid Obj-C type clash */ + #ifdef HAVE_FOOELK_SCHEME_H + #include <fooelk/scheme.h> + #else + #include <elk/scheme.h> + #endif + #undef Object + #include <FOO/FOOObject.h> |
|
From: Martin R. <ru...@us...> - 2004-08-13 00:34:45
|
Update of /cvsroot/foo/foo/libfoo/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8640 Modified Files: FOOSoundFile.m Log Message: fixed bug related to channels: were added up regardless wether a channel was specified or not Index: FOOSoundFile.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOSoundFile.m,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FOOSoundFile.m 4 Aug 2004 06:16:41 -0000 1.2 --- FOOSoundFile.m 13 Aug 2004 00:34:34 -0000 1.3 *************** *** 303,307 **** channel: (int)channel { ! return [self getSamples: buffer offset: fromFrame size: frames channel: -1 rev: NO]; } // getSamples:fromFrame:frames:channel: --- 303,307 ---- channel: (int)channel { ! return [self getSamples: buffer offset: fromFrame size: frames channel: channel rev: NO]; } // getSamples:fromFrame:frames:channel: |