Caution: project status = " work-in-progress" !
Last updated: 2005-09-24 (YYYY-MM-DD)
This winamp "output" plugin sends the audio stream from winamp to DL4YHF's Spectrum Lab. Originally written to analyze the mp3-coded audio stream in real time, without the need to let the stream run through the soundcard.
To download the plugin, click here (maybe with the right button, then select "save as"). Please note the usual disclaimer: You use this program at your own risk; the author will not be responsible for anything at all (what else would you expect from a freeware ! ). The zipped archive also contains the sourcecodes and a Borland C++Builder project file to compile it. Of course, to use the plugin you don't need to compile it - all you need is the DLL file, nothing else. But if you're a programmer, feel free to improve the code... otherwise, you can safely delete the *.h, *.c, *.cpp, *.def and *.bpr file after unzipping the archive.
To install, copy the plugin ("out_slab.dll" or any later name) into winamp's plugin directory (like c:\programs\winamp\plugins). To activate the plugin, click on winamp's system menu button in the upper left corner, then select "Options..Preferences", "Plug-ins", "Output". Now mark "Output to Spectrum Lab" in the list, then click "Close" to return to Winamp's main screen. Of course, Spectrum Lab must be started also, with the audio input replaced by the option Receive audio data through WM_COPYDATA messages. You find this option under 'Options'...'Audio Settings' on the 'AD/DA Server' tab.
To test, try to connect to the NASA VLF receiver (Google for it..
then enter the address in Winamp's playlist), or play an mp3 file in
Note: Winamp refuses to send certain audio streams (like shoutcast) to an output plugin for legal reasons ! This will never prevent people from ripping these streams to disk, but it prevents this plugin to work with certain audio providers ! A sample Spectrum Lab application may be contained in the SL installation archive, for example "inspire1.usr" . Load these settings from SL's File or Quick settings menu, then start Winamp with the output plugin enabled. It used to work with http://science.nasa.gov/audio/inspire/inspire.m3u when last tested in September 2005. Note: The sampling rate of this stream is 22.1 kSamples/second, so the audio bandwidth is about 10 kHz.
How it works internally
The plugin simply sends the uncompressed audio samples to Spectrum Lab, using a windows WM_COPYDATA message. A special header (published in "audiomsg.h") contains some info about the audio sample block, like: - sample rate, - number of channels - number of bits per audio samples (always 16 up to now) The sender of the message (here: the winamp plugin) needs to know the "window handle" of the receiver (here: SL). To retrieve this handle, the win API function FindWindow is used, with the first parameter ("TSpectrumLab") being the destination window's class name. To avoid gaps in the audio stream, the sampling rate of the sender must be equal to the sampling rate of the receiver. Up to now, no attempts were made to handle slight differences in the sampling rates - but this may change in a future version of the plugin.