Abstract
BNAS is a basic client/server solution to forward any audio stream trough a TCP connection and play it from another computer. It was developed because all other implementations (NAS, XAudio) require some kind of specific support compiled into all the audio applications.
Introduction
My Sun Sparcstation has enough horse power to decode MPEG layer 3 audio streams at full quality, but unfortunately it has no audio output. My Amiga has builtin audio, but the 25MHz 68040 CPU is not fast enough to decode MPEG layer 3 at full quality.
So I decided to try a hybrid solution: the Sparcstation decodes the audio and sends the output (stereo, 16bit, 44.1KHz linear) to the Amiga trough the ethernet LAN. On the Amiga. The result is impressive: sound plays out from the Amiga speakers as soon as I start mpg123 on the Sparcstation.
Client
To setup the client you need to create a pipe in place of the standard audio device:
The client is just a simple program that makes a TCP connection
to a custom service on a remote server. Then it reads from
the
Source code for the client is available here:
There's also a simple Makefile to do this job for you.
Server
The nice thing about the server is that you don't need to write one in most cases. A naive inetd server is enough to route the incoming audio stream to the system audio device.
On NetBSD, I managed to do this by adding the following line to
Of course you must first choose a suitable port number for this
service and add it in
With AmiTCP or Miami you can do almost the same thing of NetBSD.
You need AHI's
The implementation of inetd that comes along with most Linux
distributions is brain damaged. Unlike the BSD version, the Linux
inetd doesn't allow you to redirect the standard I/O of programs,
not even using the
In Linux you also need to setup the audio device before you can
play anything. So I had to roll up my own server. Source code of the
Linux server is available here:
After you've compiled the server, you can install it by simply adding
this line to your
Copyright © 1999 Bernie Innocenti
$Id: index.html,v 1.3 1999/04/26 22:57:15 web Exp $