This is unarchiving-sounds in view mode; [Up]
Date: Sun 30-Apr-1991 00:14:46 From: cfcgf@ux1.cts.eiu.edu (Chuck Fleming) Subject: unarchiving sounds I'm having some trouble unarchiving a list of objects which contain sounds. More specifically, I have a subclass of Text, called SoundText, which has an instance variable for an associated sound. I store a collection of SoundText objects in a List object. The list is then archived using NXWriteRootObject(typedStream, soundTextList); The write: method for SoundText is - write:(NXTypedStream *)stream { [super write:stream]; NXWriteObject(stream, aSound); return self; } If [aSound play] is inserted before the return, the sounds sound just fine (just before they are written to the disk). The list is unarchived using soundTextList = NXReadObject(typedStream); The read method for SoundText is - read:(NXTypedStream *)stream { [super read:stream]; aSound = NXReadObject(stream); return self; } If [aSound play] is inserted just before the return, the sounds can be heard, but they all end with a large crack. When displayed in a sound view, there is a big drop in the waveform at the end of the data. The sound data seems to be getting corrupted. Can anyone tell me what's going on here, and how to get rid of the drop off. Thanks chuck cfcgf@eiu.edu
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Marcel Waldvogel and Netfuture.ch.