1 /* Standard Winamp output-plugin header
8 int version; // module version (OUT_VER)
9 char *description; // description of module, with version string
10 int id; // module id. each input module gets its own. non-nullsoft modules should
13 HWND hMainWindow; // winamp's main window (filled in by winamp)
14 HINSTANCE hDllInstance; // DLL instance handle (filled in by winamp)
16 void (*Config)(HWND hwndParent); // configuration dialog
17 void (*About)(HWND hwndParent); // about dialog
19 void (*Init)(); // called when loaded
20 void (*Quit)(); // called when unloaded
22 int (*Open)(int samplerate, int numchannels, int bitspersamp, int bufferlenms, int prebufferms);
23 // returns >=0 on success, <0 on failure
24 // NOTENOTENOTE: bufferlenms and prebufferms are ignored in most if not all output plug-ins.
25 // ... so don't expect the max latency returned to be what you asked for.
26 // returns max latency in ms (0 for diskwriters, etc)
27 // bufferlenms and prebufferms must be in ms. 0 to use defaults.
28 // prebufferms must be <= bufferlenms
30 void (*Close)(); // close the ol' output device.
32 int (*Write)(char *buf, int len);
33 // 0 on success. Len == bytes to write (<= 8192 always). buf is straight audio data.
34 // 1 returns not able to write (yet). Non-blocking, always.
36 int (*CanWrite)(); // returns number of bytes possible to write at a given time.
37 // Never will decrease unless you call Write (or Close, heh)
39 int (*IsPlaying)(); // non0 if output is still going or if data in buffers waiting to be
40 // written (i.e. closing while IsPlaying() returns 1 would truncate the song
42 int (*Pause)(int pause); // returns previous pause state
44 void (*SetVolume)(int volume); // volume is 0-255
45 void (*SetPan)(int pan); // pan is -128 to 128
47 void (*Flush)(int t); // flushes buffers and restarts output at time t (in ms)
50 int (*GetOutputTime)(); // returns played time in MS
51 int (*GetWrittenTime)(); // returns time written in MS (used for synching up vis stuff)