<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.shoutcast.com/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.shoutcast.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ashokbania</id>
		<title>Winamp Developer Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.shoutcast.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ashokbania"/>
		<link rel="alternate" type="text/html" href="http://wiki.shoutcast.com/wiki/Special:Contributions/Ashokbania"/>
		<updated>2026-05-02T11:50:15Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.22.3</generator>

	<entry>
		<id>http://wiki.shoutcast.com/wiki/User_talk:Ashokbania</id>
		<title>User talk:Ashokbania</title>
		<link rel="alternate" type="text/html" href="http://wiki.shoutcast.com/wiki/User_talk:Ashokbania"/>
				<updated>2009-12-21T18:25:40Z</updated>
		
		<summary type="html">&lt;p&gt;Ashokbania: /* Thanks */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Nice Overview==&lt;br /&gt;
Hey, thanks for the awesome overview of submitting a service on [[Online Service Developer]]. Nice work! --[[User:Culix|Culix]] 18:13, 21 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Thanks ==&lt;br /&gt;
&lt;br /&gt;
Hi, I originally wrote this wiki. But somehow someone vandalized it. I restored it back. I have asked Ben London to block the user.&lt;/div&gt;</summary>
		<author><name>Ashokbania</name></author>	</entry>

	<entry>
		<id>http://wiki.shoutcast.com/wiki/Online_Service_Developer</id>
		<title>Online Service Developer</title>
		<link rel="alternate" type="text/html" href="http://wiki.shoutcast.com/wiki/Online_Service_Developer"/>
				<updated>2009-12-21T10:46:58Z</updated>
		
		<summary type="html">&lt;p&gt;Ashokbania: /* Submitting Your Service */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Breadcrumb''' -- [[Main_Page|Wiki Main]] : [[Skin Developer]] : [[Visual Developer]] : [[Plug-in Developer]] : [[Online Service Developer]] : [[Articles|Articles Page]] : [[Developers FAQ|FAQ]] : [[Glossary]] : [[Spam]]&lt;br /&gt;
[[Category:Winamp]]&lt;br /&gt;
==The What and Why of Online Services==&lt;br /&gt;
===What is a Winamp Online Service===&lt;br /&gt;
A Winamp online service has several distinctive features.  The first is that it is a web site that appears embedded within the Winamp client.  The second, and more fun feature, is that the web pages so displayed are able to interact with the Winamp Client.  The third is that access to the online services is presented to the large Winamp community as part of the Winamp client's Online Services Gallery.&lt;br /&gt;
&lt;br /&gt;
===Benefits to creating an Online Service===&lt;br /&gt;
There are many benefits for developing an Online Service. Before we delve into the list, the most important benefit is distribution. Winamp is a great distribution platform as it has 77 million unique users every month!!&lt;br /&gt;
&lt;br /&gt;
Hence,&lt;br /&gt;
#a) if your website needs page views and more monetization&lt;br /&gt;
#b) if your brand needs more eye balls&lt;br /&gt;
#c) if your blog needs more readers&lt;br /&gt;
#d) if you want to develop an web application which has something to do with music, video, photo, streaming, podcasts, music events, #e-commerce, games then you will never regret making an Online Service in Winamp.&lt;br /&gt;
&lt;br /&gt;
Try it now!&lt;br /&gt;
&lt;br /&gt;
===Integrating Online Services with Winamp===&lt;br /&gt;
The Winamp Online Services API is designed to allow web pages, hosted (displayed) within the embedded browser of the Winamp client.  In order to make this happen you have to do the following:&lt;br /&gt;
&lt;br /&gt;
*Make sure you have the latest version 5.55 (or above) of the Winamp client. You can download the client from this [http://forums.winamp.com/showthread.php?threadid=302079 forum link]&lt;br /&gt;
*Make sure you have the latest version of the ml_webdev plugin (ml_webdev.dll). Get the plugin from this  [http://download.nullsoft.com/winamp/plugin-dev/wa_webdev.exe link].  This plugin will create a &amp;quot;Web Dev Test Platform&amp;quot; within the Medial Library pane. It has it's own special installer.&lt;br /&gt;
&lt;br /&gt;
In order to change the starting web page for the online service, start the Winamp client and configure the plugin. &lt;br /&gt;
#Open the Winamp player&lt;br /&gt;
#Select Options-&amp;gt;Preferences-&amp;gt;Plug-ins-&amp;gt;Media Library. &lt;br /&gt;
#Select &amp;quot;WebDev Test Platform v2.0&amp;quot; and press &amp;quot;Configure selected plugin&amp;quot;. &lt;br /&gt;
#On the Web Dev Preferences dialog, set the URL field to the URL of the initial web page for the online service. For example, file://c:\myonlineservice\webdev.html &lt;br /&gt;
#Click on &amp;quot;Web Dev Test Platform&amp;quot; in the Media Library. You may have to right click and choose refresh to see the new web page. &lt;br /&gt;
You should now see the initial page of your online service in the Winamp embedded browser.&lt;br /&gt;
&lt;br /&gt;
==Registering an Account==&lt;br /&gt;
While you can start developing an online service immediately, you will need to create a Winamp account before you can submit your service.  To do this follow these steps:&lt;br /&gt;
*Open your favorite web browser and go to http://www.winamp.com&lt;br /&gt;
*Choose &amp;quot;Register&amp;quot; from the top of the page.&lt;br /&gt;
*Enter your First Name.&lt;br /&gt;
*Enter your Last Name.&lt;br /&gt;
*Enter an email address where you can be contacted. (Note: the email must be unique for each registration as this is used as your Login name.)&lt;br /&gt;
*Enter a password to use when you login.&lt;br /&gt;
*Enter your Birthdate.&lt;br /&gt;
*Click on the TERMS link and read the Winamp.com Terms of Use.&lt;br /&gt;
*Click BACK to return to the registration form.&lt;br /&gt;
*Make sure the checkbox is checked to say you've read and agree to the TERMS.&lt;br /&gt;
*Click the &amp;quot;register&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
==Submitting Your Service==&lt;br /&gt;
===The Submission Process===&lt;br /&gt;
Once you have come up with an amazing idea for an Online Service that uses Winamp, how do you get it into the Winamp Online Services Gallery so that users can start visiting it?  Glad you asked.  First you must start by submitting the service to Winamp.  After being submitted, the service will go through a Winamp internal review process.  If the service passes the review it will then be automatically included in the Winamp Online Services Gallery.&lt;br /&gt;
&lt;br /&gt;
The progress of your service through these steps can be seen through the use of the &amp;quot;My Profile&amp;quot; link at the top of the Winamp.com main page after logging in.&lt;br /&gt;
&lt;br /&gt;
====Submitting an Online Service====&lt;br /&gt;
*Login to www.winamp.com&lt;br /&gt;
**Navigate to www.winamp.com&lt;br /&gt;
**Select &amp;quot;Winamp.com: Login&amp;quot; from the top of the page&lt;br /&gt;
**Enter the email address and password specified when you registered your account.&lt;br /&gt;
**Mouse over the gold &amp;quot;Online Services&amp;quot; button at the top of the screen.&lt;br /&gt;
**Choose &amp;quot;submit an online service&amp;quot; from the buttons in the drop down&lt;br /&gt;
**Make sure you follow the guidelines specified and press &amp;quot;Proceed&amp;quot;.&lt;br /&gt;
**Enter the following information on the form:&lt;br /&gt;
***Service Name (15 characters max) - This name will be displayed on the first line for the service in the Winamp Gallery.&lt;br /&gt;
***Description (750 characters max) - Enter text describing your online service.&lt;br /&gt;
***Online Service URL - Enter the URL to launch your service.&lt;br /&gt;
***Categories - Select two categories so your service can be grouped with other services.&lt;br /&gt;
***Tags - Enter tags so that users can find your service by searching&lt;br /&gt;
***Thumbnail Image (optional, .gif, .jpg, .png, max size 178x75 pixels) - Displayed in the Winamp Gallery.&lt;br /&gt;
***Installer Image (optional, .gif, .jpg, .png, max size, 64x64 pixels - Displayed by Winamp Installer &lt;br /&gt;
***List Icon Image (optional, .gif, .jpg, .pgn, max size: 16x16 pixels - Displayed in the Winamp &amp;quot;Media Library&amp;quot; pane.&lt;br /&gt;
***Country - Select the countries which your online service supports.&lt;br /&gt;
***Language - Select the languages which your online service supports.&lt;br /&gt;
***Customer Support Email Id - An email address where user comments/complaints will be sent.&lt;br /&gt;
***Click and read the Terms and Conditions&lt;br /&gt;
***Check &amp;quot;Agree to Terms and Conditions&lt;br /&gt;
***Click &amp;quot;Finish&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=====Categories/Types of Online Services=====&lt;br /&gt;
*Events&lt;br /&gt;
*Streaming&lt;br /&gt;
*Podcasts&lt;br /&gt;
*Photo&lt;br /&gt;
*Music&lt;br /&gt;
*Video&lt;br /&gt;
*Radio&lt;br /&gt;
*E-Commerce&lt;br /&gt;
*Artists&lt;br /&gt;
*Games&lt;br /&gt;
*Internet TV&lt;br /&gt;
*Others&lt;br /&gt;
&lt;br /&gt;
=====Tags Vs. Categories=====&lt;br /&gt;
You can tag/categorize a piece of information in your site and allows this piece of information to be searched and indexed. &lt;br /&gt;
&lt;br /&gt;
So what are categories? Categories help you organize your content under a more familiar taxonomy. By familiar, we mean non-unique and non-personal words; thereby allowing a user to navigate your content with ease knowing what they want. That's the reason why we have fixed the categories. They are Music, Video, Radio, E-Commerce, Photo, Artists, Streaming, Podcast, Games, Internet TV, Events and Other. This will also give you a clear indication on what you can actually create. And if you think you can create something else, there is always the 'Other' category.&lt;br /&gt;
&lt;br /&gt;
Then why do we need tags? Well, you can personalize your Online Service with your own tags. For e.g. for a hypothetical online service Music Shoppe (Let's say) tags can be 'music shoppe', 'music shop', 'purchase music', 'music shop', 'music store' whereas categories can be broader like 'music' &amp;amp; 'e-commerce'. All you have to do is make them short, crisp, relevant (search compatible) and small in numbers so that they are relevant.&lt;br /&gt;
&lt;br /&gt;
Tags will be introduced shortly. Till then, please use categories :)&lt;br /&gt;
&lt;br /&gt;
===Monitoring the Status of your Submission with &amp;quot;My Profile&amp;quot;===&lt;br /&gt;
After you have successfully submitted an online service, Winamp will put it through a review process.  You can check the status of your online service by examining the &amp;quot;My Profile&amp;quot; link in the upper right of the screen after logging in to www.winamp.com.&lt;br /&gt;
&lt;br /&gt;
Note that once you go to your profile, there are three links, one for each of the types of submissions you may have made.  Choose &amp;quot;Online Services&amp;quot; to see that type.&lt;br /&gt;
&lt;br /&gt;
The online service will proceed thru the following stages:&lt;br /&gt;
&lt;br /&gt;
#Online Services in Review - The online service has been submitted and is awaiting review&lt;br /&gt;
#Approved Online Services - The service has been reviewed and is waiting to be either published or rejected.  An online service should only stay in this state for a short time.&lt;br /&gt;
#Published Online Services - The online service was found to be acceptable and is now available in the Winamp Gallery.&lt;br /&gt;
#Rejected Online Services - The online service was found to be '''un'''-acceptable and is '''not''' available in the Winamp Gallery.&lt;br /&gt;
&lt;br /&gt;
===Managing your Online Service with &amp;quot;My Profile&amp;quot;===&lt;br /&gt;
Once your online service has been published, there are several things you can do to manage it through the My Profile page.&lt;br /&gt;
&lt;br /&gt;
====Viewing Service Information====&lt;br /&gt;
Each published online service will show the following:&lt;br /&gt;
*Unique ID - A ID that uniquely identifies your online service.&lt;br /&gt;
*Version # - The current version number of your online service.&lt;br /&gt;
*Description - The description you typed when submitting the service.&lt;br /&gt;
*First Published on - Date on which this online service was first published. &lt;br /&gt;
*Last Edited on - Last date this online services was edited.&lt;br /&gt;
*Last Approved on - Last date this online service was approved. &lt;br /&gt;
*Reporting On - A section showing the following statistics&lt;br /&gt;
**Service has been added - The service is available in the gallery.&lt;br /&gt;
**Service has been removed - The service is not available and has been deleted.&lt;br /&gt;
**Service has been accessed - The number of times users have accessed the site through the Winamp Client.&lt;br /&gt;
**Unique Users - The number of views by unique (i.e., new ip addresses) users.&lt;br /&gt;
**Ratings - Average user rating.&lt;br /&gt;
**Number of Ratings - How many users have rated the online service&lt;br /&gt;
**Abuse Reports - How many abuse reports have been sent against this service.&lt;br /&gt;
&lt;br /&gt;
====Editing your Online Service Info====&lt;br /&gt;
My Profile contains an '''EDIT''' button so you can change the details that you entered when you first submitted the online service for review.  This button will take you to a form where you can change these values.  Changing the values will increase the version number of the online service and submit the service for review.&lt;br /&gt;
&lt;br /&gt;
====Removing your Online Service====&lt;br /&gt;
My Profile also has a '''REMOVE''' button so the author can delete the online service.  To reinstate the service you will have to resubmit it.&lt;br /&gt;
&lt;br /&gt;
====Hiding your Online Service====&lt;br /&gt;
'''Hide from Gallery''' will prevent the online service from appearing in the Winamp client online services gallery.  This can be used to temporarily prevent users from subscribing to the service.&lt;br /&gt;
&lt;br /&gt;
==Style Guide==&lt;br /&gt;
&lt;br /&gt;
Please reference this wiki page for optimizing how your online service looks/performs inside of Winamp&lt;br /&gt;
&lt;br /&gt;
[[Winamp_Browser_Support|Winamp Browser Support]]&lt;br /&gt;
&lt;br /&gt;
==JavaScript APIs==&lt;br /&gt;
Here is a summary of the API methods that can be called from an online service.&lt;br /&gt;
&lt;br /&gt;
For more details on the methods available check out the [[complete JavaScript API technology framework]]&lt;br /&gt;
&lt;br /&gt;
*Transport API&lt;br /&gt;
**Play &lt;br /&gt;
**Stop&lt;br /&gt;
**Pause&lt;br /&gt;
**Advance to next track&lt;br /&gt;
**Back up to previous track&lt;br /&gt;
**Shuffle&lt;br /&gt;
**Repeat&lt;br /&gt;
**Event Notifications - so the web page can tell when the events happen&lt;br /&gt;
***When the player starts playing&lt;br /&gt;
***When the player is stopped&lt;br /&gt;
***When the player is paused&lt;br /&gt;
***When the player reaches the end of a file &lt;br /&gt;
**Metadata - get metadata for currently playing song&lt;br /&gt;
**position - change the playback position of currently playing song&lt;br /&gt;
 &lt;br /&gt;
*Playqueue API&lt;br /&gt;
**The ability to alter the Winamp Queue of songs about to be played.&lt;br /&gt;
***Play - clear the queue and play a song.&lt;br /&gt;
***Enqueue -  add a song to the queue&lt;br /&gt;
***Insert - add a song to the queue at a position&lt;br /&gt;
***Clear - clear the queue&lt;br /&gt;
***Metadata - get metadata for a song in the queue&lt;br /&gt;
 &lt;br /&gt;
*Playlists API&lt;br /&gt;
**Get a list of all playlists&lt;br /&gt;
**Open a playlist for alteration&lt;br /&gt;
**Save a modified playlist&lt;br /&gt;
 &lt;br /&gt;
*Playlist methods - once a playlist is opened these are available.&lt;br /&gt;
**Get and set info about individual items in the playlist&lt;br /&gt;
**Swap two songs&lt;br /&gt;
**Randomize the order of songs&lt;br /&gt;
**Reverse the order of songs&lt;br /&gt;
**Sort By Filename&lt;br /&gt;
**Sort By Title&lt;br /&gt;
**Clear (empty) the playlist&lt;br /&gt;
 &lt;br /&gt;
*Bookmarks API&lt;br /&gt;
**Add a bookmark&lt;br /&gt;
**TBD&lt;br /&gt;
 &lt;br /&gt;
*Podcasts API&lt;br /&gt;
**Subscribe to a Podcast&lt;br /&gt;
**More TBD&lt;br /&gt;
 &lt;br /&gt;
*Secuirty API&lt;br /&gt;
**In place, but not fully ready&lt;br /&gt;
**TBD&lt;br /&gt;
 &lt;br /&gt;
*LocalMedia API&lt;br /&gt;
**TBD&lt;br /&gt;
 &lt;br /&gt;
*History API&lt;br /&gt;
**Query the History DB - retrieve info about songs played previously&lt;br /&gt;
 &lt;br /&gt;
*Config API&lt;br /&gt;
**The ability to store JavaScript properties persistantly.&lt;br /&gt;
 &lt;br /&gt;
*Application API&lt;br /&gt;
**Launch the internal Winamp browser.&lt;br /&gt;
**Launch an external browser.&lt;br /&gt;
**Get the version of the internal browser.&lt;br /&gt;
**Get the language pack info&lt;br /&gt;
 &lt;br /&gt;
*Skins API&lt;br /&gt;
**Retrieve color and font information regarding the currently assigned Winamp client skin.&lt;br /&gt;
 &lt;br /&gt;
*MediaCore API&lt;br /&gt;
**Retrieve metadata for a specified file&lt;br /&gt;
**Determine whether a specific file format (file extension) is supported by the Winamp Client.&lt;br /&gt;
&lt;br /&gt;
==User Feedback==&lt;br /&gt;
There are several methods by which users can provide feedback on your online service.&lt;br /&gt;
&lt;br /&gt;
===Ratings by Users===&lt;br /&gt;
The Winamp client allows users to rate your online service.  You can see the average rating and the number of times that your service has been rated using the &amp;quot;My Profile&amp;quot; link on winamp.com after logging in.  This way you can tell whether thousands of people adore your service, or perhaps it was a single rating from your best friend.&lt;br /&gt;
&lt;br /&gt;
===Abuse Reporting===&lt;br /&gt;
Users can also complain if they find something objectionable.  These &amp;quot;abuse reports&amp;quot; may be forwarded to the online service developer to be resolved.  So don't do bad things.  And no, SlyHawk, parcour will not help you here.&lt;br /&gt;
&lt;br /&gt;
==Additional Considerations==&lt;br /&gt;
===Security===&lt;br /&gt;
In order to help protect users from potential abuse by online services, Winamp has implemented a strategy to notify users that a web service is about to issue one of the online service api methods.  The warning message will ask the user whether the method should proceed.  Each security prompt will be applied to the action being requested as well as certain related actions of the same API.  There is also a way to indicate that the selection should be used for ALL other security prompts for the current online service.  This prevents the user from being bombarded with what may sound like repetitive requests.  If the author of the online service upgrades their service, these choices will be carried forward to the new release.&lt;br /&gt;
&lt;br /&gt;
For a more in depth discussion of the security prompts go to [[Online Service Security Prompts]].&lt;br /&gt;
[[http://www.example.com link title]]&lt;/div&gt;</summary>
		<author><name>Ashokbania</name></author>	</entry>

	<entry>
		<id>http://wiki.shoutcast.com/wiki/Wasabi</id>
		<title>Wasabi</title>
		<link rel="alternate" type="text/html" href="http://wiki.shoutcast.com/wiki/Wasabi"/>
				<updated>2009-04-25T17:21:19Z</updated>
		
		<summary type="html">&lt;p&gt;Ashokbania: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''W'''inamp '''S'''ervice '''A'''rchitecture '''B'''inary '''I'''nterface&lt;br /&gt;
