|
From: Martin R. <ru...@us...> - 2005-01-26 23:19:22
|
Update of /cvsroot/foo/foo/libfoo/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20304/src Modified Files: FOOSoundFile.m Log Message: pedrezuela edition: finally removed comment support. will always cause problems. better implement a sndfile-medadata-base in scheme. Index: FOOSoundFile.m =================================================================== RCS file: /cvsroot/foo/foo/libfoo/src/FOOSoundFile.m,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** FOOSoundFile.m 30 Aug 2004 14:35:04 -0000 1.6 --- FOOSoundFile.m 26 Jan 2005 23:19:12 -0000 1.7 *************** *** 63,67 **** _file = NULL; _fileName = nil; - _fileComment = nil; _dynamics = NULL; _cache.ptr = NULL; --- 63,66 ---- *************** *** 78,82 **** _file = NULL; _fileName = nil; - _fileComment = nil; _dynamics = NULL; _cache.ptr = NULL; --- 77,80 ---- *************** *** 111,115 **** { int mode; - const char *comment; if ([self isOpen] == YES && [self close] == NO) --- 109,112 ---- *************** *** 156,165 **** // } - if (! (comment = sf_get_string(_file, SF_STR_COMMENT))) - { - comment = ""; - } - _fileComment = [[NSString alloc] initWithCString: comment]; - _fileMode = sndmode; _fileFrames = _fileInfo.frames; --- 153,156 ---- *************** *** 231,239 **** _fileName = nil; } - if (_fileComment != nil) - { - RELEASE(_fileComment); - _fileComment = nil; - } return YES; --- 222,225 ---- *************** *** 527,564 **** - - (NSString *) getFileComment - { - return _fileComment; - } // getFileComment - - - - (int) setFileCommentFromString: (NSString *)fileComment - { - int result; - - if ([self isOpen] == NO) - { - FOO_ERROR(YES, -98); - } - if (_fileMode == SND_READ) - { - FOO_ERROR(YES, -99); - } - - result = sf_set_string(_file, SF_STR_COMMENT, [fileComment cString]); - - if (! result) - { // succeeded, update _fileComment - if (_fileComment != nil) - { - RELEASE(_fileComment); - } - _fileComment = RETAIN(fileComment); - } - - return result; - } // setFileCommentFromString - - - validateDynamics { --- 513,516 ---- |