Re: [DUG] Pointers help

2017-11-04 Thread Stefan Mueller
Ross, “array of bytes” isn’t the same as a “pointer” (nor is the same as a static array with a fixed length). Dynamic arrays are a managed data structure in Delphi that contain information such as length and a reference count (so Delphi can manage memory and free them if no longer used).

Re: [DUG] Pointers help

2017-11-04 Thread Stefan Mueller
Just noticed this one here: >>There is a IOHandler.Write function that supports TStream but the memory stream is being appended to in a separate thread so I can’t go changing the Position I want to access the data from. You are aware that tmemorystream isn’t threadsafe, right? You will

[DUG] Pointers help

2017-11-04 Thread Ross Levis
I'm writing data to an Indy IOHandler by moving the data from a TMemoryStream.Memory to a TIDBytes (array of byte) before writing it as I cannot find how to do it otherwise. This works... AudioMS: TMemoryStream; Buffer: TIdBytes; // array of byte MemPos: PByte; MemPos :=