== Rationale ==&lt;br /&gt;
&lt;br /&gt;
The plugin struct definition API is effective, but it would be cumbersome to create a new plugin type for every possible scenario.  As a result, a new generic plugin system was created named Wasabi (Winamp Service Architecture Binary Interface).  Instead of hard-coded lists of function pointers to be defined, plugins create C++ objects implementing known interfaces identified with some unique ID (GUID).  Rather than a specific filename having one specific plugin type (in_*.dll for Input plugins), Wasabi components 'register' the services they provide.  This allows one plugin to load provide multiple services, allows for new plugin types to be created without new code, and allows for &amp;quot;specialized&amp;quot; plugin types.  For example, playlist.w5s loads the [[Playlist API|Playlist Manager API]] for loading and analyzing playlist files, as well as individual playlist loading objects for each type (M3U, PLS, B4S), and various helper services involving playlists.&lt;br /&gt;
&lt;br /&gt;
Plugins can communicate with each other by requesting each other's services via the Service Manager.  They can also query for API's that Winamp itself registers such as the [[System Callbacks API]] (generic notification system) and the [[Application API]] (allows plugins to query for version number, settings path, etc)&lt;br /&gt;
&lt;br /&gt;
Wasabi relies on a common base class called &amp;quot;Dispatchable&amp;quot;.  Dispatchable implements a single virtual method which consists of a &amp;quot;function ID&amp;quot; integer value, an array of parameters and a parameter count.  Child class implementations override this function with logic which &amp;quot;dispatches&amp;quot; each ID to the appropriate function.  In some regards, it is similar to the old [[SendMessage API]].  However, a set of inline helper methods defined inside each interface removes the complexity of using Wasabi interfaces, and most of the complexity from implementing Wasabi interfaces.  They can be treated like any other C++ object.&lt;br /&gt;
&lt;br /&gt;
== Components of Wasabi ==&lt;br /&gt;
 &lt;br /&gt;
