The event oriented nature of NAS programming dictated a rather unusual
solution. Because NAS is built around an event loop, it demands to be in
control of the application. Instead of massively patching tracker, or
using co-routines with occasional snoops on the event queue
in order not to miss events, the port uses fork
with processes
squirting data down a pipe. The back end handles all the netaudio stuff,
processing events and requesting data from the pipe when necessary.
The front end waits until the backend returns an int saying
what the max frequency is (or 0 if it fails to make a connection).
Then it runs along producing data and stuffing it down the pipe as normal.