On Wednesday 18 December 2002 10.41, Steve Harris wrote:
On Wed, Dec 18, 2002 at 12:35:15 +0100, David Olofson
wrote:
I'm leaning towards the "strings in raw
data blocks" approach,
despite the little strlen() inconveniency for senders. Mostly
because it's one control data type less to care about, without
loss of real functionality.
That sounds reasonable, we could require that strings (like
filenames) are NULL terminated as well, for compatability with
libc.
Yes, definitely. Strings must be NULL terminated, but data blocks for
controls not hinted as strings don't have to be.
Actually, strings and raw data blocks probably should be different
types in the metadata, as they're not compatible anyway. (Sending raw
data to a string control can result in a segfault.)
The point is to have them use the same infrastructure. Same events,
same memory management system, same semantics. String controls just
make some asumptions about the format of the data, whereas raw data
controls don't.
//David Olofson - Programmer, Composer, Open Source Advocate
.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`--------------------------->
http://olofson.net/audiality -'
---
http://olofson.net ---
http://www.reologica.se ---