LineIn plugin for Winamp 2/5 Documentation - Customizing


Up  |  Previous  |  Next  |  Down

The title

This is actually a small section on how to set the title, just because it's nice to have the plugin look the way you want it to.
In its simplest form you would use these options: But, very common would be: This will remove the format string (44100Hz, 16bit, etc.) But this is only the most simple form of the title option, more advanced would be: This would display something like this: Note the %sr variable and the '\' in front of the ','. The %sr variable expands to the samplerate being used (see the Option reference for a full list of variables) and the '\' quotes the ',' so it won't be interpreted as the boundary between two options.

Presets

From v1.50 my plugin supports presets, which is a really cool option, because now you can make presets of all your favourite settings and it will be much easier to use them.

Adding a preset

To add a preset all you need to do is figure out which settings you would like to be a preset and then make a preset out of them, which is done by pressing going to the Winamp preferences (Ctrl-P), then select the input plugins category (1), select my plugin (2) and click the configure button (3):
Winamp's preferences window
In the configuration dialog of my plugin you will see a listbox with presets, which should be empty if you haven't added some presets already, in my case I've already added some presets:
My plugin's configuration dialog
If you want to add a preset, all you have to do is press the add preset button, this will get you a dialog in which you can enter a preset name and option string, of which at least the preset name should be filled-in. The option string can be anything that you can normally put after line://, including the preset option, which can be very usefull, but which should also be done with care, if you create a loop and use one of the presets in that loop, the plugin will hang (only in v1.50, v1.51 will automatically stop processing after the 256th level, from v1.70 it stops at the 100th level):

Removing, changing and renaming a preset

All you have to do is go to configuration dialog of my plugin, as explained above. Then you can remove a preset by selecting one and clicking the remove preset button.
To rename a preset you can select a preset and then click its name again (or press F2), then you can simply type a new name, just like renaming a file in Windows Explorer.
To change a preset's option string you have to double-click a preset, this will get you the same dialog as when you are adding a preset, only the preset name edit box is disabled. This is similar to changing a string value in the registry editor.

Using a preset

Now that you've created some presets, you might want to start using them. All you have to do is use the preset=x option, like this: The above will have the same result as typing the following (on my computer): So it is not that hard to use a preset, but what if I wanted to use my radio preset with a higher samplerate for one time (so I don't want to change the preset)? This can be done very easily: That would have the same result as: Or to be more precise: Because that's how the plugin works, it first processes the preset and then it processes the rest of the options with the options of the preset as defaults.

Some notes on using presets

Up  |  Previous  |  Next  |  Down


To contact me, please mail to: th.v.d.gronde@hccnet.nl
I hope you'll enjoy my program(s).