|
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 |