[xiph-cvs] cvs commit: vorbis-plugins/winamp in2.h out.h winamp_plugin.dsp

Jack Moffitt jack at xiph.org
Mon Nov 6 12:37:46 PST 2000



jack        00/11/06 12:37:46

  Added:       winamp   in2.h out.h winamp_plugin.dsp
  Log:
  winamp plugin project and missing headers

Revision  Changes    Path
1.1                  vorbis-plugins/winamp/in2.h

Index: in2.h
===================================================================
#include "out.h"

// note: exported symbol is now winampGetInModule2.

#define IN_VER 0x100

typedef struct 
{
        int version;				// module type (IN_VER)
        char *description;			// description of module, with version string

        HWND hMainWindow;			// winamp's main window (filled in by winamp)
        HINSTANCE hDllInstance;		// DLL instance handle (Also filled in by winamp)

        char *FileExtensions;		// "mp3\0Layer 3 MPEG\0mp2\0Layer 2 MPEG\0mpg\0Layer 1 MPEG\0"
                                                                // May be altered from Config, so the user can select what they want
        
        int is_seekable;			// is this stream seekable? 
        int UsesOutputPlug;			// does this plug-in use the output plug-ins? (musn't ever change, ever :)

        void (*Config)(HWND hwndParent); // configuration dialog
        void (*About)(HWND hwndParent);  // about dialog

        void (*Init)();				// called at program init
        void (*Quit)();				// called at program quit

        void (*GetFileInfo)(char *file, char *title, int *length_in_ms); // if file == NULL, current playing is used
        int (*InfoBox)(char *file, HWND hwndParent);
        
        int (*IsOurFile)(char *fn);	// called before extension checks, to allow detection of mms://, etc
        // playback stuff
        int (*Play)(char *fn);		// return zero on success, -1 on file-not-found, some other value on other (stopping winamp) error
        void (*Pause)();			// pause stream
        void (*UnPause)();			// unpause stream
        int (*IsPaused)();			// ispaused? return 1 if paused, 0 if not
        void (*Stop)();				// stop (unload) stream

        // time stuff
        int (*GetLength)();			// get length in ms
        int (*GetOutputTime)();		// returns current output time in ms. (usually returns outMod->GetOutputTime()
        void (*SetOutputTime)(int time_in_ms);	// seeks to point in stream (in ms). Usually you signal yoru thread to seek, which seeks and calls outMod->Flush()..

        // volume stuff
        void (*SetVolume)(int volume);	// from 0 to 255.. usually just call outMod->SetVolume
        void (*SetPan)(int pan);	// from -127 to 127.. usually just call outMod->SetPan
        
        // in-window builtin vis stuff

        void (*SAVSAInit)(int maxlatency_in_ms, int srate);		// call once in Play(). maxlatency_in_ms should be the value returned from outMod->Open()
        // call after opening audio device with max latency in ms and samplerate
        void (*SAVSADeInit)();	// call in Stop()

        // simple vis supplying mode
        void (*SAAddPCMData)(void *PCMData, int nch, int bps, int timestamp); 
                                                                                        // sets the spec data directly from PCM data
                                                                                        // quick and easy way to get vis working :)
                                                                                        // needs at least 576 samples :)

        // advanced vis supplying mode, only use if you're cool. Use SAAddPCMData for most stuff.
        int (*SAGetMode)();		// gets csa (the current type (4=ws,2=osc,1=spec))
                                                        // use when calling SAAdd()
        void (*SAAdd)(void *data, int timestamp, int csa); // sets the spec data, filled in by winamp

        // vis stuff (plug-in)
        // simple vis supplying mode
        void (*VSAAddPCMData)(void *PCMData, int nch, int bps, int timestamp); // sets the vis data directly from PCM data
                                                                                        // quick and easy way to get vis working :)
                                                                                        // needs at least 576 samples :)

        // advanced vis supplying mode, only use if you're cool. Use VSAAddPCMData for most stuff.
        int (*VSAGetMode)(int *specNch, int *waveNch); // use to figure out what to give to VSAAdd
        void (*VSAAdd)(void *data, int timestamp); // filled in by winamp, called by plug-in

        // call this in Play() to tell the vis plug-ins the current output params. 
        void (*VSASetInfo)(int nch, int srate);

        // dsp plug-in processing: 
        // (filled in by winamp, called by input plug)

        // returns 1 if active (which means that the number of samples returned by dsp_dosamples
        // could be greater than went in.. Use it to estimate if you'll have enough room in the
        // output buffer
        int (*dsp_isactive)(); 

        // returns number of samples to output. This can be as much as twice numsamples. 
        // be sure to allocate enough buffer for samples, then.
        int (*dsp_dosamples)(short int *samples, int numsamples, int bps, int nch, int srate);

        // eq stuff
        void (*EQSet)(int on, char data[10], int preamp); // 0-64 each, 31 is +0, 0 is +12, 63 is -12. Do nothing to ignore.

        // info setting (filled in by winamp)
        void (*SetInfo)(int bitrate, int srate, int stereo, int synched); // if -1, changes ignored? :)

        Out_Module *outMod; // filled in by winamp, optionally used :)
} In_Module;

