Add Russian translation provided by Валерий Крувялис <valkru@mail.ru>
[xiph-mirror.git] / vorbis-plugins / winamp / out.h
blob547113ff60cccf583c4e35c1fe817134f7ef8ff1
1 #define OUT_VER 0x10
3 typedef struct
5 int version; // module version (OUT_VER)
6 char *description; // description of module, with version string
7 int id; // module id. each input module gets its own. non-nullsoft modules should
8 // be >= 65536.
10 HWND hMainWindow; // winamp's main window (filled in by winamp)
11 HINSTANCE hDllInstance; // DLL instance handle (filled in by winamp)
13 void (*Config)(HWND hwndParent); // configuration dialog
14 void (*About)(HWND hwndParent); // about dialog
16 void (*Init)(); // called when loaded
17 void (*Quit)(); // called when unloaded
19 int (*Open)(int samplerate, int numchannels, int bitspersamp, int bufferlenms, int prebufferms);
20 // returns >=0 on success, <0 on failure
21 // NOTENOTENOTE: bufferlenms and prebufferms are ignored in most if not all output plug-ins.
22 // ... so don't expect the max latency returned to be what you asked for.
23 // returns max latency in ms (0 for diskwriters, etc)
24 // bufferlenms and prebufferms must be in ms. 0 to use defaults.
25 // prebufferms must be <= bufferlenms
27 void (*Close)(); // close the ol' output device.
29 int (*Write)(char *buf, int len);
30 // 0 on success. Len == bytes to write (<= 8192 always). buf is straight audio data.
31 // 1 returns not able to write (yet). Non-blocking, always.
33 int (*CanWrite)(); // returns number of bytes possible to write at a given time.
34 // Never will decrease unless you call Write (or Close, heh)
36 int (*IsPlaying)(); // non0 if output is still going or if data in buffers waiting to be
37 // written (i.e. closing while IsPlaying() returns 1 would truncate the song
39 int (*Pause)(int pause); // returns previous pause state
41 void (*SetVolume)(int volume); // volume is 0-255
42 void (*SetPan)(int pan); // pan is -128 to 128
44 void (*Flush)(int t); // flushes buffers and restarts output at time t (in ms)
45 // (used for seeking)
47 int (*GetOutputTime)(); // returns played time in MS
48 int (*GetWrittenTime)(); // returns time written in MS (used for synching up vis stuff)
50 } Out_Module;