Last updated: November 2013
The Audio-I/O-Libraries are a simple way to send uncompressed audio streams
from one application to another. At the moment, both applications must run
on the same PC.
The first Audio-I/O-Library (in_AudioIO.dll, written in March 2008) was a shared windows DLL, which could be loaded into Winamp, and acted as an audio-bridge between the author's Spectrum Lab and Winamp (see last chapter in this document). The purpose was to send an MP3-encoded audio stream from a radio receiver to the web, using Winamp + Oddcast for the audio streaming, and Spectrum Lab for the audio pre-processing.
Later, the audio I/O library (at least in_AudioIO.dll) has turned from a simple 'input plugin' for Winamp into a general-purpose 'audio bridge' for various applications. For example, it can also be used to connect two (or more) instances of Spectrum Lab, with pre-processed data passed from one instance of the program to multiple other programs. Since 2011-08, all 'audio streams' distributed by this DLL are displayed in the DLL's own control panel, along with all currently active 'readers' (=programs which have loaded the DLL to use it for input, instead of reading the audio samples directly from a soundcard or similar device).
Note for Spectrum Lab users: How to configure Spectrum Lab to use an
audio-I/O-DLL for input, and how to open this control panel from Spectrum
Lab, is described
(SL manual, online).
Since 2013-11, the Audio-I/O Manual (PDF) also contains a step-by-step guide for using in_AudioIO.dll to build an 'audio processing chain' of multiple instances of Spectrum Lab (running on the same PC).
The Audio-I/O bundle (consisting of the compiled binaries, the C sourcecodes, and the manual) can be downloaded from this site. But first, read the next chapter...
(Ok, we all hate this paranoid stuff, but someone told me it's wise to have it here..)
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1.Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2.Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3.Neither the name of the author nor the name of other contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
TRADEMARKS AND REGISTERED TRADEMARKS
Namings for products, that are registered trademarks, are not separately marked in these documents. The same applies to copyrighted material. Therefore the missing (tm), ®(r), or ©(c) does not implicate, that the naming is a free trade name. Furthermore the used names do not indicate patent rights or anything similar.
The Audio-I/O-Libraries, including the manual, the compiled binaries and the C sourcecode, can be downloaded from here:
(if the page has moved, ask your friendly search engine)
The current version of the Audio-I/O-DLL on this website is compatible with the recent version of Spectrum Lab.
It is not compatible with older versions (older than SL V2.78; compiled 2012-06-09).
The "installation" is straightforward: Just unpack the compressed archive into a directory of your choice. In it, you will find (at least) the following files:
manual/AudioIO_Manual.pdf : you guessed it, this is the manual. READ IT.
The manual (in PDF format) is available on the website, but it is also contained in the zipped archive.
in_AudioIO.dll : The first compiled Audio-I/O-Library. Copy this file into Winamp's plugin directory, if you want to use the DLL as an 'input plugin' for Winamp. If you don't know how to do that, read the manual.
AudioIO.h : The most important file for fellow C-programmers who want to use Audio-I/O in their own programs. It contains a simple interface to all audio-I/O-DLLs.
*.c , *.h , *.dev , *.bpr : sourcecodes, headerfiles, and project files
for DevCpp (which is a simple and free IDE for MinGW / GNU-C, if that means
anything to you. If not, you can safely delete these files because they are
not required to *use* the Audio-I/O-DLLs .
If you want to modify and compile this Audio-I/O-Library ("in_AudioIO.dll") yourself with all original features, you will also need Steinberg's ASIO SDK. Unfortunately, due to Steinberg's restrictive licensing policy, I am not allowed to include "their" files (ASIO.H and a few others) in the sourcecode archive. Details are in the readme-file mentioned below.
readme*.txt : Some in-depth info for other programmers.
How to get started with the Audio-I/O-DLLs is described in the manual (PDF document). If you want to take a quick look without downloading and unpacking it, look here: AudioIO_Manual.pdf (beware, the manual in the archive will almost certainly be more update than the document on this website).
Sending an audio stream to an Icecast server with Spectrum Lab, Audio-I/O, Winamp, and Oddcast
This chapter is, at the moment, not much more than a hasty wish-wash of Spectrum Lab's author to send an audio stream to an Icecast server (thanks Paul for setting it up !).
You'll need a couple of programs to send your own stream...
Winamp : Here, it reads the audio stream through a special Audio-I/O-DLL (in_AudioIO.dll), and sends the stream to Oddcast.
Oddcast : Uses the Lame encoder to convert the audio
stream into an MP3-compressed stream, and send this (compressed) stream through
the internet (or, maybe, the local LAN) to an Icecast server.
(In analog radio terms, Oddcast is just a "feeder", but not the "web radio transmitter", because your local ADSL connection will be too slow to feed more than one or two listeners at the same time).
Icecast : Usually runs on a dedicated server hardware
with broadband access. Details on
www.icecast.org . Please note that for
'serious' audio streaming (with many listeners connected through the WWW),
you will need to find an icecast provider, or install your own if you
can. A few notes where to find more info about icecast follows in
a later chapter.
Only if you want to stream into your local network, it makes sense to install an Icecast server on your local PC (for example, to listen to a remote radio receiver connected through a WLAN, etc).
In the configuration described below, Spectrum Lab receives the stream from a soundcard (or a software-defined radio), removes unwanted signals, and sends the output to Winamp. Let's start with this part:
Configuration of Spectrum Lab
Select the Audio-I/O-DLL as output source (from Spectrum Lab's point of view, it's an output in this case): In SL's main menu, select "Options".."Audio Settings and I/O device selection". Under "Audio Output Device", select "Audio-I/O DLL". Also set the output sampling rate to 22050, 32000, or 44100 samples per second (depending on the bandwidth. For a VLF "Natural Radio" stream, 32000 samples/sec is sufficient. For an SSB radio receiver, 11025 samples/sec is ok).
To start with (on VLF), select "Quick Settings"..."Natural Radio"..."Sferics, Tweeks, Whistlers with filtered audio output" in Spectrum Lab's main menu. In this configuration, both the hum filter and the FFT-based audio filter are enabled. More details are in the SL help system (file "natradio.htm", last chapter). It's advisable to find the optimum configuration for your VLF receiver while sending the audio to the line-out signal of your soundcard, before trying to send the audio to Winamp, as described in the next step.
Since 2011, the audio I/O module
can also be used as an input for Spectrum Lab. For example,
it can act like a 'bridge' between two instances of Spectrum Lab. But that's
outside the scope of this document .. you will find details in SL's help
Configuration of Winamp
Make sure the file in_AudioIO.dll is in Winamp's plugin directory (details
in the Audio-I/O manual).
To let Winamp use the AudioIO-lib for input (instead of reading samples from the soundcard, or from a disk file), select "Play"..."Open URL" (alias "Open Location" in older versions). In the input box, enter the pseudo-URL
and click "Open".
Start Spectrum Lab's processing (Start...Sound Thread), so it begins to fill the buffer in Winamp's input plugin. Shortly after that, Winamp should start playing the audio (which it receives from SL) to the speakers. If it doesn't, click the "play"-button. If that doesn't help, click the "stop" button, and again the "play" button. After this, Winamp should show the sampling rate and the number of channels (mono/stereo) which it receives from the Audio I/O library .
If you try to start Winamp's playback without SpecLab running, Winamp track timer gets stuck at zero, until it receives the first audio samples from Audio-I/O.
You will also notice, that when you stop the audio-processing in SpecLab, Winamp keeps playing for a few seconds more (this is caused by various buffer stages in SpecLab, in the Audio-I/O interface, and in Winamp itself).
If this works, proceed...
Installation and operation of Oddcast
Download the Oddcast plugin for Winamp from www.oddsock.org . Install it as described (there are dozens of sites on this.. search for "internet radio station winamp oddcast icecast Lame" or similar..). BTW the Lame MP3 encoder library ( lame_enc.dll ) is sometimes in Winamp's plugin directory, but Oddcast expected it in Winamp's main directory (where winamp.exe is, too).
After installation of Oddcast, restart Winamp, and select "Options"..."Preferences"..."Plug-ins"..."DSP/Effect". In the list of DSP/Effect plug-ins, select "oddcast DSP vX", and click "Configure.." (but usually the Oddcast control panel opens automatically). Add a new encoder, then select that encoder, and click on it with the right mouse button. In the context menu, select "Configure". There are three tabs, most important are the "Basic Settings". These must be carefully filled out.. for example:
Bitrate: 64 (which means 64 kBit per second compressed audio). Only if your DSL *uplink* speed is too slow, try 32 kBit/second - the quality will be much poorer then, especially with MP3 encoding.
Samplerate: 44100 or 32000 (the latter preferred for VLF)
Channels: 1 (unless you send a quadrature stream from an SDR...)
Encoder Type: MP3 Lame (or OggVorbis, if supported by the receiving server)
Server IP, Server Port: Cannot tell you that... ask your friendly Icecast service provider ;-)
Encoder Password : Won't tell you that... same as above.
Mount Point: See Oddcast (or Icecast) reference. If it doesn't work, try a forward slash before the stream name. For example, the VLF radio streams used mountpoints like /vlf3, /vlf6, etc .
Reconnect Seconds: 10 ( = default value )
On Oddcast's "YP Settings", give the stream a name and description (these will be displayed in the listener's audio player).
Since many DSL providers kick you out deliberately once every day (to prevent people doing things like these), don't forget to set the checkmark "AutoConnect" on the Oddcast main configuration panel. Whenever the audio connection between your PC and the Icecast server breaks down, the program will automatically try to set it up again after the ten "Reconnect Seconds".
Then close Oddcast's configuration panel ("OK"), and click "Connect" to try if Oddcast can connect the remote (or local, see below) Icecast server. If it doesn't work, get in touch with someone who knows a bit more about internet radio streaming than the author of these lines.
Icecast is, in analogy to the old AM/FM steam radio, the "radio transmitter".
In contrast to your local ISDN- or ADSL uplink, a dedicated Icecast server
can broadcast to dozen or hundreds of receivers simultaneously (btw, most
if not all such providers charge a moderate fee for their service, so consider
making a small donation to the one who offered you to share "his" server...)
Also, to check the SpecLab ->Audio-I/O -> Winamp -> Oddcast chain locally (without internet access), it makes sense to install Icecast besides Oddcast. Oddcast will then send the stream to Icecast, running on the same PC. Icecast contains an HTTP server which allows all users in your local network to listen to the audio broadcaster.
Installing and operating Icecast (within the local network) was surprisingly simple, using the default settings. To let Oddcast send the "feeding" stream to Icecast, set the "Server IP" in Oddcast to "localhost", and use port number 8000 (which is the default in the Icecast configuration).
Finding an Icecast server, or setting up your own
As already mentioned, an Icecast server typically runs on a machine with a real broadband access (not an home ADSL connection) to serve dozens or even hundreds of listeners simultaneously. ADSL, the most popular access by the time of this writing (2008) has a large downstream bandwidth (once 768 kBit/second, nowadays 2000 to 6000 kBit/seconds under ideal conditions), but the upstream bandwidth is too limited to serve more than a few listeners. This is the reason why Icecast is typically *not* installed on your home PC, but on a machine dedicated to audio streaming.
There seemed to be a few free Icecast providers out there in 2006,
but all of them seem to have disappeared. Today (2008), you will find questions
asked in forums like "Hello ! I want a free icecast server." (what a joker).
Note: The Icecast software is always free, but not necessarily the service... what else would you expect ? Someone has to pay for the bandwidth, and the electricity bill for the hardware on which the icecast server runs.. if it's not your own server, using your own internet connection !
To find companies hosting Icecast servers, ask your friendly search engine for terms like
For a start, or if your audience will always be limited to a few listeners, you can try to set up your own server (on your 'local PC') if you can convince your DSL router / firewall / etc to accept incoming calls. Furthermore, check (with your DSL provider) if you have a permanent IP address which makes things a lot easier. I never succeeded in setting up my own Icecast server (last not least because there was no need to try), so you're own your own at this point. Just a few hints... search the net for subjects like
How to create an internet radio station with icecast
How to create your own internet radio station
< To Be Continued >
Besides being a 'bridge' between Spectrum Lab and Winamp, or between multiple instances of Spectrum Lab, the audio-I/O-DLLs (at least in_AudioIO.dll) can emulate an audio device with ASIO-compatible interface. This feature can be used to ...
Send a preprocessed audio stream from Spectrum Lab to other programs (if they support ASIO for input), without the need for a 'virtual audio cable' or a 'virtual soundcard'.
Read audio streams from another program into Spectrum Lab (if the other program supports ASIO for output), without the need for a 'virtual audio cable' or a 'virtual soundcard'.
At the time of this writing (2012-06-09), the dummy ASIO interface in "in_AudioIO.DLL" was still in an experimental stage. Especially the problem of buffer overruns / underruns, when the writer's sampling rate was slightly different than the reader's sampling rate. When finished, you will find more details about the ASIO emulation in the Audio-I/O manual (PDF), chapter titled "Installation of in_AudioIO.dll as an ASIO device" ).