rtoss - Blame information for rev 182

Subversion Repositories:
Rev:
Rev Author Line No. Line
182 roytam 1 #ifndef NULLSOFT_OUTH
2 #define NULLSOFT_OUTH
3 #include <windows.h>
4 #include <stddef.h>
181 roytam 5 // ids:
6 // waveout: 32
7 // gapless: 64
8 // xfade: 63
9 // disk: 33
10 // dsound: 38
11 // NULL: 65
12 // mm2: 69
13  
182 roytam 14 #if (_MSC_VER <= 1200)
15 typedef int intptr_t;
16 #endif
17  
181 roytam 18 #define OUT_VER 0x10
19  
20 typedef struct
21 {
22 int version; // module version (OUT_VER)
23 char *description; // description of module, with version string
182 roytam 24 intptr_t id; // module id. each input module gets its own. non-nullsoft modules should
181 roytam 25 // be >= 65536.
26  
27 HWND hMainWindow; // winamp's main window (filled in by winamp)
28 HINSTANCE hDllInstance; // DLL instance handle (filled in by winamp)
29  
30 void (*Config)(HWND hwndParent); // configuration dialog
31 void (*About)(HWND hwndParent); // about dialog
32  
33 void (*Init)(); // called when loaded
34 void (*Quit)(); // called when unloaded
35  
36 int (*Open)(int samplerate, int numchannels, int bitspersamp, int bufferlenms, int prebufferms);
37 // returns >=0 on success, <0 on failure
182 roytam 38  
181 roytam 39 // NOTENOTENOTE: bufferlenms and prebufferms are ignored in most if not all output plug-ins.
40 // ... so don't expect the max latency returned to be what you asked for.
41 // returns max latency in ms (0 for diskwriters, etc)
42 // bufferlenms and prebufferms must be in ms. 0 to use defaults.
43 // prebufferms must be <= bufferlenms
182 roytam 44 // pass bufferlenms==-666 to tell the output plugin that it's clock is going to be used to sync video
45 // out_ds turns off silence-eating when -666 is passed
181 roytam 46  
47 void (*Close)(); // close the ol' output device.
48  
49 int (*Write)(char *buf, int len);
50 // 0 on success. Len == bytes to write (<= 8192 always). buf is straight audio data.
51 // 1 returns not able to write (yet). Non-blocking, always.
52  
53 int (*CanWrite)(); // returns number of bytes possible to write at a given time.
54 // Never will decrease unless you call Write (or Close, heh)
55  
56 int (*IsPlaying)(); // non0 if output is still going or if data in buffers waiting to be
57 // written (i.e. closing while IsPlaying() returns 1 would truncate the song
58  
59 int (*Pause)(int pause); // returns previous pause state
60  
61 void (*SetVolume)(int volume); // volume is 0-255
62 void (*SetPan)(int pan); // pan is -128 to 128
63  
64 void (*Flush)(int t); // flushes buffers and restarts output at time t (in ms)
65 // (used for seeking)
66  
67 int (*GetOutputTime)(); // returns played time in MS
68 int (*GetWrittenTime)(); // returns time written in MS (used for synching up vis stuff)
69  
70 } Out_Module;
71  
72  
182 roytam 73 #endif