Description | Uses | Classes, Interfaces, Objects and Records | Functions and Procedures | Types | Constants | Variables |
ASIO API
version 1.0: first version
version 1.1: added x64 support
Name | Description |
---|---|
packed record ASIOBufferInfo |
|
packed record ASIOCallbacks |
|
packed record ASIOChannelControls |
|
packed record ASIOChannelInfo |
|
packed record ASIOClockSource |
|
packed record ASIODriverInfo |
|
packed record ASIODRVSTRUCT |
|
packed record ASIOInputMonitor |
|
packed record ASIOIoFormat_s |
|
packed record ASIOTime |
|
packed record ASIOTimeCode |
|
packed record AsioTimeInfo |
|
packed record ASIOTransportParameters |
|
Interface IASIO |
ASIO COM Interface |
Class unaAsioBufferProcessor |
– unaAsioBufferProcessor – |
Class unaAsioDriver |
– unaAsioDriver – |
Class unaAsioDriverList |
– unaAsioDriverList – |
function timeGetTime(): DWORD; stdcall; |
function asioChannelType2str(_type: int): string; |
function CLSIDFromString(psz: pwChar; out clsid: TGUID): HResult; stdcall; external 'ole32.dll' name 'CLSIDFromString'; |
function CoInitialize(res: pointer): HResult; stdcall; external 'ole32.dll' name 'CoInitialize'; |
function CoInitializeEx(pvReserved: Pointer; coInit: Longint): HResult; stdcall; external 'ole32.dll' name 'CoInitializeEx'; |
procedure CoUninitialize(); stdcall; external 'ole32.dll' name 'CoUninitialize'; |
function CoCreateInstance(const clsid: CLSID; unkOuter: IUnknown; dwClsContext: Longint; const iid: TIID; out pv): HResult; stdcall; external 'ole32.dll' name 'CoCreateInstance'; |
function timeGetTime(): DWORD; stdcall; |
function asioChannelType2str(_type: int): string; |
– – |
function CLSIDFromString(psz: pwChar; out clsid: TGUID): HResult; stdcall; external 'ole32.dll' name 'CLSIDFromString'; |
– externals – |
function CoInitialize(res: pointer): HResult; stdcall; external 'ole32.dll' name 'CoInitialize'; |
function CoInitializeEx(pvReserved: Pointer; coInit: Longint): HResult; stdcall; external 'ole32.dll' name 'CoInitializeEx'; |
procedure CoUninitialize(); stdcall; external 'ole32.dll' name 'CoUninitialize'; |
function CoCreateInstance(const clsid: CLSID; unkOuter: IUnknown; dwClsContext: Longint; const iid: TIID; out pv): HResult; stdcall; external 'ole32.dll' name 'CoCreateInstance'; |
long = int32; |
force 4 byte alignment - - - - - - - - - - - - - - - - - - - - - - - - - Type definitions - - - - - - - - - - - - - - - - - - - - - - - - - |
ASIOSamples = int64; |
number of samples data type is 64 bit integer |
ASIOTimeStamp = int64; |
Timestamp data type is 64 bit integer, Time format is Nanoseconds. |
pASIOSampleRate = ˆASIOSampleRate; |
Samplerates are expressed in IEEE 754 64 bit double float, native format as host computer |
ASIOSampleRate = double; |
ASIOBool = long; |
Boolean values are expressed as long |
ASIOSampleType = long; |
Sample Types are expressed as long |
ASIOError = long; |
—————————————————————————– - - - - - - - - - - - - - - - - - - - - - - - - - Error codes - - - - - - - - - - - - - - - - - - - - - - - - - |
ASIOTimeCodeFlags = long; |
not enough memory for completing the request ————————————————————————————————— - - - - - - - - - - - - - - - - - - - - - - - - - Time Info support - - - - - - - - - - - - - - - - - - - - - - - - - – – |
pASIOTimeCode = ˆASIOTimeCode; |
– – |
AsioTimeInfoFlags = long; |
– – |
pAsioTimeInfo = ˆAsioTimeInfo; |
– – |
pASIOTime = ˆASIOTime; |
– – |
pASIOClockSource = ˆASIOClockSource; |
optional, evaluated if (timeCode.flags & kTcValid) – – |
pASIOClockSources = ˆASIOClockSources; |
for user selection |
ASIOClockSources = array[byte] of ASIOClockSource; |
proc_bufferSwitch = procedure(index: long; processNow: ASIOBool); cdecl; |
- - - - - - - - - - - - - - - - - - - - - - - - - application's audio stream handler callbacks - - - - - - - - - - - - - - - - - - - - - - - - - |
proc_sampleRateChanged = procedure(sRate: ASIOSampleRate); cdecl; |
proc_asioMessage = function(selector: long; value: long; message: pointer; opt: pDouble): long; cdecl; |
proc_bufferSwitchTimeInfo = function(timeInfo: pASIOTime; index: long; processNow: ASIOBool): pASIOTime; cdecl; |
pASIOCallbacks = ˆASIOCallbacks; |
pASIODriverInfo = ˆASIODriverInfo; |
? ————————————————————————————————— - - - - - - - - - - - - - - - - - - - - - - - - - (De-)Construction - - - - - - - - - - - - - - - - - - - - - - - - - |
pASIOChannelInfo = ˆASIOChannelInfo; |
on input: system reference (Windows: application main window handle, Mac & SGI: 0) |
pASIOBufferInfo = ˆASIOBufferInfo; |
dto - - - - - - - - - - - - - - - - - - - - - - - - - Buffer preparation - - - - - - - - - - - - - - - - - - - - - - - - - |
pASIOInputMonitor = ˆASIOInputMonitor; |
ASIOIoFormat * in params. */ – – |
pASIOChannelControls = ˆASIOChannelControls; |
suggested pan, 0 => all left, 0x7fffffff => right – – |
pASIOTransportParameters = ˆASIOTransportParameters; |
– – |
ASIOIoFormatType = long; |
trackSwitches |
pASIOIoFormat_s = ˆASIOIoFormat_s; |
ASIOIoFormat = ASIOIoFormat_s; |
bufferSwitchEvent = procedure(sender: tObject; index: long; processNow: bool) of object; |
callback events prototypes |
sampleRateChangedEvent = procedure(sender: tObject; rate: ASIOSampleRate) of object; |
asioMessageEvent = procedure(sender: tObject; selector: long; value: long; message: pointer; opt: pDouble; out result: long) of object; |
bufferSwitchTimeInfoEvent = procedure(sender: tObject; timeInfo: pASIOTime; index: long; processNow: bool; time: pASIOTime) of object; |
unaASIOSampleOp = (...); |
Values
|
unaASIODriverState = (...); |
Values
|
CLSID = TGUID; |
TIID = TGUID; |
pASIODRVSTRUCT = ˆASIODRVSTRUCT; |
ASE_HWMalfunction = ASE_NotPresent + 1; |
hardware input or output is not present or available |
ASE_InvalidMode = ASE_NotPresent + 3; |
input parameter invalid |
ASE_InvalidParameter = ASE_NotPresent + 2; |
hardware is malfunctioning (can be returned by any ASIO function) |
ASE_NoClock = ASE_NotPresent + 5; |
hardware is not running when sample position is inquired |
ASE_NoMemory = ASE_NotPresent + 6; |
sample clock or rate cannot be determined or is not present |
ASE_NotPresent = -1000; |
unique success return value for ASIOFuture calls |
ASE_OK = 0; |
ASE_SPNotAdvancing = ASE_NotPresent + 4; |
hardware is in a bad mode or used in a bad mode |
ASE_SUCCESS = $3f4847a0; |
This value will be returned whenever the call succeeded |
ASIOFalse = 0; |
ASIOSTDSDInt8LSB1 = 32; |
32 bit data with 24 bit alignment ASIO DSD format. |
ASIOSTDSDInt8MSB1 = 33; |
DSD 1 bit data, 8 samples per byte. First sample in Least significant bit. |
ASIOSTDSDInt8NER8 = 40; |
DSD 1 bit data, 8 samples per byte. First sample in Most significant bit. |
ASIOSTFloat32LSB = 19; |
ASIOSTFloat32MSB = 3; |
ASIOSTFloat64LSB = 20; |
IEEE 754 32 bit float, as found on Intel x86 architecture |
ASIOSTFloat64MSB = 4; |
IEEE 754 32 bit float |
ASIOSTInt16LSB = 16; |
32 bit data with 24 bit alignment |
ASIOSTInt16MSB = 0; |
ASIOSTInt24LSB = 17; |
ASIOSTInt24MSB = 1; |
ASIOSTInt32LSB = 18; |
used for 20 bits as well |
ASIOSTInt32LSB18 = 25; |
32 bit data with 18 bit alignment |
ASIOSTInt32LSB20 = 26; |
32 bit data with 18 bit alignment |
ASIOSTInt32LSB24 = 27; |
32 bit data with 20 bit alignment |
ASIOSTInt32MSB = 2; |
used for 20 bits as well |
ASIOSTInt32MSB16 = 8; |
IEEE 754 64 bit double float these are used for 32 bit data buffer, with different alignment of the data inside 32 bit PCI bus systems can be more easily used with these |
ASIOSTInt32MSB18 = 9; |
32 bit data with 18 bit alignment |
ASIOSTInt32MSB20 = 10; |
32 bit data with 18 bit alignment |
ASIOSTInt32MSB24 = 11; |
32 bit data with 20 bit alignment |
ASIOSTLastEntry = ASIOSTDSDInt8NER8 + 1; |
DSD 8 bit data, 1 sample per byte. No Endianness required. |
ASIOTrue = 1; |
CLSCTX_INPROC_HANDLER = 2; |
CLSCTX_INPROC_HANDLER16 = $20; |
CLSCTX_INPROC_HANDLERX86 = $80; |
CLSCTX_INPROC_SERVER = 1; |
Trade memory for speed. |
CLSCTX_INPROC_SERVER16 = 8; |
CLSCTX_INPROC_SERVERX86 = $40; |
CLSCTX_LOCAL_SERVER = 4; |
CLSCTX_REMOTE_SERVER = $10; |
cofs_canSampleRate = cofs_init + 4 * 9; |
cofs_controlPanel = cofs_init + 4 * 18; |
cofs_createBuffers = cofs_init + 4 * 16; |
cofs_disposeBuffers = cofs_init + 4 * 17; |
cofs_future = cofs_init + 4 * 19; |
cofs_getBufferSize = cofs_init + 4 * 8; |
cofs_getChannelInfo = cofs_init + 4 * 15; |
cofs_getChannels = cofs_init + 4 * 6; |
cofs_getClockSources = cofs_init + 4 * 12; |
cofs_getDriverName = cofs_init + 4 * 1; |
cofs_getDriverVersion = cofs_init + 4 * 2; |
cofs_getErrorMessage = cofs_init + 4 * 3; |
cofs_getLatencies = cofs_init + 4 * 7; |
cofs_getSamplePosition = cofs_init + 4 * 14; |
cofs_getSampleRate = cofs_init + 4 * 10; |
cofs_init = 12; |
—— iasiodrv.h —– |
cofs_outputReady = cofs_init + 4 * 20; |
cofs_setClockSource = cofs_init + 4 * 13; |
cofs_setSampleRate = cofs_init + 4 * 11; |
cofs_start = cofs_init + 4 * 4; |
cofs_stop = cofs_init + 4 * 5; |
COINIT_APARTMENTTHREADED = 2; |
OLE calls objects on any thread. |
COINIT_DISABLE_OLE1DDE = 4; |
Apartment model |
COINIT_MULTITHREADED = 0; |
flags passed as the coInit parameter to CoInitializeEx. |
COINIT_SPEED_OVER_MEMORY = 8; |
Dont use DDE for Ole1 support. |
DRVERR = -5000; |
———– asiolist.h ————- |
DRVERR_DEVICE_ALREADY_OPEN = DRVERR - 2; |
DRVERR_DEVICE_NOT_FOUND = DRVERR - 3; |
DRVERR_INVALID_PARAM = DRVERR - 1; |
kAsioCanDoIoFormat = $23112004; |
ASIOIoFormat * in params. */ |
kAsioCanInputGain = 13; |
kAsioCanInputMeter = 14; |
kAsioCanInputMonitor = 9; |
ASIOChannelControls* in params, fill meter |
kAsioCanOutputGain = 15; |
kAsioCanOutputMeter = 16; |
kAsioCanTimeCode = 11; |
kAsioCanTimeInfo = 10; |
no arguments for kAsioCanXXX selectors |
kAsioCanTransport = 12; |
kAsioDisableTimeCodeRead = 2; |
no arguments |
kASIODSDFormat = 1; |
kAsioEnableTimeCodeRead = 1; |
on output: double buffer addresses future selectors |
kAsioEngineVersion = 2; |
selector in <value>, returns 1L if supported, 0 otherwise |
kASIOFormatInvalid = -1; |
enum ASIOIoFormatType_e |
kAsioGetInputMeter = 6; |
ASIOChannelControls* in params, apply gain |
kAsioGetIoFormat = $23111983; |
ASIOIoFormat * in params. */ |
kAsioGetOutputMeter = 8; |
ASIOChannelControls* in params, apply gain |
kAsioMMCCommand = 9; |
? |
kAsioNumMessageSelectors = 16; |
driver detected an overload |
kAsioOverload = 15; |
unused and undefined |
kASIOPCMFormat = 0; |
kAsioResetRequest = 3; |
returns engine (host) asio implementation version, 2 or higher |
kAsioSelectorSupported = 1; |
asioMessage selectors |
kAsioSetInputGain = 5; |
ASIOTransportParameters* in params |
kAsioSetInputMonitor = 3; |
no arguments |
kAsioSetIoFormat = $23111961; |
DSD support The following extensions are required to allow switching and control of the DSD subsystem. |
kAsioSetOutputGain = 7; |
ASIOChannelControls* in params, fill meter |
kAsioSupportsInputGain = 11; |
kAsioSupportsXXX return 1 if host supports this |
kAsioSupportsInputMeter = 12; |
unused and undefined |
kAsioSupportsInputMonitor = 10; |
unused - value: number of commands, message points to mmc commands |
kAsioSupportsOutputGain = 13; |
unused and undefined |
kAsioSupportsOutputMeter = 14; |
unused and undefined |
kAsioSupportsTimeCode = 8; |
if host returns true here, it will expect the callback bufferSwitchTimeInfo to be called instead of bufferSwitch |
kAsioSupportsTimeInfo = 7; |
the drivers latencies have changed. The engine will refetch the latencies. |
kAsioTransport = 4; |
ASIOInputMonitor* in params |
kClockSourceChanged = 1 shl 5; |
kMaxInputChannels = 256; |
number of input and outputs supported by the host application you can change these to higher or lower values |
kMaxOutputChannels = 256; |
kSamplePositionValid = 1 shl 1; |
must always be valid |
kSampleRateChanged = 1 shl 4; |
kSampleRateValid = 1 shl 2; |
must always be valid |
kSpeedValid = 1 shl 3; |
kSystemTimeValid = 1; |
kTcOnspeed = 1 shl 3; |
kTcReverse = 1 shl 2; |
kTcRunning = 1 shl 1; |
kTcSpeedValid = 1 shl 8; |
kTcStill = 1 shl 4; |
kTcValid = 1; |
kTransArm = 10; |
track |
kTransArmOff = 7; |
track |
kTransArmOn = 6; |
kTransLocate = 3; |
kTransMonitor = 11; |
trackSwitches |
kTransMonitorOff = 9; |
track |
kTransMonitorOn = 8; |
track |
kTransPunchIn = 4; |
to samplePosition |
kTransPunchOut = 5; |
kTransStart = 1; |
kTransStop = 2; |
MAXDRVNAMELEN = 128; |
MAXPATHLEN = 512; |
(c) 2012 Lake of Soft