rtoss - Diff between revs 181 and 182

Subversion Repositories:
Rev:
Show entire file - Ignore whitespace
Rev 181 Rev 182
Line -... Line 1...
-   1
-   2 #ifndef NULLSOFT_WINAMP_IN2H
-   3 #define NULLSOFT_WINAMP_IN2H
1 #include "out.h" 4 #include "out.h"
2 5
3 // note: exported symbol is now winampGetInModule2. 6 // note: exported symbol is now winampGetInModule2.
4 7
-   8 #define IN_UNICODE 0x0F000000
-   9
-   10 #ifdef UNICODE_INPUT_PLUGIN
-   11 #define in_char wchar_t
-   12 #define IN_VER (IN_UNICODE | 0x100)
-   13 #else
-   14 #define in_char char
5 #define IN_VER 0x100 15 #define IN_VER 0x100
-   16 #endif
6 17
-   18 #define IN_MODULE_FLAG_USES_OUTPUT_PLUGIN 1
-   19 // By default, Winamp assumes that your input plugin wants to use Winamp's EQ, and doesn't do replay gain
-   20 // if you handle any of these yourself (EQ, Replay Gain adjustments), then set these flags accordingly
-   21 #define IN_MODULE_FLAG_EQ 2 // set this if you do your own EQ
-   22 #define IN_MODULE_FLAG_REPLAYGAIN 8 // set this if you adjusted volume for replay gain
-   23 // for tracks with no replay gain metadata, you should clear this flag
-   24 // UNLESS you handle "non_replaygain" gain adjustment yourself
-   25 #define IN_MODULE_FLAG_REPLAYGAIN_PREAMP 16 // use this if you queried for the replay gain preamp parameter and used it
-   26 // this parameter is new to 5.54
7 typedef struct 27 typedef struct
8 { 28 {
9 int version; // module type (IN_VER) 29 int version; // module type (IN_VER)
10 char *description; // description of module, with version string 30 char *description; // description of module, with version string
11 31
Line 15... Line 35...
15 char *FileExtensions; // "mp3\0Layer 3 MPEG\0mp2\0Layer 2 MPEG\0mpg\0Layer 1 MPEG\0" 35 char *FileExtensions; // "mp3\0Layer 3 MPEG\0mp2\0Layer 2 MPEG\0mpg\0Layer 1 MPEG\0"
16 // May be altered from Config, so the user can select what they want 36 // May be altered from Config, so the user can select what they want
17 37
18 int is_seekable; // is this stream seekable? 38 int is_seekable; // is this stream seekable?
19 int UsesOutputPlug; // does this plug-in use the output plug-ins? (musn't ever change, ever :) 39 int UsesOutputPlug; // does this plug-in use the output plug-ins? (musn't ever change, ever :)
-   40 // note that this has turned into a "flags" field
-   41 // see IN_MODULE_FLAG_*
20 42
21 void (*Config)(HWND hwndParent); // configuration dialog 43 void (*Config)(HWND hwndParent); // configuration dialog
22 void (*About)(HWND hwndParent); // about dialog 44 void (*About)(HWND hwndParent); // about dialog
23 45
24 void (*Init)(); // called at program init 46 void (*Init)(); // called at program init
25 void (*Quit)(); // called at program quit 47 void (*Quit)(); // called at program quit
26 48
27 void (*GetFileInfo)(char *file, char *title, int *length_in_ms); // if file == NULL, current playing is used -  
28 int (*InfoBox)(char *file, HWND hwndParent); -  
-   49 #define GETFILEINFO_TITLE_LENGTH 2048
-   50 void (*GetFileInfo)(const in_char *file, in_char *title, int *length_in_ms); // if file == NULL, current playing is used
-   51
-   52 #define INFOBOX_EDITED 0
-   53 #define INFOBOX_UNCHANGED 1
-   54 int (*InfoBox)(const in_char *file, HWND hwndParent);
29 55
30 int (*IsOurFile)(char *fn); // called before extension checks, to allow detection of mms://, etc -  
-   56 int (*IsOurFile)(const in_char *fn); // called before extension checks, to allow detection of mms://, etc
31 // playback stuff 57 // playback stuff
32 int (*Play)(char *fn); // return zero on success, -1 on file-not-found, some other value on other (stopping winamp) error -  
-   58 int (*Play)(const in_char *fn); // return zero on success, -1 on file-not-found, some other value on other (stopping winamp) error
33 void (*Pause)(); // pause stream 59 void (*Pause)(); // pause stream
34 void (*UnPause)(); // unpause stream 60 void (*UnPause)(); // unpause stream
35 int (*IsPaused)(); // ispaused? return 1 if paused, 0 if not 61 int (*IsPaused)(); // ispaused? return 1 if paused, 0 if not
36 void (*Stop)(); // stop (unload) stream 62 void (*Stop)(); // stop (unload) stream
37 63
38 // time stuff 64 // time stuff
39 int (*GetLength)(); // get length in ms 65 int (*GetLength)(); // get length in ms
40 int (*GetOutputTime)(); // returns current output time in ms. (usually returns outMod->GetOutputTime() 66 int (*GetOutputTime)(); // returns current output time in ms. (usually returns outMod->GetOutputTime()
41 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().. -  
-   67 void (*SetOutputTime)(int time_in_ms); // seeks to point in stream (in ms). Usually you signal your thread to seek, which seeks and calls outMod->Flush()..
42 68
43 // volume stuff 69 // volume stuff
44 void (*SetVolume)(int volume); // from 0 to 255.. usually just call outMod->SetVolume 70 void (*SetVolume)(int volume); // from 0 to 255.. usually just call outMod->SetVolume
45 void (*SetPan)(int pan); // from -127 to 127.. usually just call outMod->SetPan 71 void (*SetPan)(int pan); // from -127 to 127.. usually just call outMod->SetPan
46 72
Line 58... Line 84...
58 // needs at least 576 samples :) 84 // needs at least 576 samples :)
59 85
60 // advanced vis supplying mode, only use if you're cool. Use SAAddPCMData for most stuff. 86 // advanced vis supplying mode, only use if you're cool. Use SAAddPCMData for most stuff.
61 int (*SAGetMode)(); // gets csa (the current type (4=ws,2=osc,1=spec)) 87 int (*SAGetMode)(); // gets csa (the current type (4=ws,2=osc,1=spec))
62 // use when calling SAAdd() 88 // use when calling SAAdd()
63 void (*SAAdd)(void *data, int timestamp, int csa); // sets the spec data, filled in by winamp -  
-   89 int (*SAAdd)(void *data, int timestamp, int csa); // sets the spec data, filled in by winamp
64 90
65 91
66 // vis stuff (plug-in) 92 // vis stuff (plug-in)
67 // simple vis supplying mode 93 // simple vis supplying mode
68 void (*VSAAddPCMData)(void *PCMData, int nch, int bps, int timestamp); // sets the vis data directly from PCM data 94 void (*VSAAddPCMData)(void *PCMData, int nch, int bps, int timestamp); // sets the vis data directly from PCM data
69 // quick and easy way to get vis working :) 95 // quick and easy way to get vis working :)
70 // needs at least 576 samples :) 96 // needs at least 576 samples :)
71 97
72 // advanced vis supplying mode, only use if you're cool. Use VSAAddPCMData for most stuff. 98 // advanced vis supplying mode, only use if you're cool. Use VSAAddPCMData for most stuff.
73 int (*VSAGetMode)(int *specNch, int *waveNch); // use to figure out what to give to VSAAdd 99 int (*VSAGetMode)(int *specNch, int *waveNch); // use to figure out what to give to VSAAdd
74 void (*VSAAdd)(void *data, int timestamp); // filled in by winamp, called by plug-in -  
-   100 int (*VSAAdd)(void *data, int timestamp); // filled in by winamp, called by plug-in
75 101
76 102
77 // call this in Play() to tell the vis plug-ins the current output params. 103 // call this in Play() to tell the vis plug-ins the current output params.
78 void (*VSASetInfo)(int nch, int srate); -  
-   104 void (*VSASetInfo)(int srate, int nch); // <-- Correct (benski, dec 2005).. old declaration had the params backwards
79 105
80 106
81 // dsp plug-in processing: 107 // dsp plug-in processing:
82 // (filled in by winamp, called by input plug) -  
-   108 // (filled in by winamp, calld by input plug)
83 109
84 // returns 1 if active (which means that the number of samples returned by dsp_dosamples 110 // returns 1 if active (which means that the number of samples returned by dsp_dosamples
85 // could be greater than went in.. Use it to estimate if you'll have enough room in the 111 // could be greater than went in.. Use it to estimate if you'll have enough room in the
86 // output buffer 112 // output buffer
87 int (*dsp_isactive)(); 113 int (*dsp_isactive)();
Line 98... Line 124...
98 void (*SetInfo)(int bitrate, int srate, int stereo, int synched); // if -1, changes ignored? :) 124 void (*SetInfo)(int bitrate, int srate, int stereo, int synched); // if -1, changes ignored? :)
99 125
100 Out_Module *outMod; // filled in by winamp, optionally used :) 126 Out_Module *outMod; // filled in by winamp, optionally used :)
101 } In_Module; 127 } In_Module;
102 128
-   129 // return values from the winampUninstallPlugin(HINSTANCE hdll, HWND parent, int param)
-   130 // which determine if we can uninstall the plugin immediately or on winamp restart
-   131 //
-   132 // uninstall support was added from 5.0+ and uninstall now support from 5.5+
-   133 // it is down to you to ensure that if uninstall now is returned that it will not cause a crash
-   134 // (ie don't use if you've been subclassing the main window)
-   135 #define IN_PLUGIN_UNINSTALL_NOW 0x1
-   136 #define IN_PLUGIN_UNINSTALL_REBOOT 0x0
103 137
-   138 #endif