PageRenderTime 39ms CodeModel.GetById 35ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/plugins/spu2-x/src/Windows/dsp.h

https://github.com/Icelight/pcsx2
C Header | 58 lines | 18 code | 11 blank | 29 comment | 0 complexity | 7b37278d01e1d93c0089f348678626b9 MD5 | raw file
Possible License(s): GPL-2.0, GPL-3.0, LGPL-2.1, LGPL-3.0, BSD-3-Clause, AGPL-1.0
 1//GiGaHeRz's SPU2 Driver
 2//Copyright (c) 2003-2008, David Quintana <gigaherz@gmail.com>
 3//
 4//This library is free software; you can redistribute it and/or
 5//modify it under the terms of the GNU Lesser General Public
 6//License as published by the Free Software Foundation; either
 7//version 2.1 of the License, or (at your option) any later version.
 8//
 9//This library is distributed in the hope that it will be useful,
10//but WITHOUT ANY WARRANTY; without even the implied warranty of
11//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12//Lesser General Public License for more details.
13//
14//You should have received a copy of the GNU Lesser General Public
15//License along with this library; if not, write to the Free Software
16//Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
17//
18
19// DSP plugin interface
20
21// notes:
22// any window that remains in foreground should optimally pass unused
23// keystrokes to the parent (winamp's) window, so that the user
24// can still control it. As for storing configuration,
25// Configuration data should be stored in <dll directory>\plugin.ini
26// (look at the vis plugin for configuration code)
27
28#pragma once
29
30typedef struct winampDSPModule {
31  char *description;		// description
32  HWND hwndParent;			// parent window (filled in by calling app)
33  HINSTANCE hDllInstance;	// instance handle to this DLL (filled in by calling app)
34
35  void (*Config)(struct winampDSPModule *this_mod);  // configuration dialog (if needed)
36  int (*Init)(struct winampDSPModule *this_mod);     // 0 on success, creates window, etc (if needed)
37
38  // modify waveform samples: returns number of samples to actually write
39  // (typically numsamples, but no more than twice numsamples, and no less than half numsamples)
40  // numsamples should always be at least 128. should, but I'm not sure
41  int (*ModifySamples)(struct winampDSPModule *this_mod, short int *samples, int numsamples, int bps, int nch, int srate);
42
43  void (*Quit)(struct winampDSPModule *this_mod);    // called when unloading
44
45  void *userData; // user data, optional
46} winampDSPModule;
47
48typedef struct {
49  int version;       // DSP_HDRVER
50  char *description; // description of library
51  winampDSPModule* (*getModule)(int);	// module retrieval function
52} winampDSPHeader;
53
54// exported symbols
55typedef winampDSPHeader* (*winampDSPGetHeaderType)();
56
57// header version: 0x20 == 0.20 == winamp 2.0
58#define DSP_HDRVER 0x20