dce@smsc.sony.com (David Elliott) (01/17/91)
I have a program that will be grabbing chunks of data (MIDI data, if it matters) from an XCMD in the idle loop. The data will come in small chunks (usually less than 100 bytes), and I want to eventually be able to put them all together to send back to an XCMD to save them in a file. I read somewhere that using "put after" is not the fastest way to go. I don't want the program to slow down after lots of data comes in. What's the fastest way to store the data in this case?
jkc@Apple.COM (John Kevin Calhoun) (01/18/91)
In article <1991Jan16.202454.22827@smsc.sony.com> dce@smsc.sony.com (David Elliott) writes: >I have a program that will be grabbing chunks of data (MIDI >data, if it matters) from an XCMD in the idle loop. The >data will come in small chunks (usually less than 100 bytes), >and I want to eventually be able to put them all together >to send back to an XCMD to save them in a file. > >I read somewhere that using "put after" is not the fastest >way to go. I don't want the program to slow down after >lots of data comes in. > >What's the fastest way to store the data in this case? From the XCMD, I'd create my own block of memory by calling NewHandle and append the data to the block by calling PtrAndHand. I'd save the handle between invocations of my XCMD by storing it in a HyperTalk global. Kevin Calhoun HyperCard Team Apple Computer, Inc.