rtoss - Blame information for rev 182

Subversion Repositories:
Rev:
Rev Author Line No. Line
182 roytam 1 #ifndef NULLSOFT_WINAMP_DSP_H
2 #define NULLSOFT_WINAMP_DSP_H
181 roytam 3 // DSP plugin interface
4  
5 // notes:
6 // any window that remains in foreground should optimally pass unused
7 // keystrokes to the parent (winamp's) window, so that the user
8 // can still control it. As for storing configuration,
9 // Configuration data should be stored in <dll directory>\plugin.ini
10 // (look at the vis plugin for configuration code)
11  
12 typedef struct winampDSPModule {
13 char *description; // description
14 HWND hwndParent; // parent window (filled in by calling app)
15 HINSTANCE hDllInstance; // instance handle to this DLL (filled in by calling app)
16  
17 void (*Config)(struct winampDSPModule *this_mod); // configuration dialog (if needed)
18 int (*Init)(struct winampDSPModule *this_mod); // 0 on success, creates window, etc (if needed)
19  
20 // modify waveform samples: returns number of samples to actually write
21 // (typically numsamples, but no more than twice numsamples, and no less than half numsamples)
22 // numsamples should always be at least 128. should, but I'm not sure
23 int (*ModifySamples)(struct winampDSPModule *this_mod, short int *samples, int numsamples, int bps, int nch, int srate);
24  
25 void (*Quit)(struct winampDSPModule *this_mod); // called when unloading
26  
27 void *userData; // user data, optional
28 } winampDSPModule;
29  
30 typedef struct {
31 int version; // DSP_HDRVER
32 char *description; // description of library
33 winampDSPModule* (*getModule)(int); // module retrieval function
34 int (*sf)(int key); // DSP_HDRVER == 0x21
35 } winampDSPHeader;
36  
37 // exported symbols
182 roytam 38 #ifdef USE_DSP_HDR_HWND
39 typedef winampDSPHeader* (*winampDSPGetHeaderType)(HWND);
40 #define DSP_HDRVER 0x22
181 roytam 41  
182 roytam 42 #else
43  
44 typedef winampDSPHeader* (*winampDSPGetHeaderType)(HWND);
181 roytam 45 // header version: 0x20 == 0.20 == winamp 2.0
182 roytam 46 #define DSP_HDRVER 0x20
47 #endif
48  
49 // return values from the winampUninstallPlugin(HINSTANCE hdll, HWND parent, int param)
50 // which determine if we can uninstall the plugin immediately or on winamp restart
51 #define DSP_PLUGIN_UNINSTALL_NOW 0x0
52 #define DSP_PLUGIN_UNINSTALL_REBOOT 0x1
53 //
54 // uninstall support was added from 5.0+ and uninstall now support from 5.5+
55 // it is down to you to ensure that if uninstall now is returned that it will not cause a crash
56 // (ie don't use if you've been subclassing the main window)
57  
58 // Version note:
59 //
60 // Added passing of Winamp's main hwnd in the call to the exported winampDSPHeader()
61 // which allows for primarily the use of localisation features with the bundled plugins.
62 // If you want to use the new version then either you can edit you version of dsp.h or
63 // you can add USE_DSP_HDR_HWND to your project's defined list or before use of dsp.h
64 //
65 #endif