unit
  In_drv;

{$DEFINE DEBUG}

(*
 * TODO: dynamic driver loading
 *)

interface

uses
  LibV;

const
  DRV_DLL               = 'in_wave\in_wave.dll';

type
  databuf_p             = ^databuf_t;
  databuf_t             = record
    ld                  : vec_t_array_p;
    rd                  : vec_t_array_p;
    ls                  : vec_t_array_p;
    rs                  : vec_t_array_p;
  end;

  minmaxinfo_p          = ^minmaxinfo_t;
  minmaxinfo_t          = record
    ld_minmax           : vec2_t;
    rd_minmax           : vec2_t;
    ls_minmax           : vec2_t;
    rs_minmax           : vec2_t;
  end;

function  drvBeginProcessing(block_size,num_channels,frequency:u32_t;
  OnProgress:TDrvProgress;OnProgressArg:pointer):vboolean;
  stdcall;external DRV_DLL;
procedure drvEndProcessing;stdcall;external DRV_DLL;
function  drvGetData(var mmi:minmaxinfo_t):databuf_p;
    stdcall;external DRV_DLL;
function  drvGetRanges(var timedomain_ranges,freqdomain_ranges:vec2_t):
    vboolean;stdcall;external DRV_DLL;
procedure drvCommand(cmd : PChar);stdcall;external DRV_DLL;

implementation

{$IFDEF DEBUG}
initialization
  logStartConsoleLog();
  logUpperLevel(LOG_TRACE);
finalization
  logStopConsoleLog();
{$ENDIF}
end.

