Click here to Skip to main content
15,891,905 members
Articles / Programming Languages / C#

Using Winamp input plugins for tagging audio files

Rate me:
Please Sign up or sign in to vote.
4.74/5 (9 votes)
21 Jun 2007CPOL5 min read 68.9K   456   30  
C# Interop with dynamic loaded plug-ins and function pointers
using System;
using System.Collections.Generic;
using System.Windows.Forms;

//  example usage:
//  txtGenre.AutoCompleteCustomSource = AutoComplete.Default.Genre;
//  txtGenre.AutoCompleteSource = AutoCompleteSource.CustomSource;
//  txtGenre.AutoCompleteMode = AutoCompleteMode.Suggest;

namespace OC.Winamp.Components
{
    public partial class AutoComplete
    {
        private static AutoCompleteStringCollection genre;
        private static AutoComplete defaultInstance = new AutoComplete();

        public AutoComplete()
        { }

        public static AutoComplete Default
        {
            get { return defaultInstance; }
        }

        public AutoCompleteStringCollection Genre
        {
            get
            {
                if (genre == null)
                {
                    genre = new AutoCompleteStringCollection();
                    genre.AddRange(genreData());
                }

                return genre;
            }
        }


        private static string[] genreData()
        {
            return new string[] {
                "Blues","Classic Rock","Country","Dance","Disco","Funk","Grunge",
                "Hip-Hop","Jazz","Metal","New Age","Oldies","Other","Pop","R&B",
                "Rap","Reggae","Rock","Techno","Industrial","Alternative","Ska",
                "Death Metal","Pranks","Soundtrack","Euro-Techno","Ambient",
                "Trip-Hop","Vocal","Jazz+Funk","Fusion","Trance","Classical",
                "Instrumental","Acid","House","Game","Sound Clip","Gospel",
                "Noise","AlternRock","Bass","Soul","Punk","Space","Meditative",
                "Instrumental Pop","Instrumental Rock","Ethnic","Gothic",
                "Darkwave","Techno-Industrial","Electronic","Pop-Folk",
                "Eurodance","Dream","Southern Rock","Comedy","Cult","Gangsta",
                "Top 40","Christian Rap","Pop/Funk","Jungle","Native American",
                "Cabaret","New Wave","Psychedelic","Rave","Showtunes","Trailer",
                "Lo-Fi","Tribal","Acid Punk","Acid Jazz","Polka","Retro",
                "Musical","Rock & Roll","Hard Rock","Folk","Folk-Rock",
                "National Folk","Swing","Fast Fusion","Bebob","Latin","Revival",
                "Celtic","Bluegrass","Avantgarde","Gothic Rock","Progressive Rock",
                "Psychedelic Rock","Symphonic Rock","Slow Rock","Big Band",
                "Chorus","Easy Listening","Acoustic","Humour","Speech","Chanson",
                "Opera","Chamber Music","Sonata","Symphony","Booty Bass","Primus",
                "Porn Groove","Satire","Slow Jam","Club","Tango","Samba",
                "Folklore","Ballad","Power Ballad","Rhythmic Soul","Freestyle",
                "Duet","Punk Rock","Drum Solo","Acapella","Euro-House","Dance Hall",
                // my additions
                "Krautrock"
            };
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Germany Germany
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions