Description | Hierarchy | Fields | Methods | Properties |
type unaDSPLibAutomat = class(unaObject)
Universal DSP automat.
constructor create(root: unaDspLibAbstract); |
|
function automatLoad(const config: string): HRESULT; overload; |
|
function automatLoad(ini: unaIniAbstractStorage; const sectionName: string = c_defAutomatSection): HRESULT; overload; |
|
function automatSave(ini: unaIniAbstractStorage = nil; const sectionName: string = ''): HRESULT; overload; |
|
function automatSave(out config: string): HRESULT; overload; |
|
function bytes2samples(numBytes: int): int; |
|
function dspl_objCount(): int; |
|
function dspl_objDrop(index: int): dspl_result; |
|
function dspl_objGet(index: int): dspl_handle; |
|
function dspl_objIndex(obj: dspl_handle): int; |
|
function dspl_objNew(objID: int): dspl_handle; |
|
function dspl_objSwap(index1, index2: int): dspl_result; |
|
function dspl_obj_getf(obj: dspl_handle; channel: int; param_id: int; out fp: dspl_float): dspl_result; overload; |
|
function dspl_obj_setc(obj: dspl_handle; param_id: int; fp: pdspl_float; len: dspl_int): dspl_result; overload; |
|
function dspl_obj_setc(obj: dspl_handle; param_id: int; const value: dspl_chunk): dspl_result; overload; |
|
function dspl_obj_setf(obj: dspl_handle; param_id: int; value: dspl_float): dspl_result; |
|
function dspl_obj_seti(obj: dspl_handle; param_id: int; value: dspl_int): dspl_result; |
|
function getMultiOutData(channel: unsigned; n: unsigned; out data: pdspl_float; out nSamples: unsigned): HRESULT; |
|
function getOutData(channel: unsigned; out data: pdspl_float; out nSamples: unsigned): HRESULT; |
|
function processChunk(data: pointer; len: unsigned; channel: int = -1; nSamples: int = -1; writeOutput: bool = true): HRESULT; |
|
function setFormat(rate, bits, channels: int; isSubAuto: bool = false): HRESULT; |
|
procedure AfterConstruction(); override; |
|
procedure BeforeDestruction(); override; |
property root: unaDspLibAbstract read f_root; |
constructor create(root: unaDspLibAbstract); |
|
function automatLoad(const config: string): HRESULT; overload; |
|
// Loads the automat configuration from a string. |
function automatLoad(ini: unaIniAbstractStorage; const sectionName: string = c_defAutomatSection): HRESULT; overload; |
|
// Loads the automat configuration from a ini storage. |
function automatSave(ini: unaIniAbstractStorage = nil; const sectionName: string = ''): HRESULT; overload; |
|
// Saves the automat configuration. If unaIniAbstractStorage is nil (default) the one provided in last call of automatLoad() will be used. If automatLoad() was not called before, the funtion will fail. // If sectionName is '' (default) the name provided in automatLoad() will be used. If automatLoad() was not called before, c_defAutomatSection will be used as section name. |
function automatSave(out config: string): HRESULT; overload; |
|
// Saves the automat configuration as a string. |
function bytes2samples(numBytes: int): int; |
|
Returns number of audio samples which can be stored in specified number of bytes. |
function dspl_objCount(): int; |
|
Returns number of DSPLib objects. |
function dspl_objDrop(index: int): dspl_result; |
|
Removes DSPLib object from the list. |
function dspl_objGet(index: int): dspl_handle; |
|
Returns a DSPLib object handle. |
function dspl_objIndex(obj: dspl_handle): int; |
|
Returns the index of a DSPLib object in the list. |
function dspl_objNew(objID: int): dspl_handle; |
|
Creates new DSPLib object of a given type. |
function dspl_objSwap(index1, index2: int): dspl_result; |
|
Exchanges two DSPLib object places. |
function dspl_obj_getf(obj: dspl_handle; channel: int; param_id: int; out fp: dspl_float): dspl_result; overload; |
|
Returns object parameter value. |
function dspl_obj_setc(obj: dspl_handle; param_id: int; fp: pdspl_float; len: dspl_int): dspl_result; overload; |
|
function dspl_obj_setc(obj: dspl_handle; param_id: int; const value: dspl_chunk): dspl_result; overload; |
|
Sets an integer property of a DSPLib object. |
function dspl_obj_setf(obj: dspl_handle; param_id: int; value: dspl_float): dspl_result; |
|
Sets an integer property of a DSPLib object. |
function dspl_obj_seti(obj: dspl_handle; param_id: int; value: dspl_int): dspl_result; |
|
Sets an integer property of a DSPLib object. |
function getMultiOutData(channel: unsigned; n: unsigned; out data: pdspl_float; out nSamples: unsigned): HRESULT; |
|
Returns raw output audio buffer assigned to multi-output objects. Parameter n specifies the number of output stream (band), and must be from 0 to num of outputs - 1. |
function getOutData(channel: unsigned; out data: pdspl_float; out nSamples: unsigned): HRESULT; |
|
Returns raw output audio buffer assigned to objects. |
function processChunk(data: pointer; len: unsigned; channel: int = -1; nSamples: int = -1; writeOutput: bool = true): HRESULT; |
|
Processes an audio chunk. Use channel to specify channel number in a non-mono stream. Output data will be saved in provided buffer, or in case of multiOut object, output data can be read using getOutData() method. // NOTE: only one automat must be used to process one channel, so do not use one automat to process left and right channels consequently, this will not provide any good results. When you do not specify a channel number, automat will create internal automats one per each channel for non-mono streams. // NOTE: multiOut objects will overwrite the output buffers of each other. Currently only one multiOut object per automat is supported. |
function setFormat(rate, bits, channels: int; isSubAuto: bool = false): HRESULT; |
|
Specifies audio stream format. Only mono streams are supported. |
procedure AfterConstruction(); override; |
|
procedure BeforeDestruction(); override; |
|
property root: unaDspLibAbstract read f_root; |
|
Abstract DSPLib interface. |
(c) 2012 Lake of Soft