Drivers can declare themselves realtime using the A2_REALTIME flag

Realtime audio drivers ("sdl" and "jack") now set the A2_REALTIME
flag in their constructors, so applications can tell how to set
things up without opening the drivers first.

a2play now determines whether to run in realtime or offline mode
based on the selected driver's A2_REALTIME flag.
Added rudimentary benchmark suite

Added snapshots of a few tracks from Kobo II for benchmark
purposes; k2epilogue, k2intro, k2loader, k2trance and
pulsetronic.

Added '-v' option to a2play, to display version info.
New VM instruction format

VM instructions are now variable size; one or two 32 bit words.

The first instruction word holds an 8 bit opcode, an 8 bit register
index and a 16 bit general index, used for register index, subvoice
ID and similar, depending on instruction.

Some instructions have a second 32 bit word, which then holds a
16:16 signed fixed point value. (Same format as the VM registers,
that is.) This eliminates the f20 floating point format previously
used for immediate fixed point values.

Some additional range checks were added in the compiler, including
all branch fixups, which now use the new inline a2c_SetA2() instead
of directly manipulating instructions.

Closes #64.
Added official support for units needing ninputs == noutputs

Added a flag field to unit descriptors.

Added the A2_MATCHID flag to express that a unit needs to have
matching channel counts.

The ninputs != noutputs tests removed from the units that had
them, and moved into a2_AddUnit() in the core.

Closes #89.
Fixed broken SPAWNR and SPAWNDR VM instructions

Both of these had lost the 16:16 ==> integer shift in the transition
to variable length instructions.

Also, in order to match the SPAWNR instruction, SPAWNDR has an odd
encoding using nothing but the 16 bit a2 field for register index,
whereas one would normally use the 8 bit a1 field for that - which
I of course failed to remember...
Minor a2play bugfixes

Added -v (version) option to usage message.

Now actually uses the requested number of output channels.
Updated k2intro to the current version from Kobo II

That is, the one in test/data. (The benchmark songs are not to be
updated beyond what's needed to make them play as intended.)
Added rtsubtest.c

Added a simple test, rtsubtest.c, that loads a song and plays two
instances of it on different realtime states. It sets up a state
with a substate, both realtime with actual audio drivers, so that
the states are asynchronously playing from the same physical song
and wave data.

The purpose of this test is to verify that substates actually work,
and that they can indeed piggyback on the data of their master
states as intended.
Root voice always has two or more channels

As a temporary hack to handle songs and sounds that expect two or
more output channels, we now use a special root voice program for
mono master output, that runs the whole graph in two channel stereo,
and mixes down to mono right before the master xinsert unit.

As it is, we could avoid the need for this by adding one channel
support to the units still missing it (probably fbdelay at this
point), but dealing with manually wired voice structures isn't
going to be quite that easy.
Removed bogus warnings about exhausted pools

In debug builds, a2_VoiceAlloc(), a2_NewBlock() and a2_NewEvent()
used to warn about the respective pools being exhausted, as that's
a risky situation in a realtime setup. However, only A2_REALTIME
states preallocate memory, so there were lots of annoying and
completely irrelevant warnings when running offline states.
Added renderwave and streamwave examples/tests

Fixed incorrect scaling of A2_I24 samples when writing to waves.

Updated a2jingle.a2s to semicolon statement delimiters.

Added playtestwave.a2s, used by renderwave and streamwave.

rtsubtest renamed as rtsubstate.

This completes the first stage of #8.
a2_Close() on a substate only actually closes that substate

It's now actually possible to close only a specific substate, without
it taking pretty much everything along with it.

Waves, programs etc are only unloaded when closing a master state.

Fixes #91.
Added simplified off-line rendering API

Added calls a2_Render() and a2_RenderWave().

Added property A2_POFFLINEBUFFER, allowing applications to set
the default buffer size used for substates (when no driver is
specified), and the aforementioned calls.

Added three properties A2_PSILENCE*, allowing applications to
tweak the silence detection behavior (when 'length' == 0) of the
aforementioned calls and any future silence detection logic.

Added renderwave2.c test/example, using a2_RenderWave().

This completes the second stage of #8.
Compiler/VM improvements

Syntax for local 'def' changed to "def .SomeSymbol SomeValue".

Implemented (<expr>) ... syntax in the "times," send and spawn constructs.

Implemented SENDR, SPAWNV and SPAWNVR instructions to support the above.

Implemented KILLR instruction and support for 'kill' with expressions.

Variables can now be used without parentheses as voice IDs for the ':'
(spawn) and '<' (send) operators.

Closes #7, as well as a few issues that never made it out of the TODO
or inline FIXMEs.
Engine error handling improvements

Added realtime error messages for VM errors that abort program
execution.

Realtime error reporting enabled by default. The A2_RTERRORS flag
has been removed.

Added A2_SILENT and A2_RTSILENT flags to disable error messages
from API and engine/realtime contexts respectively. (A2_SILENT
not yet implemented!)

On off-line states, a2r_Error() now bypasses the response FIFO
and prints directly to stderr.
Engine fixes

a2_Now() only adds buffer latency for realtime states. This
eliminates bogus initial silence when rendering waves offline.

a2_Close() now pumps API and engine messages, to avoid dropped
engine/RT error messages and leaked handles.
Fixes in wave rendering, a2play and tests/example

The wave rendering APU, a2play and the test/example programs now
use a2_Start() instead of a2_Play(), to avoid some sounds just
stopping instantly due to being started detached.
Fixed crash when trying to pump messages closing after failure
Implemented offline rendering in scripts

Added 'wave' statement for rendering programs to waves at compile time.
The statement accepts a wave name followed by a body containing zero or
more attributes (wave flags, rendering parameters etc) and finally a
program call statement with optional arguments.

The 'length' argument to a2_Render() is now actually implemented...!

Added rendertest.a2s to test and demonstrate the above.

Added megastrings.a2s, demonstrating a "10k oscillator" strings sound
implemented through recursive offline rendering. (This needs some wave
features that aren't implemented yet, but it sort of works already.)

Updated some scripts that were using 'wave' as an argument name.

This completes stage three, and thus finally closes #8.
Implemented A2_NORMALIZE, A2_XFADE and A2_REVMIX

Normalization, crossfading (triangular window + 50% offset overlap-add)
and reverse mixing (mixing with a reversed copy of the wave) are now
implemented by a2_WaveUpload() and the stream API. (First a2_Flush()
only; it doesn't work when modifying prepared waves!)

Closes #32.