-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.h
71 lines (57 loc) · 2.23 KB
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#ifndef __MAIN_H__
#define __MAIN_H__
#include <windows.h>
#include <string>
/* To use this exported function of dll, include this header
* in your project.
*/
#ifdef BUILD_DLL
#define DLL_EXPORT __declspec(dllexport)
#else
#define DLL_EXPORT __declspec(dllimport)
#endif
#define MAX_ZONE_NUM 8
// main structure with plugin information, version, name...
struct winampVisModule{
char *description; // name/title of the plugin
HWND hwndParent; // hwnd of the Winamp client main window (stored by Winamp when dll is loaded)
HINSTANCE hDllInstance; // hinstance of this plugin DLL. (stored by Winamp when dll is loaded)
size_t sRate; // sample rate (filled by winamp)
size_t nCh; // number of channels (filled by winamp)
size_t latencyMs; // latency from call to Renderer to actual drawing
size_t delayMs; // delay between calls to renderer (ms)
//the data is filled in before each render call
size_t spectrumNCh; // number of channels for spectrum data
size_t waveformNCh; // number of chnanles for waveform data
byte spectrumData[2][576]; // Spectrum data
char waveformData[2][576]; // Waveform data
//Functions called by winamp
void (*config)(struct winampVisModule*); // function which will be executed on config event
int (*init)(struct winampVisModule*); // function which will be executed on init event
int (*render)(struct winampVisModule*); // function which will be executed on render event
void (*quit)(struct winampVisModule*); // function which will be executed on quit event
void* userData; // userdata optional
};
struct winampVisHeader {
int version;
char *description;
winampVisModule* (*GetModule)(int which);
};
struct ZoneInfo {
int _Color;
int _Leds;
};
void config(winampVisModule* pVisModule);
int init(winampVisModule* pVisModule);
int render(winampVisModule* pVisModule);
void quit(winampVisModule* pVisModule);
winampVisModule* GetModule(int which);
#ifdef __cplusplus
extern "C"
{
#endif
DLL_EXPORT winampVisHeader* winampVisGetHeader();
#ifdef __cplusplus
}
#endif
#endif // __MAIN_H__