[LAD] "enhanced event port" LV2 extension proposal

David Olofson david at olofson.net
Wed Nov 28 16:58:09 UTC 2007

On Wednesday 28 November 2007, Krzysztof Foltman wrote:
> - or introducing a "65536 samples milestone" kind of event similar
> to "clear" message in LZ compression format, separating events from
> different 65536-sample "eras" :)

Why would you need to do this? Timestamps in Audiality 0.1.x are 16 
bit and based on a continuously running, wrapping timer. Audiality 2, 
VST, DSSI and others use offsets from the first sample in the current 
buffer. Either way works just fine as long as the timestamps cover 
the buffers safely.

Now, this is assuming that we consider events real time data, just 
like audio. That is, plugins are not allowed to send events for 
future buffers, and they'll only ever see events for the current 

I don't see the point in supporting anything else, unless you go all 
the way and provide a random access sequencer API, where plugins can 
just browse around as they wish.

> If the plugin does not implement this extension, it cannot handle
> buffers of more than 65536 samples - and that should be perfectly
> fine in most cases.

Well, it's kind of nasty that the base API supports larger buffers if 
the events don't, but IMNSHO, the mistake is in supporting >65536 
sample buffers *at all*...

> Hell, max buffer size in Buzz was 256 samples, pitiful by
> today's standards, and it was still quite efficient. 

I'd say it's efficient *because* of this. It may not matter much on a 
quiescent system with a CPU with megabytes of cache, but if you have 
serious GUI stuff going on - or a game engine - your audio thread 
will wake up and find 100% cold memory every time it fires! In that 
situation, every byte of the graph's footprint will have to be 
fetched from cold memory at least once per engine cycle.

Of course, if your graph footprint is larger than the cache, things 
get even worse, as you'll have cache misses over and over until the 
audio thread is done with the buffer.

//David Olofson - Programmer, Composer, Open Source Advocate

.-------  http://olofson.net - Games, SDL examples  -------.
|        http://zeespace.net - 2.5D rendering engine       |
|       http://audiality.org - Music/audio engine          |
|     http://eel.olofson.net - Real time scripting         |
'--  http://www.reologica.se - Rheology instrumentation  --'

More information about the Linux-audio-dev mailing list