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