home *** CD-ROM | disk | FTP | other *** search
-
- ========================== =========================
- LineIn input plug-in v1.51 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 for example
- to 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.
-
- --------------------------------------------------------------------------------------------
- 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):
- line://[option1=value1,][option2,][etc.]
- The following options are available:
-
- srate=x
- Determines the samplerate (default: 44100)
- Can be one of the following (v1.42 and earlier):
- 6000 (or 6) (v1.1)
- 8000 (or 8) (v1.0)
- 11025 (or 11) (v1.0)
- 16000 (or 16) (v1.1)
- 22050 (or 22) (v1.0)
- 32000 (or 32) (v1.1)
- 44100 (or 44) (v1.0)
- 48000 (or 48) (v1.1)
- 64000 (or 64) (v1.1)
- Remember that your soundcard has to support the samplerate! Especially 64000 isn't supported much.
- For versions later than v1.42 (from v1.50) you can enter any samplerate between 1 and 768000 Hz, of course your
- soundcard still has to support it.
- From v1.50 the shorthands are not supported anymore.
-
- bps=x
- Determines the number of bits per sample (default: 16)
- Can be one of the following (v1.42 and earlier):
- 8
- 16
- 32 (v1.23)
- 32 bit sound isn't supported by a lot of soundcards.
- For versions later than v1.42 (from v1.50) you can enter any value between 1 and 64 (although you will be asked
- wether the plugin shall round the value up to the nearest multiple of eight if you don't enter a number that's a
- multiple of eight, also the internal blockalign field will always use the rounded up value). Of course your soundcard
- has to support it.
- NOTE: My plugin supports 24bps sound from v1.50, but not every output plugin does, in my experience the waveOut and
- DirectSound plugins do not handle it correctly. The DiskWriter plugin does handle it correctly though, as does my
- own low-latency output plugin.
-
- nch=x
- Determines wether the device is mono or stereo (default: 2)
- Can be one of the following:
- 1 (mono)
- 2 (stereo)
- For versions later than v1.42 (from v1.50) you can enter any value between 1 and 32, again your soundcard has to
- support it.
-
- mono (v1.42)
- Same as nch=1
- This parameter is like a flag.
-
- stereo (v1.51)
- Same as nch=2
- This parameter is like a flag.
-
- time=x (was changed in v1.30)
- Specifies for how long the plugin should play (default: for ever) If it's not specified the plugin will play for
- ever, it it's specified it will play for as long as specified.
- Can be in the following form:
-
- v1.0 upto v1.23:
- h:m:s[.hs]
- for example: 2:30:5 will play for 2 hours, 30 minutes and 5 seconds
- m:s[.hs]
- for example: 2:30 will play for 2 and a half minutes
- The previous two can be extended with .hs (for example 1:20.50 will play for 1 minute, 20 seconds
- and 50 hundreds of a second).
-
- s.hs
- seconds.hundredsofseconds, so not just seconds, the plugin will interpret that as ms.
- ms
- for example: 1200 will play for 1200 milliseconds (1.2 seconds)
-
- v1.30 and up:
- h:m:s[.x]
- for example: 2:30:5 will play for 2 hours, 30 minutes and 5 seconds
- m:s[.x]
- for example: 2:30 will play for 2 and a half minutes
- s[.x]
- for example: 1200 will play for 1200 seconds (20 minutes)
- They can all be extended with .x, which is interpreted as fractions of seconds. x will be rounded to
- milliseconds.
- For example 1:20.5 will play for 1 minute, 20 seconds and 500 milliseconds, half a second).
- 5.0025 will be rounded to 5.003 and 5.0024 will be rounded to 5.002
- This format boils down to: [[h:]m:]s[.x]
-
- stime=x (v1.41)
- Starting time, when you use this the plugin will pause until it's the time you specified.
- The format of the time is: h:m[[:s].x] (default: not set).
- Example: line://stime=14:07,time=55:0,title=My favourite show!
- Suppose it's 11:00 and you set this to play, the plugin will pause until it's 7 past 2 PM and then play for 55
- minutes.
-
- sdate=x (v1.50)
- Starting date, when you use this the plugin will pause until it's the date you specified.
- The format of the date is: yyyy-m-d (default: not set, starting time will default to current time).
- Example: line://sdate=2001-11-05,stime=20:07,time=55:0,title=That radio program I always wanted to hear!
- Suppose it's November 4th, 2001 and you set this to play, the plugin will pause until it's 7 past 8 PM the next day
- and then play for 55 minutes.
-
- numbuffers=x (v1.23, changed in v1.42 and then again in v1.50)
- The number of buffers used. The plugin uses multiple buffers to reduce skipping and so on.
- Has to be >=1 and <=1000 (default: 10, in versions previous to v1.42 the maximum used to be 50 and v1.42 has a
- maximum of 100).
- Recommended not to set this to 1, this will probably result in enormous skips. Recommended is a setting of 10 or
- higher, but on a fast PC or if it's all you're running, less can decrease memory usage.
-
- bufsize=x (v1.23, was changed in v1.50)
-
- v1.23 upto v1.42:
- The size of the buffers used (in bytes). You can specify it to suit your needs.
- Has to be >=576 and <=8192 (default: 3528).
- A lower setting is better for VIS, a higher setting improves performance and prevents skips. So if you want
- to do realtime VIS shows, use 576 (if you can).
-
- v1.50 and up:
- bufsize=[t|s]x
- The size of the buffers used in bytes (only value, x), time ('t' plus value, tx) or samples ('s' plus value,
- sx). You can specify it to suit your needs.
- Has to be >=16 and <=1048576 for bytes and samples or >=1ms and <=10000ms in the same format as the time
- option (10 seconds) for time (default: 4608 bytes).
- Example (bytes): bufsize=2304 creates a buffer of 2304 bytes
- Example (samples): bufsize=s576 creates a buffer of 576 samples, which equals 2304 bytes at 16bps, Stereo
- Example (time): bufsize=t0.012 creates a buffer with a duration of 0.012 seconds, which equals 576 samples
- or 2304 bytes at 48000Hz, 16bps, Stereo
- A lower setting is better for VIS, a higher setting improves performance and prevents skips. So if you want
- to do realtime VIS shows, use s576 (if you can).
- NOTE: Previous to v1.50 I made a wrong assumption about the optimal VIS value, it should have been 576
- samples instead of bytes, which is usually 2304 bytes. Therefor it is recommended to use s576 instead of 576
- with v1.50 and up of my plugin.
-
- title=x (v1.30)
- Specifies the title to show instead of Line-In. This does not replace the part (44100 Hz 16bps Stereo, buffers:
- 10x3528 bytes). To disable that use 'hideformat'.
- Default is 'Line-In'.
- This parameter can be very simple, just a name, like: My favourite channel But it also has support for more advanced
- parameters. You can use the backslash (\) to quote a ',' (otherwise it's seen as a parameter seperator). Also you
- can include variables in your title like the samplerate and so on.
- For example:
- line://title=My favourite channel\, in %ct!,hideformat
- Gives (as a title)
- My favourite channel, in Stereo!
- DO NOT forget to quote the ','!
- Some examples:
- line://title=My radio\, with a samplerate of %srHz
- My radio, with a samplerate of 44100Hz (44100Hz 16bps Stereo, buffers: 10x3528)
-
- line://title=My radio\, with a samplerate of %srHz,srate=8000,hideformat
- My radio, with a samplerate of 8000Hz
-
- Full list of variables (not all were implemented in v1.30):
- %sr - samplerate in Hz
- %br - bitrate in KBps
- %cn - number of channels (1 or 2)
- %ct - number of channels (Mono or Stereo, or x channels for more than two channels in versions later than
- v1.42)
- %bi - bits per second
- %ln - length in ms
- %lt - length in the format: [[h:]m:]s[.x] (see the time parameter)
- %bn - number of buffers
- %bs - buffersize
- %th - current time in hours
- %tm - current time in hours and minutes
- %ts - current time in hours, minutes and seconds (these options all use your own windows settings)
- %tl - current time in milliseconds (this uses the same format as %lt)
- %dl - current date, long format
- %ds - current date, short format (these options use your own windows settings)
- %st - starting time (same format as %ts)
- %sd - starting date (same format as %ds)
- %mu - muted (nothing if not muted)
- %mt - muted (unmuted if not muted)
- %ob - outbuflen (in ms)
- %op - outprebuflen (in ms)
- %ot - outbuflen (in time format, [[h:]m:]s[.x])
- %ou - outbuflen (in time format, [[h:]m:]s[.x])
- %ck - wether the plugin performs the format checks (see the nochecks option) ('checks' or 'no checks')
- %di - the device ID (corresponds to the dev option)
- %dn - the device name (corresponds to the dev option)
- %xNN - inserts a char with ASCII code NN (hex), for example %x20 for a space, or %x07 for a bell (don't
- know why you'd want that, but it's possible)
- If there are any other things you would like to see added to this list, just mail me.
-
- hideformat (v1.30)
- Hides the part of the name that specifies the format used. This is meant to be used together with title, but also
- for those of you who just don't like to see the format.
- The default is: not set. This is not a parameter which takes a value. It's more like a flag.
-
- showformat (v1.51)
- Shows the part of the name that specifies the format used. This is meant to be used to undo hideformat (which you
- might have set in a preset.
- The default is: set. This is not a parameter which takes a value. It's more like a flag.
-
- dev=x (v1.40)
- The device to use.
- For the list of possible numbers, see the config box. (default: -1, the wave mapper)
- This is NOT a replacement for windows volume control, this is meant to make it possible to use things like a
- Virtual Audio Cable.
- NOTE: Versions older than 1.40 of my plugin used device 0 instead of -1.
- This means that if you didn't have sound at all with an older version of my plugin, and you've got more than one
- sounddevice (two soundcards or one soundcard and for example Virtual Audio Cable), this might solve your problem.
-
- mute (v1.41)
- This will mute the sound, that means that the plugin won't output anything (actually just zeros). The VIS and DSP
- are fed with data however.
- The default is: not set. This is like a flag.
-
- unmute (v1.51)
- This will unmute the sound, this is to undo the effects of the mute option (which might have been set in a preset).
- The default is: set. This is like a flag.
-
- outbuflen=x (v1.42)
- The output buffer length in ms (format: h:m[[:s].x]).
- The default is: -1 (specify 0 for the default value of the output plugin)
- From v1.51 you can also specify - (a minus sign) as a value, this will counter the effect of a previous outbuflen
- option (which might have been inside a preset). It will also set the outprebuflen option back to -1.
- This option is meant for tweaking purposes, it should set the output plugin's buffer size, but my plugin can't
- garantuee that it does (the output plugin has to implement it).
- NOTE: This value should be higher than or equal to outprebuflen.
-
- outprebuflen=x (v1.42)
- The output prebuffer length in ms (format: h:m[[:s].x]).
- The default is: -1 (specify 0 for the default value of the output plugin)
- From v1.51 you can also specify - (a minus sign) as a value, this will counter the effect of a previous outprebuflen
- option (which might have been inside a preset). This will not set the outbuflen option back to -1.
- This option is meant for tweaking purposes, it should set the output plugin's prebuffer size, but my plugin can't
- garantee that it does (the output plugin has to implement it).
- NOTE: This value should be lower than or equal to outbuflen.
-
- nochecks (v1.50)
- A flag to disable the format checks (means you won't get any messages telling you that your buffer size could crash
- WinAMP or that your bits per sample is not a multiple of eight), can be usefull if you have a setup that supports
- 20bit sound or want to use a very small buffer size.
- Default: not set.
-
- checks (v1.51)
- A flag to counter the effect of a previous nochecks option (which might have been set in a preset).
- Default: set.
-
- preset (v1.50)
- This lets you use a preset, for example you could create a preset (see the Customizing section) called radio that
- would contain the following:
- srate=32000,mono,title=My radio,hideformat
- After you've created the preset the following two would be equivalent:
- line://srate=32000,mono,title=My radio,hideformat
- line://preset=radio
- Of which the second one would be a lot easier to type than the first.
- Default: not set.
- NOTE 1: When you create a preset you can use a the preset option within the preset, but you should use this option
- with care, if you create a loop, the plugin will hang! (only in v1.50, v1.51 will automatically stop
- processing the parameters)
- NOTE 2: The preset option MUST be the first option specified, otherwise it won't be recognised. From v1.51 you can
- specify a preset option after another preset option, which would look like this (for example):
- line://preset=somepreset,preset=anotherpreset,preset=thirdpreset,srate=32000
- You can specify more options after the preset option, this allows you to make one general preset that specifies
- certain things and then customize it a little when you use it, for example you might have created a preset called
- 'vis' containing: srate=48000,bufsize=s576,title=Good VIS.
- Now you want to use that preset with a 96000 Hz source, all you have to do is this:
- line://preset=vis,srate=96000
-
-
- Some 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.
-
- --------------------------------------------------------------------------------------------
- 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.
-
- 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: 0.02 secs or 20 ms).
-
- --------------------------------------------------------------------------------------------
- History of versions
- --------------------------------------------------------------------------------------------
- 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)
-