========================== ========================= LineIn input plug-in v1.80 made by Jasper v/d Gronde ========================== ========================= -------------------------------------------------------------------------------------------- General -------------------------------------------------------------------------------------------- This plug-in makes it possible (which already was, but now you've got a bit more flexiblility) to let WinAMP use any device you plug into your computer, like a radio, microphone and anything else that you can record with Windows. To setup this plugin: - install it (you've probably already done that) WATCH OUT: the filename of the plugin has been changed from 'in_mic.dll' to 'in_line.dll' (around version 1.2) I thought this was much more logical. So move or delete the old dll (in_mic.dll). Don't leave it in the plugin directory! To check look in the WinAMP preferences, if you've got two linein plugins (different version), WinAMP still sees the old one. - plug any devices you want to use into your soundcard - setup your Windows volume control: - double-click on the little yellow speaker in the systray - goto options\properties - select Adjust volume for: Recording (watch in the list below that wether the devices you're interested in are checked) - adjust the volume settings to your likings and select the devices you want. Usually you'll want line-in (Line) because that's usually the good choice, but you if you want to for example connect a microphone you have to select microphone. Sometimes you can also select devices that aren't really devices, you can also use these. - start WinAMP - Open a URL. (see options) IMPORTANT NOTE: Go to my site if you run into any problems (at the bottom of this text). Also any updates appear there first. And you also get the documentation there. -------------------------------------------------------------------------------------------- Options -------------------------------------------------------------------------------------------- To use the plugin open the following URL (Ctrl-L or Open URL in the WinAMP main menu or with a playlist add URL, do not open it in the minibrowser): line://[option1=value1,][option2,][etc.] I no longer list all the options in this textfile, because it was simply too much work to maintain two lists of options. If you would like the option list to be included in the next version, mail me and I'll see what I can do. If you want a full list of options, please visit my site: http://home.hccnet.nl/th.v.d.gronde/ The main page has a tree like structure, the Documentation of my plugin contains the option reference. To get you started I have included a couple of recommended settings: Radio (Good quality, FM): line://nch=1,title=FM Radio,hideformat Radio (Bad quality, AM): line://nch=1,bps=8,srate=32000,title=AM Radio,hideformat Stereo equipment (no VIS): line://title=Stereo (no VIS),hideformat,bufsize=8192,numbuffers=50 High Quality (VIS) line://srate=48000,numbuffers=5000,bufsize=s576,title=High Quality (VIS),hideformat These numbers are a bit random, but they give an idea of the use of the parameters. The best way to determine your optimal settings is just to try it, for example some people like low quality music (it's a warmer sound or they have hearing problems). If you get an error that the format is not supported, first try setting the samplerate lower. Some pointers: - Do not set srate too high, you usually don't need it. If you just turn it on during work a setting of 32000 will suffice and it produces less skips. - Do not think that stereo will always be better. For example most radio's (if not all) are mono and to play that with stereo input is not nice. - If you don't use the VIS, set the bufsize high. This improves the performance. - It doesn't hurt to set a high number of buffers, only on (very) low memory systems this isn't advisable. - Not all soundcards are able to produce all bitrates, especially 64000 Hz, if you get errors using this samplerate, just use 48000 (or lower). Also 32bps (and 24bps) is very uncommon, so if you get errors using it, just use 16bps. -------------------------------------------------------------------------------------------- What to do in case of trouble with my plugin -------------------------------------------------------------------------------------------- First go to the documentation on my site: http://home.hccnet.nl/th.v.d.gronde/ Go to the section concerning your problem and read it, this might help you solve your problem. Then there are some known problems: Problem: WinAMP 'hangs' when you stop my plugin (or advance to the next track). Solution: I think this is due to a bug in some soundcard drivers, but my plugin contains a work-around (v1.61 and later) that is enabled by default, the checkbox controlling it is located in the config dialog. Problem: WinAMP 'hangs' on playing the location line://, in some cases this might be caused by the drivers of your soundcard, in other cases I still haven't solved it. Solution: Try to use the DirectSound features of my plugin, in some cases they work better than the standard functions. Problem: There is a delay between the sound input and the sound output. Solution: This isn't really a bug or something, but it can be irritating. The bad news is that I can't eliminate it (believe me, I have tried), the good news is that it can be minimized. In the Documentation on my site there is a whole section devoted to it, but in general you should use very small buffers (576 samples or less) and tweak the settings of the output plugin, or even use a different one (like my Low-latency waveOut plugin). If you can't solve your problem by reading the Documentation or this file, or you just want to verify you are doing the right thing, or you want to know wether there is a better solution, just mail me at th.v.d.gronde@hccnet.nl -------------------------------------------------------------------------------------------- Some info on sound -------------------------------------------------------------------------------------------- To be able to tune your settings it's handy to now something about the way the sound is input. To understand some of this you need to know that sound consists of vibrations. So for example a frequency of 1000 Hz means that there are a 1000 vibrations per second. The samplerate specifies the number of samples taken per second. This influences which frequencies can be measured. For example: with a samplerate of 44100 frequencies upto 22050 Hz are recorded well. Higher frequencies will tend to fall between the measurements. People can usually hear frequencies upto about 22000 Hz. 'Bits per sample' or bps specifies the number of bits are spent on describing the altitude of the wave. So the more bits the better the quality. Note: the 32bps is a setting I saw in CoolEdit, so I've added it for the ones that support it, but as far as I know it's at the very least an unusual setting (24bps is more common though, and I now even have a card that will allow it, I believe it will even allow me to ask for 32bps, but that it will only give me packed 24bps). The amount of space taken by samples is calculated with the following formula: B=SRATE*NCH*(BPS/8)*S B=Number of bytes filled in buffer SRATE=Samplerate NCH=Number of channels (1 for Mono and 2 for Stereo) BPS=Bits per sample (is divided by 8 to get bytes) S=number of seconds Example: Default setting for one second. B=44100 * 2 * (16/2) * 1 B=44100 * 2 * 2 B=44100 * 4 B=176400 You can use this to get an idea of what the buffersize is (default: 4608 samples, it used to be 0.02 secs or 20 ms). -------------------------------------------------------------------------------------------- History of versions -------------------------------------------------------------------------------------------- v1.80: - made the plugin use ExpandLib (a lot of char*'s have become string's and it now supports a different - more flexible - syntax for the title) - finally fixed the 'hang on stop' bug - fixed the chnmap option (it behaved badly in some cases) - fixed a bug that would cause problems with some VIS plugins (notably X-Plugin) v1.71: - added an option to not reprepare waveheaders all the time - added an option for a channel map (as well as a nochnmap option) v1.70: - added an 'Add Location' Wizard - changed the way aliases are stored, they are now stored by device name instead of id (more stable) - changed the parsing algorithm (first parses all the options, then sets them, makes it more stable; presets can now be used anywhere in the commandline; the plugin reports any options that were not recognized) - cleaned-up the parsing rules (introduced the no(s)time and nosdate options; backslash can be used to quote something everywhere in the commandline now) - made it possible to delete an alias (by giving it a zero string or by pressing del in the device list) - made the alias edit window a little bit nicer to use (the alias textbox automatically gets the focus) - made the plugin ask for confirmation when you delete a preset (or an alias) v1.61: - added directsound error strings to ReportError (now doesn't show unknown error all the time for directsound errors) - changed the layout of the error reporting messagebox a little (now always prints the error code) - made a global setting to prevent hangs on stop - removed the Sleep(10) command (eliminates a useless 10 ms delay in stopping) - some minor changes to the code v1.60: - changed all my code to c++ - added support for directsound devices - added support for aliases (for both directsound and wave devices) - put the devicelist on a tabcontrol, to support more than one type of devices - fixed a little bug that caused time=10:00 to act like time=10 v1.51: - added the unmute, showformat, stereo and checks options to counter their original versions - added the option of putting a - as a value for outbuflen and outprebuflen (resetting them to their defaults) - added support for specifying more than one preset in one option string - made sure that a presetloop won't cause the plugin to hang by allowing not more than 256 levels - support for Del en F2 in preset list - fixed the doubleclick bug in the preset list (it would open a preset dialog even if no preset was selected) v1.50: - added the preset option - reorganized the configuration dialog to accomodate a list of presets for the preset option - added the sdate option - added the nochecks option - the srate, bps and nch options are now 'freeform', srate in the range 1-768000, bps in the range 1-64 and nch in the range 1-32, this also means that you can't use the shorthands for the common samplerates anymore - bufsize now also supports specifying the size in time or samples - bufsize can now be anything between 16 and 1048476 bytes / samples or between 1 and 10000 ms - checks for a few possible misconfigurations - added the nochecks option to make it possible to disable the checks mentioned above - better error reporting - a minor change to how buffers are freed on stop - made some changes to the internal buffer handling v1.42: - added the output (pre)buffer length options - added the mono flag (more logical than nch=1) - increased the maximum for numbuffers to 100 (better skip protection) - better error handling - some small bugfixes (memory leakages, etc.) v1.41: - added a starting time - added an option for mute - two or three small bugfixes (concerning the title of entries not currently playing) - code has been restructured (shouldn't be noticable to the users, but it is to me) v1.40: - added the option to specify the device - fixed some bugs concerning the title - fixed a bug concerning pause - fixed some strange bugs concerning stopping and starting the sound - now checks a lot more things - some clean-ups v1.32: - fixed some bugs concerning the title (among other things I changed a certain counter mechanism) - fixed some bugs concerning errors, winamp used to produce an IPF or something similar when exiting after my plugin had caused an error - made a check to see if the format that is specified is supported v1.31: - fixed some bugs concerning the title - fixed some bugs involving timing (playing for a set time now works) - some other clean- and fix-ups v1.30: - added a short help to the config of the plugin - added title support - changed the way the time parameter works - restructered some things - FAQ (see my site) and this readme have been fully updated v1.23: - removed all unnecessary code including the thread that used to take care of the playing before 1.2 - recoded some stuff to improve it's efficiency - removed the counter system introduced in 1.22 because it has proven pointless - some minor bugfixes v1.22: - changed the way the counter works, now you can play very long (64bit integers) - as a result the code has been improved a bit - Windows 2000 support has been tweaked a bit v1.21: - tweaked version of 1.2 - added support for Windows 2000! v1.2: - changed how the plugin works (it doesn't buffer the sound anymore, because the buffering caused a lot of overhead - removed support for 441, it's a bit illogical - some minor bugfixes and code improvements v1.1: - more samplerates - some more bugfixes v1.0: - added parameters - added DSP support (needs 16 bps) - added support to play for a certain time - improved the getfileinfo (it nows displays something nicer in your playlist than "Line-In" or something even worse) - some minor bugfixes and coding improvements v0.0 (just to try if it worked): - just support to play Jasper van de Gronde th.v.d.gronde@hccnet.nl http://home.hccnet.nl/th.v.d.gronde/ (watch the site for updates and so on)