PageRenderTime 44ms CodeModel.GetById 9ms RepoModel.GetById 0ms 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. // DSP plugin interface
  19. // notes:
  20. // any window that remains in foreground should optimally pass unused
  21. // keystrokes to the parent (winamp's) window, so that the user
  22. // can still control it. As for storing configuration,
  23. // Configuration data should be stored in <dll directory>\plugin.ini
  24. // (look at the vis plugin for configuration code)
  25. #pragma once
  26. typedef struct winampDSPModule {
  27. char *description; // description
  28. HWND hwndParent; // parent window (filled in by calling app)
  29. HINSTANCE hDllInstance; // instance handle to this DLL (filled in by calling app)
  30. void (*Config)(struct winampDSPModule *this_mod); // configuration dialog (if needed)
  31. int (*Init)(struct winampDSPModule *this_mod); // 0 on success, creates window, etc (if needed)
  32. // modify waveform samples: returns number of samples to actually write
  33. // (typically numsamples, but no more than twice numsamples, and no less than half numsamples)
  34. // numsamples should always be at least 128. should, but I'm not sure
  35. int (*ModifySamples)(struct winampDSPModule *this_mod, short int *samples, int numsamples, int bps, int nch, int srate);
  36. void (*Quit)(struct winampDSPModule *this_mod); // called when unloading
  37. void *userData; // user data, optional
  38. } winampDSPModule;
  39. typedef struct {
  40. int version; // DSP_HDRVER
  41. char *description; // description of library
  42. winampDSPModule* (*getModule)(int); // module retrieval function
  43. } winampDSPHeader;
  44. // exported symbols
  45. typedef winampDSPHeader* (*winampDSPGetHeaderType)();
  46. // header version: 0x20 == 0.20 == winamp 2.0
  47. #define DSP_HDRVER 0x20