-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwfx.h
60 lines (51 loc) · 1.85 KB
/
wfx.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
//---------------------------------------------------------------------------
#ifndef wfxH
#define wfxH
#include "circbuffer.h"
#include <windows.h>
#include <classes.hpp>
typedef struct winampDSPModule {
char *description; // description
HWND hwndParent; // parent window (filled in by calling app)
HINSTANCE hDllInstance; // instance handle to this DLL (filled in by calling app)
void (*Config)(struct winampDSPModule *this_mod);
int (*Init)(struct winampDSPModule *this_mod);
int (*ModifySamples)(struct winampDSPModule *this_mod, short int *samples, int numsamples, int bps, int nch, int srate);
void (*Quit)(struct winampDSPModule *this_mod);
void *userData;
} winampDSPModule;
typedef struct {
int version; // DSP_HDRVER
char *description; // description of library
winampDSPModule* (*getModule)(int); // module retrieval function
} winampDSPHeader;
// exported symbols
typedef winampDSPHeader* (*winampDSPGetHeaderType)();
// header version: 0x20 == 0.20 == winamp 2.0
#define DSP_HDRVER 0x20
class tWFXThread : public TThread
{
private:
HANDLE inbuffer_event;
HANDLE outbuffer_event;
public:
bool eof;
tCircularBuffer *fxinBuffer;
tCircularBuffer *fxoutBuffer;
HANDLE dspLib;
winampDSPHeader *DSPH;
winampDSPModule *DSPM;
int channels;
int srate;
HANDLE DSPSemafor;
HANDLE endEvent;
__fastcall tWFXThread(tCircularBuffer *pbuffer);
__fastcall ~tWFXThread();
int __fastcall DSPinit(AnsiString dllname);
int __fastcall DSPinitModule(int modulenumber, HANDLE aHandle);
int __fastcall DSPconfig();
int __fastcall DSPquit();
void __fastcall Execute();
};
//---------------------------------------------------------------------------
#endif