* api definitions - formalizes the interfaces for various objects, APIs, interfaces and services&lt;br /&gt;
* wasabi helper classes - accesses the service manager to find services to perform required tasks. e.g. FileReaderApi enumerates the available file reader services to find an appropriate one and read from it. Used to hide complexity from the programmer. Some of these exist as shared services, to cut down on duplicate code across plugins.&lt;br /&gt;
* general purposes helper classes / functions - called BFC (brennan foundation class) currently.&lt;br /&gt;
&lt;br /&gt;
What is Wasabi intended to solve?&lt;br /&gt;
&lt;br /&gt;
# C++ does not define a binary interface to share objects between modules&lt;br /&gt;
# The existing [[SendMessage API|winamp 2]] plugin architecture only defines a limited set of interfaces&lt;br /&gt;
# Existing winamp 2 plugins have limited interaction with Winamp.&lt;br /&gt;
&lt;br /&gt;
== Dispatchable ==&lt;br /&gt;
&lt;br /&gt;
The Dispatchable class is the base class for many of the classes within Wasabi. It contains a single virtual method, _dispatch(), which is passed a dispatch ID msg, a pointer to store a return value retval, a pointer to an array of parameters params, and the parameter count nparam.&lt;br /&gt;
&lt;br /&gt;
The class is defined as:&lt;br /&gt;
&lt;br /&gt;
 '''class''' Dispatchable&lt;br /&gt;
 {&lt;br /&gt;
 '''public''':&lt;br /&gt;
  // this is virtual so it is visible across modules&lt;br /&gt;
  '''virtual''' '''int''' _dispatch('''int''' msg, '''void''' *retval, '''void''' **params = NULL, '''int''' nparam = 0)=0;&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
In many ways, it is similiar to the Invoke() portion of COM's IDispatch class. It is also conceptually similiar to a Win32 Window Procedure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When classes are used by different plugins, the Dispatchable base class is used instead of abstract classes with pure virtual functions. Why? Because it makes it easier to add additional methods, without requiring &amp;quot;version 2&amp;quot; classes such as those that COM uses. (See for example http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmform95/htm/readerobject.asp). And since the handling of an unknown &amp;quot;msg&amp;quot; is uniform, it allows a limited form of forwards compatability as well.&lt;br /&gt;
&lt;br /&gt;
== Interfaces ==&lt;br /&gt;
&lt;br /&gt;
Interfaces that are intended to be shared amongst plugins are defined specially in Wasabi. An interface is derived from Dispatchable and defines a set of dispatch messages which make up the particular interface.  Depending on its use, an interface's classname will be given one of the following prefixes&lt;br /&gt;
&lt;br /&gt;
* api - For singleton APIs.  Examples of APIs are the Service Manager and the System Callbacks API.&lt;br /&gt;
* ifc - For interfaces.  These are given to Dispatchable classes which are not involved with the service manager.  These are typically used for passing objects to other objects or for accepting objects as return values.&lt;br /&gt;
* svc - For collective services.  These are services which are one of many classes which implement an interface.  Examples include image loading services and playlist loading services.&lt;br /&gt;
* obj - For objects.  These are classes which are created by the service factory on getInterface() and destroyed on releaseInterface().  Examples of objects are instances of the XML Parser and the JNetLib http retriever.&lt;br /&gt;
&lt;br /&gt;
=== Example === &lt;br /&gt;
The interface for a &amp;quot;Region&amp;quot; (a shape that defines a portion of a window, usually used for painting)&lt;br /&gt;
&lt;br /&gt;
 class ifc_region : public Dispatchable&lt;br /&gt;
 {&lt;br /&gt;
 public:&lt;br /&gt;
  int _dispatch(int msg, void *retval, void **params=NULL, int nparam=0);&lt;br /&gt;
 &lt;br /&gt;
  enum&lt;br /&gt;
  {&lt;br /&gt;
  REGION_GETOSHANDLE =50,&lt;br /&gt;
  REGION_CLONE =100,&lt;br /&gt;
  REGION_DISPOSECLONE =110,&lt;br /&gt;
  REGION_PTINREGION =120,&lt;br /&gt;
  REGION_OFFSET =130,&lt;br /&gt;
  REGION_GETBOX =140,&lt;br /&gt;
  REGION_SUBTRACTRGN =150,&lt;br /&gt;
  REGION_SUBTRACTRECT =160,&lt;br /&gt;
  REGION_ADDRECT =170,&lt;br /&gt;
  REGION_ADD =180,&lt;br /&gt;
  REGION_AND =190,&lt;br /&gt;
  REGION_SETRECT =200,&lt;br /&gt;
  REGION_EMPTY =210,&lt;br /&gt;
  REGION_ISEMPTY =220,&lt;br /&gt;
  REGION_EQUALS =230,&lt;br /&gt;
  REGION_ENCLOSED =240,&lt;br /&gt;
  REGION_INTERSECTRGN =250,&lt;br /&gt;
  REGION_DOESINTERSECTRGN =251,&lt;br /&gt;
  REGION_INTERSECTRECT =260,&lt;br /&gt;
  REGION_ISRECT =270,&lt;br /&gt;
  REGION_SCALE =280,&lt;br /&gt;
  REGION_DEBUG =290,&lt;br /&gt;
  REGION_MAKEWNDREGION =300,&lt;br /&gt;
  REGION_GETNUMRECTS =310,&lt;br /&gt;
  REGION_ENUMRECT =320,&lt;br /&gt;
  };&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
Typically, the Dispatchable classes define non-virtual methods corresponding to each dispatch message. The implementation of these methods are to simply pack the parameters into an array and call _dispatch.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 inline void Region::offset(int x,int y)&lt;br /&gt;
 {&lt;br /&gt;
  void *params[2] = {&amp;amp;x, &amp;amp;y};&lt;br /&gt;
  _dispatch(REGION_OFFSET, NULL, params,2);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The purpose of these methods are to allow the interface to be used without having to think about the Dispatchable interface. Once the interface is defined and the helper methods are written you can totally forget about Dispatchable.&lt;br /&gt;
&lt;br /&gt;
Interfaces allow for an object to be shared amongst Winamp and plugins. For example, since api_region is defined, you may call the function api_region *GetUpdateRegion(); and use the returned object safely.&lt;br /&gt;
Services&lt;br /&gt;
&lt;br /&gt;
== Services ==&lt;br /&gt;
&lt;br /&gt;
In Wasabi, a service is an object that implements functionality that Winamp or other plugins may require. For example, the image loader service loaded decompresses an image. The memory manager service acts as a common malloc/free, so that memory allocated in one plugin can be freed safely in another.&lt;br /&gt;
&lt;br /&gt;
Services use Interfaces. The GetUpdateRegion example in the Interfaces section described using interfaces to define an object returned from a function. But how does a plugin call a function in Winamp in the first place? That's where services come in.&lt;br /&gt;
&lt;br /&gt;
Services are retrieved through api_service, an interface which is passed to each plugin as it is loaded. api_service acts as a &amp;quot;global store&amp;quot; of services. Plugins can retrieve other services and register their own services.&lt;br /&gt;
&lt;br /&gt;
There are two basic kinds of services, '''''unique''''' services and '''''collective''''' services.&lt;br /&gt;
&lt;br /&gt;
A collective service is an interface which implements a particular service type. Typically, this is a service that has to be implemented differently depending on use. For example, a PNG loading service would be part of the WaSvc::IMAGELOADER service type, and would be a different object from other WaSvc::IMAGELOADER services (such as a JPG loader). File readers are another example: direct file access could be implemented separately from HTTP access, ZIP file access, etc. Clients (Winamp or plugins) can enumerate through all the services of a particular type, to find one that fits its needs.&lt;br /&gt;
&lt;br /&gt;
Unique services are one-off interfaces. They have a service type of WaSvc::UNIQUE. Rather than checking for a particular service type, a client asks for a particular service by GUID. A memory manager service would be a unique service. Typically, unique services are used to provide some sort of system access, or to perform some sort of very specific task.&lt;br /&gt;
&lt;br /&gt;
== Service Factories ==&lt;br /&gt;
&lt;br /&gt;
Services are retrieved via Service Factories. api_service operates with service factories, and plugins must provide service factories for the services they implement. Service Factories create objects of your service whenever requested by a client.&lt;br /&gt;
&lt;br /&gt;
Although the factory is annoying to deal with (just another layer to get to what you want), it allows for the developer to control object creation. Most unique services (and some collective services) are singletons. That is, there only needs to be one of them in existance at any point in time. The same object pointer may be returned every time from the factory.&lt;br /&gt;
&lt;br /&gt;
Other services might be need to be uniquely created for each client. Each file reader, for example, will need a separate object, since state is stored in the file reader object.&lt;br /&gt;
&lt;br /&gt;
Services are released through the factory that created them, allowing the factory to control destruction as well as construction.&lt;br /&gt;
&lt;br /&gt;
== System Callbacks ==&lt;br /&gt;
Not technically part of the the api/interface/services infrastructure within Wasabi. System Callbacks (api_syscb), is a service which broadcasts messages to any callback receiver (a class dervied from SysCallback) that has registered itself with the System Callbacks service.&lt;br /&gt;
&lt;br /&gt;
Service registration and deregistration messages are broadcasted by api_service, so api_syscb is guaranteed to be an available service (because it must be created for api_service to operate).&lt;/div&gt;</summary>
		<author><name>Ashokbania</name></author>	</entry>

	<entry>
		<id>http://wiki.shoutcast.com/wiki/Visual_Developer</id>
		<title>Visual Developer</title>
		<link rel="alternate" type="text/html" href="http://wiki.shoutcast.com/wiki/Visual_Developer"/>
				<updated>2008-09-05T09:59:18Z</updated>
		
		<summary type="html">&lt;p&gt;Ashokbania: /* Advanced Tactics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Breadcrumb''' -- [[Main_Page|Wiki Main]] : [[Skin Developer]] : [[Visual Developer]] : [[Plug-in Developer]] : [[Articles|Articles Page]] : [[Developers FAQ|FAQ]] : [[Main_Page#Glossary_of_Terms|Glossary]]&lt;br /&gt;
&lt;br /&gt;
==What is a Visualization?==&lt;br /&gt;
Visualizers or Visualization Plugins are dynamic add-ons that produce images, colors, and textures that change based elements of the music being played. Winamp offers two primary visualization plugins ([[Visual_Developer#AVS_Unleashed | AVS]] &amp;amp; [[Visual_Developer#Milk_Drop_Unleashed | MilkDrop]]) allowing you to create different presets. If you’re feeling invincible, you can even attempt to create your own visualization plugin or you can say platform. There are many [http://www.winamp.com/plugins/browse/1 visualization plugins] available which users have generated.&lt;br /&gt;
&lt;br /&gt;
==What is a Preset?==&lt;br /&gt;
Presets are outputs of a visualization platform. You can customize the visualizers and get any effect you want. Many users have uploaded such presets in our [http://www.winamp.com/plugins/browse/11 website]&lt;br /&gt;
&lt;br /&gt;
==AVS Unleashed==&lt;br /&gt;
AVS is the mother of all Winamp visualization plug-ins. It lets the user build a countless number of custom visualizations from an ever-expanding library of effects. AVS supports windowed/fullscreen rendering, preset customization, module stacking, skinnable windows, support for Sonique visual plug-ins, and a ton of other features. AVS is now bundled with all versions of Winamp after v2.6, so everyone can get a taste of its visual sonic goodness.&lt;br /&gt;
 &lt;br /&gt;
===Module References===&lt;br /&gt;
Below is some information on AVS modules. WVS is our codename for our global mind control device. With it we shall overtake the world. And have another excuse to take mind-altering substances.&lt;br /&gt;
&lt;br /&gt;
Currently information about the superscope module is here. It uses all kinds of math stuff. Justin is so smart. You can look here for more general information about making presets.&lt;br /&gt;
&lt;br /&gt;
====Superscope Reference====&lt;br /&gt;
&lt;br /&gt;
The superscope allows you to create your create your own designs.&lt;br /&gt;
&lt;br /&gt;
To have multiple statements on one line, use a semicolon (;) to delimit the statement. Use parenthesis '( and )' if you are unsure about precedence.&lt;br /&gt;
&lt;br /&gt;
'''Fields:'''&lt;br /&gt;
&lt;br /&gt;
{| Border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Field !! Description&lt;br /&gt;
|-&lt;br /&gt;
|init || set initial variable values here&lt;br /&gt;
|-&lt;br /&gt;
|point || This is where the shape of the superscope is defined&lt;br /&gt;
|-&lt;br /&gt;
|frame || Used to define movement and transformations&lt;br /&gt;
|-&lt;br /&gt;
|beat || Expression that gets evaluated on the beat&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Operators:'''&lt;br /&gt;
&lt;br /&gt;
{| Border = &amp;quot;1&amp;quot;&lt;br /&gt;
!Operator !! Description&lt;br /&gt;
|-&lt;br /&gt;
|= || assign&lt;br /&gt;
|-&lt;br /&gt;
|'+,-,/,*' || 'plus, minus, divide, multiply'&lt;br /&gt;
|-&lt;br /&gt;
|| ||	convert to integer, and do bitwise or&lt;br /&gt;
|-&lt;br /&gt;
|&amp;amp; ||	convert to integer, and do bitwise and&lt;br /&gt;
|-&lt;br /&gt;
|% ||	convert to integer, and get remainder&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Variables:'''&lt;br /&gt;
&lt;br /&gt;
{| Border = &amp;quot;1&amp;quot;&lt;br /&gt;
!Variables !! Description&lt;br /&gt;
|-&lt;br /&gt;
|n || 	number of points to render (set in Init, Beat or Frame)&lt;br /&gt;
|-&lt;br /&gt;
|x ||	x coordinate, between -1 and 1&lt;br /&gt;
|-&lt;br /&gt;
|y ||	y coordinate, between -1 and 1&lt;br /&gt;
|-&lt;br /&gt;
|i ||	position of the scope (0..1). The point position.&lt;br /&gt;
|-&lt;br /&gt;
|v ||	value at point i (-1..1)&lt;br /&gt;
|-&lt;br /&gt;
|b ||	1 if beat. 0 for no beat. Used for beat changes&lt;br /&gt;
|-&lt;br /&gt;
|w ||	width of screen&lt;br /&gt;
|-&lt;br /&gt;
|h ||	height of screen&lt;br /&gt;
|-&lt;br /&gt;
|red ||	red value. (0..1). Set this variable to set red value.&lt;br /&gt;
|-&lt;br /&gt;
|green || 	green value. (0..1) Set this variable to set green value.&lt;br /&gt;
|-&lt;br /&gt;
|blue || 	blue value. (0..1) Set this variable to set blue value.&lt;br /&gt;
|-&lt;br /&gt;
|t, d ||	variables commonly used for movement&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Functions:'''&lt;br /&gt;
{| Border = &amp;quot;1&amp;quot;&lt;br /&gt;
!Variables !! Description&lt;br /&gt;
|-&lt;br /&gt;
|abs(var)|| 	returns the absolute value of 'var'&lt;br /&gt;
|-&lt;br /&gt;
|sin(var) ||	returns the sine of the angle var (expressed in radians)&lt;br /&gt;
|-&lt;br /&gt;
|cos(var) ||	returns the cosine of the angle var&lt;br /&gt;
|-&lt;br /&gt;
|tan(var) ||	returns the tangent of the angle var&lt;br /&gt;
|-&lt;br /&gt;
|asin(var) ||	returns the arcsine of var&lt;br /&gt;
|-&lt;br /&gt;
|acos(var) ||	returns the arccosine of var&lt;br /&gt;
|-&lt;br /&gt;
|atan(var) ||	returns the arctangent of var&lt;br /&gt;
|-&lt;br /&gt;
|sqr(var) ||	returns the square of var&lt;br /&gt;
|-&lt;br /&gt;
|sqrt(var) ||	returns the square root of var&lt;br /&gt;
|-&lt;br /&gt;
|pow(var, var2)|| 	returns var to the power of var2&lt;br /&gt;
|-&lt;br /&gt;
|log(var) ||	returns the log base of var&lt;br /&gt;
|-&lt;br /&gt;
|log10(var) ||	returns the log base 10 of var&lt;br /&gt;
|-&lt;br /&gt;
|sign(var) ||	returns the sign of var or 0&lt;br /&gt;
|-&lt;br /&gt;
|min(var, var2)|| 	returns the smallest value&lt;br /&gt;
|-&lt;br /&gt;
|max(var, var2) ||	returns the greatest value&lt;br /&gt;
|-&lt;br /&gt;
|sigmoid(var, var2)|| 	returns sigmoid function value of x=var (var2=constraint)&lt;br /&gt;
|-&lt;br /&gt;
|rand(var) ||	returns a random value between 0 and var&lt;br /&gt;
|-&lt;br /&gt;
|band(var, var2)|| 	boolean and, returns 1 if var and var2 are != 0&lt;br /&gt;
|-&lt;br /&gt;
|bor(var, var2) ||	boolean or, returns 1 if var or var2 is != 0&lt;br /&gt;
|-&lt;br /&gt;
|bnot(var) ||	boolean not, returns 1 if var == 0 or 0 if var ! = 0&lt;br /&gt;
|-&lt;br /&gt;
|if(cond, vartrue, varfalse) || 	if condition is nonzero, returns valtrue, otherwise returns valfalse&lt;br /&gt;
|-&lt;br /&gt;
|equal(var, var2) ||	returns 1 if var=var2, else 0&lt;br /&gt;
|-&lt;br /&gt;
|above(var, var2) ||	returns 1 if var &amp;gt; var2, else 0&lt;br /&gt;
|-&lt;br /&gt;
|below(var, var2)||	returns 1 if var&amp;lt;var2, else 0&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Making Presets===&lt;br /&gt;
We are going to attempt to reproduce a simple version of one of my favorite presets: Lone's &amp;quot;No way to go&amp;quot;. Successful presets usually start off with one or more Render Modules, and then have a number of Trans Modules added to subtly manipulate the effect. Lone's preset is no exception. Again, before we start, make sure that you have both Winamp and AVS installed:&lt;br /&gt;
# Start Winamp and AVS&lt;br /&gt;
# Right-click in the AVS window, and select AVS Editor&lt;br /&gt;
# In the Editor window, click on Preset. A drop-down menu appears&lt;br /&gt;
# Click on New. This creates a new blank preset&lt;br /&gt;
# Click on Main. The option to Clear every frame should appear in the right window. If enabled, this will paint the screen black at the beginning of each frame, erasing the previous one. For this preset, leave this option unchecked&lt;br /&gt;
# We will now add Effect Modules to this presets. Click on +, then click on Render, then click on Moving Particle. New options should appear in the right half of the window&lt;br /&gt;
# Click on the white box labeled &amp;quot;color&amp;quot;. A whole new color window should pop up&lt;br /&gt;
# Click on a basic color (it helps the effect if it isn't a &amp;quot;pure&amp;quot; color, like orange or purple). Now click OK. The color box should now be the same color that you chose&lt;br /&gt;
# Make sure the Onbeat Sizechange option is enabled&lt;br /&gt;
# A moving blob of color is a bit interesting, but it could be better. We will now alter how that Moving Particle is displayed by adding some Trans Modules&lt;br /&gt;
# Click +, then click Trans, then click Water&lt;br /&gt;
# Click +, then click Trans, then click Blur&lt;br /&gt;
# Click +, then click Trans, then click Movement. A new list of effects should appear in the right half of the window. Click on sunburster&lt;br /&gt;
&lt;br /&gt;
Congratulations, we have replicated Lone's Preset! You can also drag an included Effect Module up or down the list to play with sequencing. I hope that you have realized by now that ANY permutation of the existing Modules or setting modification will result in a new effect! Keep experimenting!&lt;br /&gt;
&lt;br /&gt;
====Advanced Tactics====&lt;br /&gt;
&lt;br /&gt;
After creating a few original presets, it is natural to want even more options and control. AVS now has a very powerful tool: Effect Lists. To use an Effect List simply as an organizational tool is to squander its potential. The idea is that everything in an effect list gets rendered into a separate buffer before being added to its parent buffer. You now have the power to create completely separate effects off screen, manipulate them freely, possibly blending them together, all before finally displaying the final effect in one shot.&lt;br /&gt;
#Open AVS Editor#Create a new preset&lt;br /&gt;
#Click on Main, then disable the Clear every frame option&lt;br /&gt;
#Click on +, then on Effect List to add an Effect List&lt;br /&gt;
#In the Effect List options, make sure the Enabled and Clear every frame check boxes are checked. For the Input blend mode, select Ignore. For the Output blend mode, select Subtractive Blend 1&lt;br /&gt;
#Click on +, then on Trans, then on Mosaic&lt;br /&gt;
#Click on +, then on Render, then on Simple&lt;br /&gt;
#Click on Main, to stop adding to the Effect list&lt;br /&gt;
#Click on +, then on Trans, then Fadeout&lt;br /&gt;
#In the Fadeout options, Click on the Fade to Color Box, and select a nice red color#Click on +, then on Render, then on Bass Spin&lt;br /&gt;
&lt;br /&gt;
If you have followed the instructions faithfully, you should get an effect tree that looks like this:&lt;br /&gt;
&lt;br /&gt;
'''Main'''&lt;br /&gt;
* Render / Bass Spin&lt;br /&gt;
* Trans / Fadeout&lt;br /&gt;
'''Effects List'''&lt;br /&gt;
* Render / Simple&lt;br /&gt;
* Trans / Mosaic&lt;br /&gt;
&lt;br /&gt;
That having been done, let's examine this preset:&lt;br /&gt;
A Bass Spin is placed into the main parent buffer.&lt;br /&gt;
&lt;br /&gt;
Then, the Effect List creates a separate, secondary buffer.&lt;br /&gt;
&lt;br /&gt;
This buffer starts out black (cleared every frame), ignores what is in its parent buffer and a Simple waveform is drawn into it. Notice that the Mosaic modifier ONLY affects the Simple effect as it is totally segregated from the parent buffer.&lt;br /&gt;
&lt;br /&gt;
Now that all effects in the Effect List have been processed, the secondary buffer is blended back into the parent buffer using the blend mode specified in the Effects List options; in this case, Subtractive Blend 1.&lt;br /&gt;
&lt;br /&gt;
This results in a dark colored Simple effect overlaid over the white Bass Spins.&lt;br /&gt;
&lt;br /&gt;
What this means is that you can prevent Trans modifiers from affecting whole groups of modules, which in turn gives you much finer control over the visual effects. I hope this simple tutorial has shed some light on to the mystery of Effect Lists. It took me a bit of head scratching to wrap my mind around the usefulness of parent and child buffers, but now all my old presets seem so primitive. Keep playing with AVS and you will impress yourself! I guarantee it!&lt;br /&gt;
&lt;br /&gt;
===Writing APEs===&lt;br /&gt;
BOX is a quick and dirty demonstration of basic APE structure and the utilization of AVS features. It takes advantage of AVS's built-in beat detection and easy access to the frame buffer to flash a rectangle onscreen on every beat. We also learn how to set up a configuration screen template, load and save configuration settings, and use the default color selector. There is very little fat, so you can use this as a template for future APEs. You can view the main file below.&lt;br /&gt;
&lt;br /&gt;
====Box Source code====&lt;br /&gt;
&lt;br /&gt;
You can check a sample [[box source code here]]&lt;br /&gt;
&lt;br /&gt;
==Milk Drop Unleashed==&lt;br /&gt;
'''MilkDrop''' is a music visualizer - a &amp;quot;plug-in&amp;quot; to the Winamp music player. As you listen your music in Winamp, MilkDrop takes you flying through the actual soundwaves you're hearing, and uses beat detection to trigger myriad psychedelic effects, creating a rich visual journey through sound. MilkDrop can also be driven by a live audio feed (microphone or line-in)&lt;br /&gt;
&lt;br /&gt;
'''MilkDrop 2''' is a major upgrade to the original MilkDrop visualizer, opening up &lt;br /&gt;
the power of modern graphics chips and programmable pixel shaders to the realm &lt;br /&gt;
of music visualization.  Pixel shaders allow dozens, even hundreds of complex &lt;br /&gt;
instructions to be executed for every pixel on the screen, every frame.  &lt;br /&gt;
Other new features include jpg textures, gaussian blurring, a preset &amp;quot;mash-up&amp;quot; &lt;br /&gt;
feature, and a prest &amp;quot;back&amp;quot; button.  MilkDrop 2 is backwards-compatible with &lt;br /&gt;
presets from MilkDrop 1.&lt;br /&gt;
&lt;br /&gt;
For a comprehensive understanding, please go through the [[MilkDrop Unleashed Guide]]&lt;br /&gt;
&lt;br /&gt;
To create your own presets, check out the [[MilkDrop_Preset_Authoring]] Guide&lt;br /&gt;
&lt;br /&gt;
For on-going discussions on Milk Drop, drop in the [http://forums.winamp.com/forumdisplay.php?forumid=81 Milk Drop Forums]&lt;br /&gt;
&lt;br /&gt;
==Other Visualizations==&lt;br /&gt;
''(Editable by users)''&lt;br /&gt;
&lt;br /&gt;
==How to Publish==&lt;br /&gt;
Aenean facilisis imperdiet nunc. Sed scelerisque. Curabitur malesuada velit vitae mauris. Suspendisse pharetra, mauris et ornare bibendum, nunc sem volutpat magna, vitae pharetra lectus turpis eget erat. Curabitur tristique pede vel est. Praesent porta lacus non massa.&lt;br /&gt;
&lt;br /&gt;
==Developer Resources==&lt;br /&gt;
* [[Articles#Visualization_Articles|Visual Developer Articles]]&lt;br /&gt;
* [[Developers_FAQ#Visual_Developer_FAQ|Visual Developer FAQ]]&lt;br /&gt;
* Rovastar's [http://www.milkdrop.co.uk/ MilkDrop Resource Website]&lt;br /&gt;
* Download MilkDrop [http://www.nullsoft.com/free/milkdrop/Milkdrop_1.04_Source.zip  Source Code]&lt;br /&gt;
* [http://forums.winamp.com/forumdisplay.php?forumid=81 Milk Drop Forums]&lt;/div&gt;</summary>
		<author><name>Ashokbania</name></author>	</entry>

	<entry>
		<id>http://wiki.shoutcast.com/wiki/MilkDrop_Unleashed_Guide</id>
		<title>MilkDrop Unleashed Guide</title>
		<link rel="alternate" type="text/html" href="http://wiki.shoutcast.com/wiki/MilkDrop_Unleashed_Guide"/>
				<updated>2008-09-02T08:57:00Z</updated>
		
		<summary type="html">&lt;p&gt;Ashokbania: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Breadcrumb''' -- [[Main_Page|Wiki Main]] : [[Skin Developer]] : [[Visual Developer]] : [[Plug-in Developer]] : [[Articles|Articles Page]] : [[Developers FAQ|FAQ]] : [[Main_Page#Glossary_of_Terms|Glossary]]&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
MilkDrop 2 comes with Winamp.  To install it, just download and install the latest version of Winamp.  During the installation, make sure the &amp;quot;MilkDrop&amp;quot; visualizer option is checked, so that it gets installed, too.  &lt;br /&gt;
&lt;br /&gt;
Once Winamp is installed, launch it.  Load some music files into your playlist and start playing some music.  (Be sure to play some music before trying to launch the visualizer - otherwise you'll just see a black screen.)&lt;br /&gt;
&lt;br /&gt;
Once music is playing, hit CTRL+K and a list of visualization plug-ins will appear.  Select &amp;quot;MilkDrop 2&amp;quot; from the list.  Then click the &amp;quot;Start&amp;quot; button, and it will launch the visualizer.  &lt;br /&gt;
&lt;br /&gt;
    Quick Tips:    &lt;br /&gt;
      * If you want to go full-screen, double-click on the visualizer itself.&lt;br /&gt;
      * CTRL+SHIFT+K starts or stops the visualizer.&lt;br /&gt;
      * To configure MilkDrop's options, exit the visualizer and hit ALT+K.&lt;br /&gt;
    &lt;br /&gt;
    If you have trouble getting MilkDrop to run properly after installation, &lt;br /&gt;
    try installing various recent WHQL drivers for your video card, or installing &lt;br /&gt;
    DirectX; doing these two things (especially the first) will fix 99% of&lt;br /&gt;
    problems. See the Troubleshooting section of the documentation for more&lt;br /&gt;
    information.&lt;br /&gt;
&lt;br /&gt;
===Tweaking to achieve best image quality===&lt;br /&gt;
&lt;br /&gt;
a) Fullscreen Display Mode   [first tab of config screen]&lt;br /&gt;
&lt;br /&gt;
When you run MilkDrop fullscreen, it changes the display mode to whatever you select here.  Generally speaking, the speed (framerate) and smoothness of MilkDrop will drop as the resolution (number of pixels on the screen)increases.  So, if it's running to slow in fullscreen mode, try selecting a smaller fullscreen display mode. &lt;br /&gt;
        &lt;br /&gt;
b) Canvas Stretch  [second tab]&lt;br /&gt;
&lt;br /&gt;
This option lets you trade resolution [crispness] for speed.  If MilkDrop runs too slow, in any mode (windowed/fullscreen/desktop), try cranking up the canvas stretch to, say, 1.5X or 2X.  The image will not look as crisp, but MilkDrop will probably run much faster.  (Assuming that your graphics chip was the bottleneck.)&lt;br /&gt;
&lt;br /&gt;
c) Mesh Size  [second tab]&lt;br /&gt;
&lt;br /&gt;
This is the main option that affects how much processor (CPU) MilkDrop uses.  If you crank it up far beyond the default, expect to be CPU-bound (where your framerate drops because the CPU is the bottleneck).  To get MilkDrop to speed up, drop the Mesh Size back down.  The Mesh Size decides how many points on the screen the per-vertex equations will be executed for; the higher the mesh size, the more fidelity you will see in the motion.  &lt;br /&gt;
        &lt;br /&gt;
d) Tips for LCD and laptop users&lt;br /&gt;
&lt;br /&gt;
LCD screens: Note that most LCD screens (flatpanels) usually run at a fixed frequency only - usually 60 Hz - meaning that they update the screen 60 times per second.  However, sometimes the video driver reports that it supports other refresh rates, such as 72, 75, 85, etc. It is strongly recommended that [for fullscreen mode, and for Windows in general] you choose a display mode with a 60 Hz refresh rate, for the smoothest possible animation.  For this plugin, you will also want to choose Maximum Framerates that divide evenly into 60 - such as 60, 30, 20, 15, 12, 10, 6, 5, and so on - so that the # of times the LCD shows each frame of animation remains constant, resulting in the smoothest possible animation.&lt;br /&gt;
&lt;br /&gt;
e) color (bit) depth: 16 or 32?&lt;br /&gt;
&lt;br /&gt;
The answer, nowadays, is a resounding &amp;quot;32&amp;quot;.  Video memory is plentiful these days; use 32 bit color, for both your windows desktop (...so that MilkDrop's windowed mode can run at 32 bits) and for MilkDrop's Fullscreen Display Mode setting (where &amp;quot;8888&amp;quot; denotes 32 bits). Some ancient video cards don't have enough memory to run MilkDrop properly (or smoothly) in 32 bits, though; you might want to try 16-bit color if your card has less than 32 MB of video memory, if you are using a laptop, or if your video card is significantly old.  In the MilkDrop config panel, 16-bit modes show up as &amp;quot;555&amp;quot; or &amp;quot;565&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you find that your card runs best in 32-bit color, you should have no problems with brightness levels while running MilkDrop. However, if your card runs best in 16-bit color, you should then adjust the Brightness slider on the second tab of the config panel (which only affects 16-bit color video modes!).  The goal is to make the image as bright as possible, without oversaturating it (washing it out, often to bright pink or white).  This setting also varies for different cards, depending on how the card rounds color values, so we recommend seeing how bright you can set the slider closer to '0') without oversaturating the image.  Usually,a setting of '0' or '2' works the best.&lt;br /&gt;
&lt;br /&gt;
===Usage===&lt;br /&gt;
&lt;br /&gt;
'''4.a. Keyboard Commands'''&lt;br /&gt;
    &lt;br /&gt;
The following keys can be used to control MilkDrop while it is running.&lt;br /&gt;
(Note: pressing F1 while MilkDrop is running will show you this list)&lt;br /&gt;
          &lt;br /&gt;
GENERAL&lt;br /&gt;
escape: exit to winamp&lt;br /&gt;
PRESET LOADING&lt;br /&gt;
BACKSPACE: return to previous preset&lt;br /&gt;
SPACE: transition to next preset&lt;br /&gt;
H: instant Hard cut (to next preset)&lt;br /&gt;
R: toggle random (vs. sequential) preset traversal&lt;br /&gt;
L: load a specific preset (invokes the 'Load' menu)&lt;br /&gt;
+/-: rate current preset (better/worse)&lt;br /&gt;
scroll lock: lock/unlock current preset &lt;br /&gt;
(keyboard light on means preset is locked)&lt;br /&gt;
(prevents random switch to new preset)&lt;br /&gt;
A: aggregate preset - loads a random preset,&lt;br /&gt;
steals the warp shader from a different random preset,&lt;br /&gt;
and steals the composite shader from a third random preset.&lt;br /&gt;
D: cycle between various lock-states for the warp and&lt;br /&gt;
composite shaders.  When one of these shaders is locked,&lt;br /&gt;
loading a new preset will load everything *except* the&lt;br /&gt;
locked shaders, creating a mix between the two presets.&lt;br /&gt;
&lt;br /&gt;
PRESET EDITING AND SAVING&lt;br /&gt;
M: show/hide the preset-editing menu&lt;br /&gt;
S: save new preset (asks you for the new filename)&lt;br /&gt;
N: show per-frame variable moNitor&lt;br /&gt;
(see [[MilkDrop Preset Authoring]])&lt;br /&gt;
&lt;br /&gt;
MUSIC PLAYBACK&lt;br /&gt;
z/x/c/v/b: navigate playlist (prev/play/pause/stop/next)&lt;br /&gt;
U: toggle shuffle&lt;br /&gt;
P: show playlist&lt;br /&gt;
up/down arrows: volume up/down&lt;br /&gt;
left/right arrows: rewind/ffwd 5 seconds&lt;br /&gt;
SHIFT + left/right arrows: rewind/ffwd 30 seconds&lt;br /&gt;
&lt;br /&gt;
FUNCTION KEYS                                &lt;br /&gt;
F1: show help screen&lt;br /&gt;
F2: show song title&lt;br /&gt;
F3: show song length&lt;br /&gt;
F4: show preset name&lt;br /&gt;
F5: show fps (frames per second)&lt;br /&gt;
F6: show rating of current preset&lt;br /&gt;
F7: re-read custom message file (milk_msg.ini) from disk&lt;br /&gt;
F8: jump to new directory (for presets)&lt;br /&gt;
F9: toggle stereo 3D on/off&lt;br /&gt;
&lt;br /&gt;
SPRITES AND CUSTOM MESSAGES (FOR VJ's)&lt;br /&gt;
T: launch song title animation&lt;br /&gt;
 Y: enter custom message mode&lt;br /&gt;
 ##: load message ## (where ## is a 2-digit numeric code (00-99) &lt;br /&gt;
 of a message defined in milk_msg.ini)&lt;br /&gt;
 *: clear any digits entered.&lt;br /&gt;
DELETE: clear message (if visible)&lt;br /&gt;
F7: re-read milk_msg.ini from disk&lt;br /&gt;
 K: enter sprite mode&lt;br /&gt;
 ##: load sprite ## (where ## is a 2-digit numeric code (00-99) &lt;br /&gt;
 of a sprite defined in milk_img.ini)&lt;br /&gt;
 *: clear any digits entered.&lt;br /&gt;
DELETE: clear newest sprite &lt;br /&gt;
SHIFT + DELETE: clear oldest sprite&lt;br /&gt;
CTRL+SHIFT+DELETE: clear all sprites&lt;br /&gt;
F7: no effect (milk_img.ini is never cached)&lt;br /&gt;
 SHIFT + K: enter sprite kill mode&lt;br /&gt;
 ##: clear all sprites with code ##&lt;br /&gt;
 *: clear any digits entered.&lt;br /&gt;
CTRL + T/Y: kill song title and/or any custom messages&lt;br /&gt;
CTRL + K: kill all sprites&lt;br /&gt;
            &lt;br /&gt;
Note that there are more keys available, but because many&lt;br /&gt;
are only relevant to people designing their own presets, &lt;br /&gt;
they are listed in the preset authoring guide instead.&lt;br /&gt;
    &lt;br /&gt;
'''4.b. config panel'''&lt;br /&gt;
 &lt;br /&gt;
The configuration panel lets you customize the way MilkDrop runs.&lt;br /&gt;
To learn how to get to the configuration panel, see the &amp;quot;Installation&amp;quot;&lt;br /&gt;
section above.&lt;br /&gt;
        &lt;br /&gt;
Once you're in the config panel, you'll see a number of tabs&lt;br /&gt;
at the top, some dropdown boxes, and some checkboxes.  Each&lt;br /&gt;
of the tabs at the top brings you to a different page of &lt;br /&gt;
configuration options.  To get help on a setting, simply click&lt;br /&gt;
on the '?' in the upper-right corner of the config panel, &lt;br /&gt;
and then click on the setting you want help with.&lt;br /&gt;
&lt;br /&gt;
'''4.c. preset authoring'''&lt;br /&gt;
    &lt;br /&gt;
Please check the [[MilkDrop Preset Authoring]] guide for instructions on how to create and save your own presets.&lt;br /&gt;
&lt;br /&gt;
'''4.d. rating system'''&lt;br /&gt;
&lt;br /&gt;
The built-in rating system allows you to rate each preset on a scale &lt;br /&gt;
from 0 to 5.  A rating of 5 is very good, while a rating of 0 is&lt;br /&gt;
the worst.  The ratings decide how often the presets will be randomly&lt;br /&gt;
loaded.  If a preset has a rating of 0, it will never be randomly&lt;br /&gt;
loaded (unless they're all zero; then they all have an equal chance).&lt;br /&gt;
        &lt;br /&gt;
To show the rating for a preset, press F6.  You can adjust the &lt;br /&gt;
rating for a preset with the +/- keys.  When you make adjustments,&lt;br /&gt;
they save automatically; there's no need to save the preset to make&lt;br /&gt;
the rating change permanent.&lt;br /&gt;
        &lt;br /&gt;
Here's a recommended interpretation of the numeric values:&lt;br /&gt;
            0 = I never want to see this preset again&lt;br /&gt;
            1 = very ugly&lt;br /&gt;
            2 = mediocre&lt;br /&gt;
            3 = fair&lt;br /&gt;
            4 = good&lt;br /&gt;
            5 = downright stimulating&lt;br /&gt;
            &lt;br /&gt;
If a preset seems &amp;quot;lost&amp;quot; because you set its rating to 0 and it&lt;br /&gt;
won't ever come back, you can always load it up by hitting 'L'&lt;br /&gt;
to conjure the 'Load Preset' menu, finding the preset you want,&lt;br /&gt;
loading it, then hitting +.&lt;br /&gt;
&lt;br /&gt;
'''4.e. custom messages'''&lt;br /&gt;
&lt;br /&gt;
ABOUT CUSTOM MESSAGES:&lt;br /&gt;
The &amp;quot;Custom Message&amp;quot; feature of MilkDrop allows you to display&lt;br /&gt;
short text messages on the screen while MilkDrop is running.&lt;br /&gt;
They are highly configurable; you can set all of the following&lt;br /&gt;
parameters: the font, the size, the positioning, color, bold &lt;br /&gt;
state, italic state, and so on; and you can even have it &lt;br /&gt;
randomize some of these properties.&lt;br /&gt;
&lt;br /&gt;
CREATING THE MESSAGES:&lt;br /&gt;
You can save up to 100 messages in the file MILK_MSG.INI in&lt;br /&gt;
your Winamp\Plugins\ folder.  To open this file, go to the &lt;br /&gt;
MilkDrop configuration screen (ALT+K from Winamp) and click the&lt;br /&gt;
&amp;quot;Edit Custom Messages&amp;quot; button.  Or, you can just edit it &lt;br /&gt;
manually if you know how; it's plain-text.&lt;br /&gt;
            &lt;br /&gt;
The first thing you see when you open the file is a bunch of&lt;br /&gt;
lines that start with two forward slashes (//).  These are&lt;br /&gt;
comment lines, and they explain the syntax for adding a font&lt;br /&gt;
or a message to the file.  This is your main reference for&lt;br /&gt;
finding out what all the parameters do for the fonts &amp;amp; messages;&lt;br /&gt;
it is recommended that you leave this information in the file,&lt;br /&gt;
although it can be removed or (modified) and the messages will&lt;br /&gt;
still work.&lt;br /&gt;
&lt;br /&gt;
After the comments come first the fonts, then the messages.&lt;br /&gt;
The fonts are simply a way to specify a typeface, bold state,&lt;br /&gt;
italics state, and red/green/blue color for the font.  You can &lt;br /&gt;
configure up to 16 fonts like this (numbered 00-15). These fonts&lt;br /&gt;
will serve as template fonts for the custom messages.&lt;br /&gt;
&lt;br /&gt;
The next section is the actual messages.  Each one has a&lt;br /&gt;
text message (the 'text' parameter) that will be shown to the&lt;br /&gt;
user, and each one references one of the 16 fonts that were&lt;br /&gt;
defined in the previous section.  You can also specify the&lt;br /&gt;
size (size), position (x,y), a growth factor (growth) that&lt;br /&gt;
will grow/shrink the message over its lifetime, the number&lt;br /&gt;
of seconds to show the message (time), and the fraction of that&lt;br /&gt;
time that is spent fading in (fade).  &lt;br /&gt;
&lt;br /&gt;
You can also randomize some of these values: 'randx' and 'randy'&lt;br /&gt;
will randomly perturb the (x,y) coordinates every time the message&lt;br /&gt;
is shown to the user, and 'randr'/'randg'/'randb' will randomly&lt;br /&gt;
perturb the (r,g,b) color in the same way.&lt;br /&gt;
&lt;br /&gt;
Finally, you can override any of the default properties for the&lt;br /&gt;
font that this message uses: (face, bold, ital, r, g, b).&lt;br /&gt;
&lt;br /&gt;
INVOCATION AND USAGE:&lt;br /&gt;
There are two ways to invoke custom messages: one automatic,&lt;br /&gt;
the other manual.  &lt;br /&gt;
&lt;br /&gt;
The automatic way is to go to the MilkDrop config panel (ALT+K),&lt;br /&gt;
click the 'More Options' button, and set the value in the&lt;br /&gt;
'Time between RANDOM custom messages' box to something greater&lt;br /&gt;
than zero.  This will cause MilkDrop to randomly display custom &lt;br /&gt;
messages while it is running, and the average time (in seconds) &lt;br /&gt;
between messages will be the value you entered here.  If you &lt;br /&gt;
wish to disable random custom messages, set this value to -1&lt;br /&gt;
(or any negative number).  Note that all messages in the file&lt;br /&gt;
have an equal change of being picked.&lt;br /&gt;
&lt;br /&gt;
The manual way is to type in the two-digit code (00-99) of the &lt;br /&gt;
message while MilkDrop is running.  However, you can't use the &lt;br /&gt;
numeric keypad for this - you have to use the numbers at the &lt;br /&gt;
TOP of your keyboard to do it.  If you mess up while entering&lt;br /&gt;
the first digit, just press the '*' key to start over.&lt;br /&gt;
            &lt;br /&gt;
Note that if you change the MILK_MSG.INI file while MilkDrop&lt;br /&gt;
is running, you will not be able to see the changes until&lt;br /&gt;
you hit F7, which tells MilkDrop to re-read the MILK_MSG.INI &lt;br /&gt;
file from disk.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''4.f. sprites'''&lt;br /&gt;
&lt;br /&gt;
ABOUT SPRITES:&lt;br /&gt;
The &amp;quot;Sprite&amp;quot; feature of MilkDrop allows you to display any image of your choice in the foreground (on top of MilkDrop) while it runs.  The sprites can fade in and out, move around, respond to the music, and so on.  You define them in a file - milk_img.ini in your winamp\plugins directory - much like you define custom messages, each having an identifying code number from 00 through 99 (used to invoke them).  However, the way the individual sprites are defined is different; you write code for them, instead of just setting parameter values.  This is a little bit tougher to do (it's very much like preset authoring), but adds a great deal of flexibility to what you can do with the sprites.&lt;br /&gt;
&lt;br /&gt;
CREATING THE SPRITES:&lt;br /&gt;
            &lt;br /&gt;
You can define up to 100 sprites in the file MILK_IMG.INI in your Winamp\Plugins\ folder.  To open this file, go to the MilkDrop configuration screen (ALT+K from Winamp) and click the &amp;quot;Edit Sprites&amp;quot; button.  Or, you can just edit it manually if you know how; it's plain-text.&lt;br /&gt;
            &lt;br /&gt;
The first thing you see when you open the file is a bunch of lines that start with two forward slashes (//).  These are comment lines, and they explain the syntax for creating a sprite. This is your main reference for finding out what all the parameters do for the fonts &amp;amp; messages; it is recommended that you leave this information in the file, although it can be removed (or modified) and the sprites will still work.&lt;br /&gt;
&lt;br /&gt;
After the comments come the sprite definitions.  Each sprite is made up of one parameter that indicates the image file to use (this is the 'img=...' line), and two types of code: initialization code, and regular code.  &lt;br /&gt;
            &lt;br /&gt;
The first - initialization code - is executed only once, when you launch the sprite.  Use it to do one-time initialization of variables (such as the opacity (a), rotation angle (rot), position (x,y), and so on) or to invent new variables that you will access later. This code is marked by the 'init_1=...', 'init_2=...', etc. lines. The second type of code - marked by 'code_1=...', 'code_2=...', etc. is executed every frame, just prior to plastering the sprite on             the screen.  Use it to animate the sprite, moving it around (changing x,y), scaling it up and down (sx,sy), fading it in and out (a), changing its color, and so on.&lt;br /&gt;
            &lt;br /&gt;
            Please see the comments included in the sample milk_img.ini file&lt;br /&gt;
            for full details and examples on how to author sprites.&lt;br /&gt;
&lt;br /&gt;
INVOCATION AND USAGE:&lt;br /&gt;
There is currently only one way to invoke sprites: manually. To do this, first press 'K' to enter 'sprite mode' (while running MilkDrop).  Now, whenever you type in a two-digit             code (00-99), MilkDrop will try to find &amp;amp; launch the sprite you've requested, from the milk_img.ini file.  If there is an error, it will display an error message in the upper-right corner.  Note that to enter the two-digit code, you can't use the numeric keypad; you have to use the numbers at the TOP of  your keyboard.  &lt;br /&gt;
&lt;br /&gt;
If you make an error entering the first digit of the code, just press '*' to start over.  If you want to clear the most recently-invoked sprite, press DELETE.  If you want to clear the oldest sprite, press SHIFT + DELETE.  If you want to clear all sprites, press SHIFT + CTRL + DELETE.&lt;br /&gt;
&lt;br /&gt;
If you want to clear sprites by their 2-digit code, press SHIFT + K (instead of just 'K') to enter 'sprite kill mode.' Now, when you enter a two-digit code, instead of invoking the sprite, MilkDrop clears all running sprites with that two-digit code.&lt;br /&gt;
&lt;br /&gt;
===Trouble Shooting===&lt;br /&gt;
&lt;br /&gt;
If MilkDrop has a critical problem (e.g. fails to load, freezes, etc.)or if the image is distorted, torn, corrupted, or all one solid color, try the following two suggestions to resolve the problem.  In 90% of these cases it can be fixed.  If you have a different problem, scroll down past this part and try to find the appropriate symptom and its solution.&lt;br /&gt;
&lt;br /&gt;
====1. UPDATE YOUR VIDEO DRIVER, OR TRY OTHER DRIVERS====&lt;br /&gt;
    &lt;br /&gt;
Almost all display problems are caused by buggy video drivers! A &amp;quot;driver&amp;quot; is a piece of software that translates graphics-related commands from programs, like MilkDrop, into the native language of your specific graphics hardware.&lt;br /&gt;
&lt;br /&gt;
For desktop machines, there are typically three sources for video drivers: &lt;br /&gt;
# those from the *chip* manufacturer's website (usually nvidia.com or ati.com) (best source) &lt;br /&gt;
# those from the card manufacturer's website (LeadTEK, PNY, etc.)&lt;br /&gt;
# those that shipped with Windows (yuck)&lt;br /&gt;
        &lt;br /&gt;
For laptops:&lt;br /&gt;
# the driver from the *laptop* manufacturer&lt;br /&gt;
# (maybe) the driver from the graphics chip manufacturer (ATI, Nvidia, etc) - however, it's fairly common to find that the laptop requires a custom driver written by the laptop manufacturer.&lt;br /&gt;
# the driver that shipped with Windows (yuck)&lt;br /&gt;
&lt;br /&gt;
Give them all a shot.  Track down every driver you can find for your card, and try it.  Try the WHQL ones first - these versions of the drivers have passed &amp;quot;Windows Hardware Quality Labs&amp;quot; certification and are usually the more stable and reliable ones. In general, it's a very good idea to use only Microsoft-certified WHQL drivers for your video card.  Often people want to get the newest, fastest beta drivers, but these drivers are almost ALWAYS riddled with new bugs.  You can also watch the version number of the drivers a company releases - if the version number just jumped to a new series such as from the 70's to the 80's), watch out, it probably has a lot of bugs that need worked out - give it 3-4 months before expecting the new driver series to work well.  With video drivers, the newest isn't always the best!&lt;br /&gt;
&lt;br /&gt;
Here is a list of some common card/chip manufacturers and where to get their drivers.  Don't forget to choose the WHQL driver!&lt;br /&gt;
&lt;br /&gt;
            [http://www.nvidia.com/page/drivers.html NVIDIA driver]&lt;br /&gt;
                Card manufacturers using NVIDIA (GeForce) graphics chips:&lt;br /&gt;
                (note - most of these just link you to the nvidia driver above)&lt;br /&gt;
                [http://www.xfxforce.com/web/support/showSearchDriversProductCode.jspa XFX]&lt;br /&gt;
                [http://www.evga.com/support/drivers EVGA]&lt;br /&gt;
                [http://www.bfgtech.com/driverdownload.aspx BFG]&lt;br /&gt;
                [http://www2.pny.com/support/support.aspx PNY]  &lt;br /&gt;
            [http://ati.amd.com/support/driver.html ATI driver] &lt;br /&gt;
                Card manufacturers using ATI (Radeon) graphics chips:&lt;br /&gt;
                [http://www.visiontek.com/teksupport/drivers/drivers.html VisionTek]              &lt;br /&gt;
                [http://www.dmmdownload.com/current.php Diamond]                &lt;br /&gt;
            [http://downloadcenter.intel.com Intel] - then click 'graphics' on the left&lt;br /&gt;
            [http://www.sis.com/download SiS] - agree, then select 'graphics drivers'&lt;br /&gt;
            [http://www.s3graphics.com S3] - then click 'drivers'&lt;br /&gt;
            [http://www.via.com.tw/en/products/graphics VIA]    &lt;br /&gt;
            [http://www.matrox.com/graphics/en/corpo/support/drivers/home.php Matrox]&lt;br /&gt;
            [http://www.creative.com/language.asp?sDestUrl=/support/downloads Creative Labs]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For others - or in general - if your graphics chip is made by Trident, for example, then try a [http://www.google.com/ google] search for:&lt;br /&gt;
        &lt;br /&gt;
                Trident graphics driver&lt;br /&gt;
                        &lt;br /&gt;
Then click on &amp;quot;support&amp;quot;, then &amp;quot;drivers&amp;quot; (or &amp;quot;downloads&amp;quot;), then &amp;quot;graphics driver&amp;quot;, and so on.&lt;br /&gt;
&lt;br /&gt;
====2. [RE]INSTALL DIRECTX====&lt;br /&gt;
    &lt;br /&gt;
Make sure you have a quasi-recent version of Microsoft DirectX installed.  In reality, though, almost every PC in the world has DirectX 9 on it at this point, so this shouldn't be a problem. If you go to download it, you'll only be able to find DirectX 10 - this is fine to install, though, as it includes DirectX 9 inside it.  As a last resort, though, if you are having problems, you could try re-installing DirectX to see if it helps.&lt;br /&gt;
&lt;br /&gt;
If you're having a non-critical problem, browse the following list of common problems and their causes and solutions.  Note that for each symptom- cause-solution block, there can be multiple symptoms with the same cause and solution, and the same symptom might be listed in multiple blocks.&lt;br /&gt;
&lt;br /&gt;
If the solutions below don't work for you, please visit the forums at http://forums.winamp.com/forumdisplay.php?forumid=84, where you can read the most recent troubleshooting issues and solutions.&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
    ENTRY 1&lt;br /&gt;
    SYMPTOM:&lt;br /&gt;
        -any error message saying &amp;quot;Failed to create ...&amp;quot; &lt;br /&gt;
            or &amp;quot;not enough memory...&amp;quot;, or&lt;br /&gt;
        -only a portion of the screen displays correctly; the rest is &lt;br /&gt;
            either filled with garbage or badly flickering&lt;br /&gt;
    CAUSE:&lt;br /&gt;
        1) Your video card might not have enough memory to run MilkDrop at &lt;br /&gt;
        the resolution (screen width and height) you've picked, &lt;br /&gt;
        2) your drivers might be out of date, &lt;br /&gt;
        3) you might need to reinstall DirectX (very very rare), or&lt;br /&gt;
        4) your graphics card might be to crappy to *actually* run&lt;br /&gt;
             pixel shaders well.&lt;br /&gt;
    SOLUTION:    &lt;br /&gt;
        1) To battle video memory problems:&lt;br /&gt;
            &lt;br /&gt;
            Go to the config panel and try smaller video modes (e.g.,&lt;br /&gt;
            320x240 is smaller than 640x480).  Even better is to try&lt;br /&gt;
            a lower color bit depth; if you'd selected a 32-bit (&amp;quot;8888&amp;quot;) &lt;br /&gt;
            video mode before, try a 16- (&amp;quot;565&amp;quot; or &amp;quot;555&amp;quot;) or 24-bit (&amp;quot;888&amp;quot;) &lt;br /&gt;
            one, for example.  Note that it might only work in one of them; &lt;br /&gt;
            so make sure you try them all.  Trying these things is especially &lt;br /&gt;
            important on laptops with limited video memory, or older video &lt;br /&gt;
            cards with a small amount of video memory.&lt;br /&gt;
        &lt;br /&gt;
            Finally, you can try locking the texture size (or &amp;quot;canvas size&amp;quot;) &lt;br /&gt;
            to 256x256 pixels, just to see if that fixes the problem.  &lt;br /&gt;
            If it does, try using a smaller fullscreen video mode to&lt;br /&gt;
            free up some memory, or if running windowed, close other&lt;br /&gt;
            graphics-hungry applications.&lt;br /&gt;
        &lt;br /&gt;
        2,3) for instructions on how to reinstall DirectX or update &lt;br /&gt;
            drivers, go here.&lt;br /&gt;
            &lt;br /&gt;
        4) Go to the MilkDrop config panel (hit ALT+K) and on the second tab, &lt;br /&gt;
            in the &amp;quot;Pixel Shaders&amp;quot; box, select &amp;quot;None.&amp;quot;  Now does MilkDrop run &lt;br /&gt;
            ok?  If so, your video card probably just can't reliably run&lt;br /&gt;
            pixel shaders, due to either inferior hardware, or it could&lt;br /&gt;
            be the driver.  You can always try setting &amp;quot;Pixel Shaders&amp;quot; &lt;br /&gt;
            back to &amp;quot;Auto&amp;quot; and then installing a newer (preferably WHQL) &lt;br /&gt;
            video driver.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ENTRY 2&lt;br /&gt;
    SYMPTOM:&lt;br /&gt;
        -When I go to the Load Preset menu ('L') in MilkDrop, some of the&lt;br /&gt;
            presets on disk are missing.&lt;br /&gt;
        -I downloaded some new presets and put them in my Plugins\MilkDrop2\Presets&lt;br /&gt;
            directory, but I can't access them from within MilkDrop.&lt;br /&gt;
    CAUSE:&lt;br /&gt;
        You probably have an older video card that can't handle the pixel&lt;br /&gt;
        shaders needed to run some of the presets.  MilkDrop automatically&lt;br /&gt;
        hides any presets from you that you can't run.&lt;br /&gt;
    SOLUTION:&lt;br /&gt;
        * You could buy a new graphics card - one that meets the minimum&lt;br /&gt;
        recommendation for MilkDrop 2.  These cost less than $40.&lt;br /&gt;
        * You could try forcing MilkDrop to try to run these presets.&lt;br /&gt;
        Sometimes MilkDrop just hides them from you because it predicts&lt;br /&gt;
        they will run horribly slow on your graphics card; in case it&lt;br /&gt;
        is wrong about that, try this.  Go into the MilkDrop config&lt;br /&gt;
        panel (ALT+K) and go to the More Settings tab.  Under the &lt;br /&gt;
        &amp;quot;Pixel Shaders&amp;quot; option, change it from &amp;quot;Auto&amp;quot; to &amp;quot;Shader Model 2&amp;quot;&lt;br /&gt;
        or &amp;quot;Shader Model 3&amp;quot;.  Then try to run MilkDrop and see if the&lt;br /&gt;
        presets appear.  If they do, you're in luck; if they don't, your&lt;br /&gt;
        GPU really doesn't support those shader models.&lt;br /&gt;
    &lt;br /&gt;
&lt;br /&gt;
    ENTRY 3&lt;br /&gt;
    SYMPTOM:&lt;br /&gt;
        MilkDrop always looks the same - it's always showing the same&lt;br /&gt;
        preset, and it never changes to a new preset unless I tell it to.&lt;br /&gt;
    CAUSE:&lt;br /&gt;
        Scroll Lock is on.&lt;br /&gt;
    SOLUTION:&lt;br /&gt;
        The Scroll Lock key is how you tell MilkDrop to lock the current&lt;br /&gt;
        preset - i.e. don't randomly transition to a new preset unless you &lt;br /&gt;
        do it.  The state of the Scroll Lock key is remembered when you&lt;br /&gt;
        start or stop MilkDrop, too, so be careful of that.  If you are&lt;br /&gt;
        experiencing this problem, you can fix it in any of the following&lt;br /&gt;
        three ways:&lt;br /&gt;
          1. hit Scroll Lock while MilkDrop is running (and the viz window is active);&lt;br /&gt;
          2. load up the MilkDrop config panel (ALT+K), go to the More Settings&lt;br /&gt;
              tab, and uncheck the &amp;quot;Start milkdrop with preset lock (scroll lock) &lt;br /&gt;
              key ON&amp;quot; box;&lt;br /&gt;
          3. if you're using a modern skin, there is a &amp;quot;random&amp;quot; button on&lt;br /&gt;
              the frame of the window, which is the inverse of the Scroll Lock&lt;br /&gt;
              state - i.e. you probably have Scroll Lock on and &amp;quot;random&amp;quot; off.&lt;br /&gt;
              Click the &amp;quot;Random&amp;quot; button to turn random transitions back on&lt;br /&gt;
              (and notice that scroll lock gets turned off as a result).&lt;br /&gt;
&lt;br /&gt;
    ENTRY 4&lt;br /&gt;
    SYMPTOM:&lt;br /&gt;
        I was browsing for presets from within MilkDrop ('L') key and &lt;br /&gt;
        got lost.  How do I get back to my presets?&lt;br /&gt;
    SOLUTION:   &lt;br /&gt;
        Two ways to fix this.  The easiest is to just reset MilkDrop&lt;br /&gt;
        to its defaults - hit ALT+K to load the MilkDrop config panel,&lt;br /&gt;
        then click the 'Defaults' button.  The next time you launch&lt;br /&gt;
        MilkDrop, it will start you in the default preset directory.&lt;br /&gt;
        &lt;br /&gt;
        To fix it manually (and preserve all your settings), run&lt;br /&gt;
        MilkDrop, hit F8, and paste in this path:&lt;br /&gt;
          C:\Program Files\Winamp\Plugins\Milkdrop2\presets&lt;br /&gt;
        [or equivalent].&lt;br /&gt;
        &lt;br /&gt;
        Another way to fix it is to hit 'L', and browse all the way &lt;br /&gt;
        down to the root folder (repeatedly select &amp;quot;..&amp;quot;), then&lt;br /&gt;
        go into Program Files, Winamp, Plugins, MilkDrop2, and finally,&lt;br /&gt;
        presets.&lt;br /&gt;
&lt;br /&gt;
    ENTRY 5&lt;br /&gt;
    SYMPTOM:&lt;br /&gt;
        -things flicker through (such as my AIM window ticker, taskbar&lt;br /&gt;
        clock, web page animations, etc.) when I'm running MilkDrop&lt;br /&gt;
        in fullscreen mode.&lt;br /&gt;
    CAUSE:&lt;br /&gt;
        You're probably running MilkDrop fullscreen at the same&lt;br /&gt;
        resolution &amp;amp; color depth as your desktop, and Windows isn't &lt;br /&gt;
        properly handling MilkDrop's request for exclusive access to the&lt;br /&gt;
        screen, and is still letting other applications paint (draw)&lt;br /&gt;
        themselves.&lt;br /&gt;
    SOLUTION:&lt;br /&gt;
        Change either your Windows desktop resolution or color depth, or &lt;br /&gt;
        MilkDrop's fullscreen resolution or color depth, so that there&lt;br /&gt;
        is some difference between the two.   (To change your Windows &lt;br /&gt;
        display settings, go to the Start Menu -&amp;gt; Settings -&amp;gt; Control &lt;br /&gt;
        Panel -&amp;gt; Display -&amp;gt; Settings tab, and then change the &amp;quot;colors&amp;quot; &lt;br /&gt;
        or &amp;quot;screen area&amp;quot; settings from there.)  Also make sure you're&lt;br /&gt;
        not using &amp;quot;fake&amp;quot; fullscreen mode (...uncheck this box on the&lt;br /&gt;
        main screen of the config panel).&lt;br /&gt;
&lt;br /&gt;
===Known Issues / Misc. / Tips:===&lt;br /&gt;
&lt;br /&gt;
    a. Tip for video capture: if you'd like to save sequences of video &lt;br /&gt;
        from this plugin, there are several programs out there that will &lt;br /&gt;
        let you do this.  Warning: you will need a ton of free hard drive &lt;br /&gt;
        space, and a fast CPU helps.  A few of these programs are:&lt;br /&gt;
            &amp;quot;FRAPS&amp;quot;               http://www.fraps.com/&lt;br /&gt;
            &amp;quot;Hypercam&amp;quot;            http://www.hyperionics.com&lt;br /&gt;
    &lt;br /&gt;
    b. Close other apps:&lt;br /&gt;
        For the best graphics performance, try to close as many other &lt;br /&gt;
        applications as you can, before running the plugin, especially &lt;br /&gt;
        those that tend to work in the background, such as anti-virus &lt;br /&gt;
        or file-swapping software.  Also, if you must leave other &lt;br /&gt;
        applications open, try to minimize them (i.e. shrink the window &lt;br /&gt;
        down to the taskbar) so that they stay out of the painting loop.&lt;br /&gt;
    &lt;br /&gt;
    c. Windows Vista / Winamp with per-user settings&lt;br /&gt;
        Be aware that if you're running Vista as a non-admin user,&lt;br /&gt;
        you can't write to (or delete from) files in the Program Files&lt;br /&gt;
        directory, which is were MilkDrop 2 is installed.  So, anything&lt;br /&gt;
        you try to write or save (like milkdrop's settings file, milk2.ini; &lt;br /&gt;
        or presets) will probably end up deep in some user-specific, &lt;br /&gt;
        virtualized &amp;quot;Program Files&amp;quot; directory somewhere on your hard &lt;br /&gt;
        drive.  Yell at Microsoft for this one!&lt;br /&gt;
        &lt;br /&gt;
        Also, if you installed Winamp with per-user settings (instead of &lt;br /&gt;
        shared settings) - on any OS, not just Vista - be aware that your&lt;br /&gt;
        .INI files (milk2.ini, milk2_img.ini, milk2_cfg.ini) are all&lt;br /&gt;
        stored in a folder like this:&lt;br /&gt;
            &lt;br /&gt;
            C:\Documents and Settings\\Application Data\Winamp\Plugins         &lt;br /&gt;
            &lt;br /&gt;
        (Note that 'Application Data' is a hidden folder.)  However,&lt;br /&gt;
        presets, textures, and things like that are all shared between&lt;br /&gt;
        users, in the real [c:\Program Files]\winamp\plugins\milkdrop2 folder. &lt;br /&gt;
        If you want to keep your presets separate, you can still do that, &lt;br /&gt;
        though - just put them in a personal folder, and then seek to it&lt;br /&gt;
        from within MilkDrop.  If you're using per-user settings in Winamp,&lt;br /&gt;
        it will remember which folder you last used.&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Using Line-In===&lt;br /&gt;
-----------------------&lt;br /&gt;
    If you want to use your sound card's Line-In or CD Audio inputs for&lt;br /&gt;
    sound data (instead of mp3 files), you can do this.  Do the following:&lt;br /&gt;
        1. CONNECT WIRES&lt;br /&gt;
            Connect your audio source (a stereo, a live feed, whatever) into&lt;br /&gt;
            the line-in (or microphone) 1/8&amp;quot; jack on your sound card.  You&lt;br /&gt;
            might want to test &amp;amp; verify that your cable is good before doing &lt;br /&gt;
            this.&lt;br /&gt;
        2. SELECT SOUND INPUT CHANNEL &amp;amp; ADJUST VOLUME&lt;br /&gt;
            In Windows, double-click the speaker icon in your systray (where&lt;br /&gt;
            the clock is).  Then, on the menu, go to Options -&amp;gt; Properties&lt;br /&gt;
            and select the &amp;quot;Recording&amp;quot; option.  Then make sure the Line In&lt;br /&gt;
            (or Microphone) input channel (whichever is appropriate for&lt;br /&gt;
            your case) is SELECTED (with a check mark) and that the volume &lt;br /&gt;
            is close to, or at, the maximum.  Hit OK.           &lt;br /&gt;
        3. TELL WINAMP TO USE LINE-IN&lt;br /&gt;
            Open Winamp, and hit CTRL+L (the &amp;quot;Open Location&amp;quot; hotkey).  Now&lt;br /&gt;
            type in &amp;quot;linein://&amp;quot; as the location you want to open.  (Leave out&lt;br /&gt;
            the quotes and make sure you use FORWARD slashes.)  Hit PLAY&lt;br /&gt;
            ('x' key for the lazy), and the little built-in oscilloscope (or &lt;br /&gt;
            spectrum analyzer) in Winamp should start showing your signal.&lt;br /&gt;
        4. RUN MILKDROP&lt;br /&gt;
            Run MilkDrop as usual.  If the waves are too small or large, &lt;br /&gt;
            either adjust the volume from Windows' Volume Control, or adjust&lt;br /&gt;
            the sound level at the source.       &lt;br /&gt;
   &lt;br /&gt;
    If you are doing shows using live audio, and if you have a multiple monitor&lt;br /&gt;
    setup, you might also want to use the &amp;quot;VJ mode&amp;quot; feature, which lets you &lt;br /&gt;
    control MilkDrop (even editing shaders on the fly, etc.) via a separate monitor.&lt;/div&gt;</summary>
		<author><name>Ashokbania</name></author>	</entry>

	<entry>
		<id>http://wiki.shoutcast.com/wiki/Box_source_code_here</id>
		<title>Box source code here</title>
		<link rel="alternate" type="text/html" href="http://wiki.shoutcast.com/wiki/Box_source_code_here"/>
				<updated>2008-09-02T08:44:58Z</updated>
		
		<summary type="html">&lt;p&gt;Ashokbania: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Breadcrumb''' -- [[Main_Page|Wiki Main]] : [[Skin Developer]] : [[Visual Developer]] : [[Plug-in Developer]] : [[Articles|Articles Page]] : [[Developers FAQ|FAQ]] : [[Main_Page#Glossary_of_Terms|Glossary]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=cpp&amp;gt;&lt;br /&gt;
 #include &amp;lt;windows.h&amp;gt;&lt;br /&gt;
 #include &amp;quot;resource.h&amp;quot;&lt;br /&gt;
 #include &amp;quot;avs_ape.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
// this will be the directory and APE name displayed in&lt;br /&gt;
// the AVS Editor&lt;br /&gt;
 #define MOD_NAME &amp;quot;Tutorials / BOX v1.0&amp;quot;&lt;br /&gt;
&lt;br /&gt;
// this is how WVS will recognize this APE internally&lt;br /&gt;
  #define UNIQUEIDSTRING &amp;quot;Nullsoft Tut0: BOX&amp;quot;&lt;br /&gt;
  class C_THISCLASS : public C_RBASE&lt;br /&gt;
  {protected:&lt;br /&gt;
  public:&lt;br /&gt;
  C_THISCLASS();&lt;br /&gt;
  virtual ~C_THISCLASS();&lt;br /&gt;
  virtual int render(char visdata[2][2][576], int isBeat,&lt;br /&gt;
   int *framebuffer, int *fbout, int w, int h);&lt;br /&gt;
  virtual HWND conf(HINSTANCE hInstance, HWND hwndParent);&lt;br /&gt;
  virtual char *get_desc();&lt;br /&gt;
  virtual void load_config(unsigned char *data, int len);&lt;br /&gt;
  virtual int  save_config(unsigned char *data);&lt;br /&gt;
  int enabled;  // toggles plug-in on and off&lt;br /&gt;
                // (a good idea for any APE)&lt;br /&gt;
  int color;		// color of rectangle};&lt;br /&gt;
&lt;br /&gt;
// global configuration dialog pointer&lt;br /&gt;
static C_THISCLASS *g_ConfigThis;&lt;br /&gt;
// global DLL instance pointer (not needed in this&lt;br /&gt;
// example, but is useful)static HINSTANCE g_hDllInstance;&lt;br /&gt;
// this is where we deal with the configuration screen&lt;br /&gt;
static BOOL CALLBACK g_DlgProc(HWND hwndDlg, UINT uMsg,&lt;br /&gt;
WPARAM wParam,LPARAM lParam)&lt;br /&gt;
{&lt;br /&gt;
 switch (uMsg)&lt;br /&gt;
 {&lt;br /&gt;
  case WM_INITDIALOG:&lt;br /&gt;
  if (g_ConfigThis-&amp;gt;enabled)&lt;br /&gt;
  {&lt;br /&gt;
   CheckDlgButton(hwndDlg,IDC_CHECK1,BST_CHECKED);&lt;br /&gt;
  }&lt;br /&gt;
  return 1;&lt;br /&gt;
  case WM_DRAWITEM:&lt;br /&gt;
  DRAWITEMSTRUCT *di;&lt;br /&gt;
  di=(DRAWITEMSTRUCT *)lParam;&lt;br /&gt;
  if (di-&amp;gt;CtlID == IDC_DEFCOL)&lt;br /&gt;
  {&lt;br /&gt;
   int w;&lt;br /&gt;
   int color;&lt;br /&gt;
   w=di-&amp;gt;rcItem.right-di-&amp;gt;rcItem.left;&lt;br /&gt;
   color=g_ConfigThis-&amp;gt;color;&lt;br /&gt;
   color = ( (color&amp;gt;&amp;gt;16)&amp;amp;0xff) |&lt;br /&gt;
   (color&amp;amp;0xff00) |&lt;br /&gt;
   ((color&amp;lt;&amp;lt;16)&amp;amp;0xff0000);&lt;br /&gt;
&lt;br /&gt;
   // paint nifty color button&lt;br /&gt;
   HBRUSH hBrush,hOldBrush;&lt;br /&gt;
   LOGBRUSH lb={BS_SOLID,color,0};&lt;br /&gt;
   hBrush = CreateBrushIndirect(&amp;amp;lb);&lt;br /&gt;
   hOldBrush=(HBRUSH)SelectObject(di-&amp;gt;hDC,hBrush);&lt;br /&gt;
   Rectangle(di-&amp;gt;hDC,di-&amp;gt;rcItem.left,di-&amp;gt;rcItem.top,&lt;br /&gt;
   di-&amp;gt;rcItem.right,di-&amp;gt;rcItem.bottom);&lt;br /&gt;
   SelectObject(di-&amp;gt;hDC,hOldBrush);&lt;br /&gt;
   DeleteObject(hBrush);&lt;br /&gt;
   }&lt;br /&gt;
  return 0;&lt;br /&gt;
  case WM_COMMAND:&lt;br /&gt;
&lt;br /&gt;
  // see if enable checkbox is checked&lt;br /&gt;
  if (LOWORD(wParam) == IDC_CHECK1)&lt;br /&gt;
   {&lt;br /&gt;
    g_ConfigThis-&amp;gt;enabled=&lt;br /&gt;
    (IsDlgButtonChecked(hwndDlg,IDC_CHECK1)?1:0);&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
   // is colorbox is selected?&lt;br /&gt;
  if (LOWORD(wParam) == IDC_DEFCOL)&lt;br /&gt;
   {&lt;br /&gt;
    static COLORREF custcolors[16];&lt;br /&gt;
    int *a;&lt;br /&gt;
    CHOOSECOLOR cs;&lt;br /&gt;
    a=&amp;amp;g_ConfigThis-&amp;gt;color;&lt;br /&gt;
    cs.lStructSize = sizeof(cs);&lt;br /&gt;
    cs.hwndOwner = hwndDlg;&lt;br /&gt;
    cs.hInstance = 0;&lt;br /&gt;
    cs.rgbResult = ((*a&amp;gt;&amp;gt;16)&amp;amp;0xff)|&lt;br /&gt;
     (*a&amp;amp;0xff00)|&lt;br /&gt;
     ((*a&amp;lt;&amp;lt;16)&amp;amp;0xff0000);&lt;br /&gt;
    cs.lpCustColors = custcolors;&lt;br /&gt;
    cs.Flags = CC_RGBINIT|CC_FULLOPEN;&lt;br /&gt;
&lt;br /&gt;
   // go to windows color selection screen&lt;br /&gt;
   if (ChooseColor(&amp;amp;cs))&lt;br /&gt;
   {&lt;br /&gt;
    *a = ((cs.rgbResult&amp;gt;&amp;gt;16)&amp;amp;0xff)|&lt;br /&gt;
    (cs.rgbResult&amp;amp;0xff00)|&lt;br /&gt;
    ((cs.rgbResult&amp;lt;&amp;lt;16)&amp;amp;0xff0000);&lt;br /&gt;
   }&lt;br /&gt;
   InvalidateRect(GetDlgItem(hwndDlg,IDC_DEFCOL),&lt;br /&gt;
    NULL,TRUE);&lt;br /&gt;
   }&lt;br /&gt;
   return 0;&lt;br /&gt;
   }&lt;br /&gt;
   return 0;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
// set up default configuration&lt;br /&gt;
C_THISCLASS::C_THISCLASS()&lt;br /&gt;
{&lt;br /&gt;
 //set initial color&lt;br /&gt;
 color=RGB(255,0,0);&lt;br /&gt;
 enabled=1;}&lt;br /&gt;
&lt;br /&gt;
// virtual destructor&lt;br /&gt;
C_THISCLASS::~C_THISCLASS()&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* RENDER FUNCTION:&lt;br /&gt;
render should return 0 if it only used framebuffer,&lt;br /&gt;
or 1 if the new output data  is in fbout.&lt;br /&gt;
this is used when you want to do something that you'd otherwise&lt;br /&gt;
need to make a copy of the framebuffer.&lt;br /&gt;
w and h are the width and height of the screen, in pixels.&lt;br /&gt;
isBeat is 1 if a beat has been detected.&lt;br /&gt;
visdata is in the format of [spectrum:0,wave:1][channel][band].&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
int C_THISCLASS::render(char visdata[2][2][576], int isBeat,&lt;br /&gt;
		int *framebuffer, int *fbout, int w, int h)&lt;br /&gt;
{&lt;br /&gt;
 int halfw;&lt;br /&gt;
 int halfh;&lt;br /&gt;
&lt;br /&gt;
 // is this effect on?&lt;br /&gt;
 if (!enabled)&lt;br /&gt;
 {&lt;br /&gt;
  return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 // did we just hit a beat?&lt;br /&gt;
 if(isBeat)&lt;br /&gt;
 {&lt;br /&gt;
  // draw our magic box&lt;br /&gt;
  halfw=w/2;&lt;br /&gt;
  halfh=h/2;&lt;br /&gt;
  framebuffer+=(((halfh/2)*w)+ (halfw/2));&lt;br /&gt;
  for(int j=0;j&amp;lt;halfh;j++)&lt;br /&gt;
   {&lt;br /&gt;
    for(int i=0;i&amp;lt;halfw;i++)&lt;br /&gt;
    {&lt;br /&gt;
     framebuffer[i]=color;&lt;br /&gt;
    }&lt;br /&gt;
    framebuffer+=w;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  return 0;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
HWND C_THISCLASS::conf(HINSTANCE hInstance, HWND hwndParent)&lt;br /&gt;
// return NULL if no config dialog possible&lt;br /&gt;
{&lt;br /&gt;
 g_ConfigThis = this;&lt;br /&gt;
 return CreateDialog(hInstance,MAKEINTRESOURCE(IDD_CONFIG),&lt;br /&gt;
  hwndParent,g_DlgProc);&lt;br /&gt;
}&lt;br /&gt;
char *C_THISCLASS::get_desc(void)&lt;br /&gt;
{&lt;br /&gt;
 return MOD_NAME;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// load_/save_config are called when saving and loading&lt;br /&gt;
// presets (.avs files)&lt;br /&gt;
&lt;br /&gt;
#define GET_INT() (data[pos]|(data[pos+1]&amp;lt;&amp;lt;8)|\&lt;br /&gt;
  (data[pos+2]&amp;lt;&amp;lt;16)|(data[pos+3]&amp;lt;&amp;lt;24))&lt;br /&gt;
// read configuration of max length &amp;quot;len&amp;quot; from data.&lt;br /&gt;
&lt;br /&gt;
void C_THISCLASS::load_config(unsigned char *data, int len)&lt;br /&gt;
{&lt;br /&gt;
 int pos=0;&lt;br /&gt;
 // always ensure there is data to be loaded&lt;br /&gt;
 if (len-pos &amp;gt;= 4)&lt;br /&gt;
  {&lt;br /&gt;
   // load activation toggle&lt;br /&gt;
   enabled=GET_INT();&lt;br /&gt;
   pos+=4;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
 if (len-pos &amp;gt;= 4)&lt;br /&gt;
  {&lt;br /&gt;
   // load the box color&lt;br /&gt;
   color=GET_INT();&lt;br /&gt;
   pos+=4;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// write configuration to data, return length.&lt;br /&gt;
// config data should not exceed 64k.&lt;br /&gt;
#define PUT_INT(y) data[pos]=(y)&amp;amp;255; data[pos+1]=(y&amp;gt;&amp;gt;8)&amp;amp;255;\&lt;br /&gt;
data[pos+2]=(y&amp;gt;&amp;gt;16)&amp;amp;255; data[pos+3]=(y&amp;gt;&amp;gt;24)&amp;amp;255&lt;br /&gt;
&lt;br /&gt;
int  C_THISCLASS::save_config(unsigned char *data)&lt;br /&gt;
{&lt;br /&gt;
 int pos=0;&lt;br /&gt;
&lt;br /&gt;
 PUT_INT(enabled);&lt;br /&gt;
 pos+=4;&lt;br /&gt;
&lt;br /&gt;
 PUT_INT(color);&lt;br /&gt;
 pos+=4;&lt;br /&gt;
&lt;br /&gt;
 return pos;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
export stuff&lt;br /&gt;
creates a new effect object if desc is NULL, otherwise&lt;br /&gt;
fills in desc with description&lt;br /&gt;
*/&lt;br /&gt;
C_RBASE *R_RetrFunc(char *desc)&lt;br /&gt;
{&lt;br /&gt;
 if (desc)&lt;br /&gt;
 {&lt;br /&gt;
  strcpy(desc,MOD_NAME);&lt;br /&gt;
  return NULL;&lt;br /&gt;
 }&lt;br /&gt;
 return (C_RBASE *) new C_THISCLASS();&lt;br /&gt;
}&lt;br /&gt;
 // allows AVS to retrieve this APE module&lt;br /&gt;
extern &amp;quot;C&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
 __declspec (dllexport) int _AVS_APE_RetrFunc(HINSTANCE\&lt;br /&gt;
  hDllInstance, char **info, int *create)&lt;br /&gt;
  // return 0 on failure&lt;br /&gt;
 {&lt;br /&gt;
  g_hDllInstance=hDllInstance;&lt;br /&gt;
  *info=UNIQUEIDSTRING;&lt;br /&gt;
  *create=(int)(void*)R_RetrFunc;&lt;br /&gt;
  return 1;&lt;br /&gt;
 }&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ashokbania</name></author>	</entry>

	</feed>