1.1                  vorbis-plugins/winamp/out.h

Index: out.h
===================================================================
#define OUT_VER 0x10

typedef struct 
{
        int version;				// module version (OUT_VER)
        char *description;			// description of module, with version string
        int id;						// module id. each input module gets its own. non-nullsoft modules should
                                                                // be >= 65536. 

        HWND hMainWindow;			// winamp's main window (filled in by winamp)
        HINSTANCE hDllInstance;		// DLL instance handle (filled in by winamp)

        void (*Config)(HWND hwndParent); // configuration dialog 
        void (*About)(HWND hwndParent);  // about dialog

        void (*Init)();				// called when loaded
        void (*Quit)();				// called when unloaded

        int (*Open)(int samplerate, int numchannels, int bitspersamp, int bufferlenms, int prebufferms); 
                                        // returns >=0 on success, <0 on failure
                                        // NOTENOTENOTE: bufferlenms and prebufferms are ignored in most if not all output plug-ins. 
                                        //    ... so don't expect the max latency returned to be what you asked for.
                                        // returns max latency in ms (0 for diskwriters, etc)
                                        // bufferlenms and prebufferms must be in ms. 0 to use defaults. 
                                        // prebufferms must be <= bufferlenms

        void (*Close)();	// close the ol' output device.

        int (*Write)(char *buf, int len);	
                                        // 0 on success. Len == bytes to write (<= 8192 always). buf is straight audio data. 
                                        // 1 returns not able to write (yet). Non-blocking, always.

        int (*CanWrite)();	// returns number of bytes possible to write at a given time. 
                                                // Never will decrease unless you call Write (or Close, heh)

        int (*IsPlaying)(); // non0 if output is still going or if data in buffers waiting to be
                                                // written (i.e. closing while IsPlaying() returns 1 would truncate the song

        int (*Pause)(int pause); // returns previous pause state

        void (*SetVolume)(int volume); // volume is 0-255
        void (*SetPan)(int pan); // pan is -128 to 128

        void (*Flush)(int t);	// flushes buffers and restarts output at time t (in ms) 
                                                        // (used for seeking)

        int (*GetOutputTime)(); // returns played time in MS
        int (*GetWrittenTime)(); // returns time written in MS (used for synching up vis stuff)

} Out_Module;

1.1                  vorbis-plugins/winamp/winamp_plugin.dsp

Index: winamp_plugin.dsp
===================================================================
# Microsoft Developer Studio Project File - Name="winamp_plugin" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **

# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102

CFG=winamp_plugin - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE 
!MESSAGE NMAKE /f "winamp_plugin.mak".
!MESSAGE 
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE 
!MESSAGE NMAKE /f "winamp_plugin.mak" CFG="winamp_plugin - Win32 Debug"
!MESSAGE 
!MESSAGE Possible choices for configuration are:
!MESSAGE 
!MESSAGE "winamp_plugin - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "winamp_plugin - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE 

# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe

!IF  "$(CFG)" == "winamp_plugin - Win32 Release"

# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINAMP_PLUGIN_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "c:\src\ogg\include" /I "c:\src\vorbis\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINAMP_PLUGIN_EXPORTS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib /nologo /dll /machine:I386 /out:"in_vorbis.dll" /libpath:"c:\src\ogg\win32\Static_Release" /libpath:"c:\src\vorbis\win32\Static_Release"

!ELSEIF  "$(CFG)" == "winamp_plugin - Win32 Debug"

# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINAMP_PLUGIN_EXPORTS" /YX /FD /GZ  /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "c:\src\ogg\include" /I "c:\src\vorbis\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WINAMP_PLUGIN_EXPORTS" /YX /FD /GZ  /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib /nologo /dll /debug /machine:I386 /out:"in_vorbis.dll" /pdbtype:sept /libpath:"c:\src\ogg\win32\Static_Release" /libpath:"c:\src\vorbis\win32\Static_Release"

!ENDIF 

# Begin Target

# Name "winamp_plugin - Win32 Release"
# Name "winamp_plugin - Win32 Debug"
# Begin Group "Source Files"

# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File

SOURCE=.\vorbis.c
# End Source File
# End Group
# Begin Group "Header Files"

# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File

SOURCE=.\In2.h
# End Source File
# Begin Source File

SOURCE=.\Out.h
# End Source File
# End Group
# Begin Group "Resource Files"

# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list