Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.2KB

  1. /*
  2. Steinberg Audio Stream I/O API
  3. (c) 1996, Steinberg Soft- und Hardware GmbH
  4. charlie (May 1996)
  5. asiodrvr.h
  6. c++ superclass to implement asio functionality. from this,
  7. you can derive whatever required
  8. */
  9. #ifndef _asiodrvr_
  10. #define _asiodrvr_
  11. // cpu and os system we are running on
  12. #include "asiosys.h"
  13. // basic "C" interface
  14. #include "asio.h"
  15. class AsioDriver;
  16. extern AsioDriver *getDriver(); // for generic constructor
  17. #if WINDOWS
  18. #include <windows.h>
  19. #include "combase.h"
  20. #include "iasiodrv.h"
  21. class AsioDriver : public IASIO ,public CUnknown
  22. {
  23. public:
  24. AsioDriver(LPUNKNOWN pUnk, HRESULT *phr);
  25. DECLARE_IUNKNOWN
  26. // Factory method
  27. static CUnknown *CreateInstance(LPUNKNOWN pUnk, HRESULT *phr);
  28. // IUnknown
  29. virtual HRESULT STDMETHODCALLTYPE NonDelegatingQueryInterface(REFIID riid,void **ppvObject);
  30. #else
  31. class AsioDriver
  32. {
  33. public:
  34. AsioDriver();
  35. #endif
  36. virtual ~AsioDriver();
  37. virtual ASIOBool init(void* sysRef);
  38. virtual void getDriverName(char *name); // max 32 bytes incl. terminating zero
  39. virtual long getDriverVersion();
  40. virtual void getErrorMessage(char *string); // max 124 bytes incl.
  41. virtual ASIOError start();
  42. virtual ASIOError stop();
  43. virtual ASIOError getChannels(long *numInputChannels, long *numOutputChannels);
  44. virtual ASIOError getLatencies(long *inputLatency, long *outputLatency);
  45. virtual ASIOError getBufferSize(long *minSize, long *maxSize,
  46. long *preferredSize, long *granularity);
  47. virtual ASIOError canSampleRate(ASIOSampleRate sampleRate);
  48. virtual ASIOError getSampleRate(ASIOSampleRate *sampleRate);
  49. virtual ASIOError setSampleRate(ASIOSampleRate sampleRate);
  50. virtual ASIOError getClockSources(ASIOClockSource *clocks, long *numSources);
  51. virtual ASIOError setClockSource(long reference);
  52. virtual ASIOError getSamplePosition(ASIOSamples *sPos, ASIOTimeStamp *tStamp);
  53. virtual ASIOError getChannelInfo(ASIOChannelInfo *info);
  54. virtual ASIOError createBuffers(ASIOBufferInfo *bufferInfos, long numChannels,
  55. long bufferSize, ASIOCallbacks *callbacks);
  56. virtual ASIOError disposeBuffers();
  57. virtual ASIOError controlPanel();
  58. virtual ASIOError future(long selector, void *opt);
  59. virtual ASIOError outputReady();
  60. };
  61. #endif