Home Units Hierarchy Routines All identifiers

Class unaDSPLibAutomat

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type unaDSPLibAutomat = class(unaObject)

Description

Universal DSP automat.

Hierarchy

Overview

Methods

Public constructor create(root: unaDspLibAbstract);
Public function automatLoad(const config: string): HRESULT; overload;
Public function automatLoad(ini: unaIniAbstractStorage; const sectionName: string = c_defAutomatSection): HRESULT; overload;
Public function automatSave(ini: unaIniAbstractStorage = nil; const sectionName: string = ''): HRESULT; overload;
Public function automatSave(out config: string): HRESULT; overload;
Public function bytes2samples(numBytes: int): int;
Public function dspl_objCount(): int;
Public function dspl_objDrop(index: int): dspl_result;
Public function dspl_objGet(index: int): dspl_handle;
Public function dspl_objIndex(obj: dspl_handle): int;
Public function dspl_objNew(objID: int): dspl_handle;
Public function dspl_objSwap(index1, index2: int): dspl_result;
Public function dspl_obj_getf(obj: dspl_handle; channel: int; param_id: int; out fp: dspl_float): dspl_result; overload;
Public function dspl_obj_setc(obj: dspl_handle; param_id: int; fp: pdspl_float; len: dspl_int): dspl_result; overload;
Public function dspl_obj_setc(obj: dspl_handle; param_id: int; const value: dspl_chunk): dspl_result; overload;
Public function dspl_obj_setf(obj: dspl_handle; param_id: int; value: dspl_float): dspl_result;
Public function dspl_obj_seti(obj: dspl_handle; param_id: int; value: dspl_int): dspl_result;
Public function getMultiOutData(channel: unsigned; n: unsigned; out data: pdspl_float; out nSamples: unsigned): HRESULT;
Public function getOutData(channel: unsigned; out data: pdspl_float; out nSamples: unsigned): HRESULT;
Public function processChunk(data: pointer; len: unsigned; channel: int = -1; nSamples: int = -1; writeOutput: bool = true): HRESULT;
Public function setFormat(rate, bits, channels: int; isSubAuto: bool = false): HRESULT;
Public procedure AfterConstruction(); override;
Public procedure BeforeDestruction(); override;

Properties

Public property root: unaDspLibAbstract read f_root;

Description

Methods

Public constructor create(root: unaDspLibAbstract);
 
Public function automatLoad(const config: string): HRESULT; overload;

// Loads the automat configuration from a string.

Public function automatLoad(ini: unaIniAbstractStorage; const sectionName: string = c_defAutomatSection): HRESULT; overload;

// Loads the automat configuration from a ini storage.

Public 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.

Public function automatSave(out config: string): HRESULT; overload;

// Saves the automat configuration as a string.

Public function bytes2samples(numBytes: int): int;

Returns number of audio samples which can be stored in specified number of bytes.

Public function dspl_objCount(): int;

Returns number of DSPLib objects.

Public function dspl_objDrop(index: int): dspl_result;

Removes DSPLib object from the list.

Public function dspl_objGet(index: int): dspl_handle;

Returns a DSPLib object handle.

Public function dspl_objIndex(obj: dspl_handle): int;

Returns the index of a DSPLib object in the list.

Public function dspl_objNew(objID: int): dspl_handle;

Creates new DSPLib object of a given type.

Public function dspl_objSwap(index1, index2: int): dspl_result;

Exchanges two DSPLib object places.

Public function dspl_obj_getf(obj: dspl_handle; channel: int; param_id: int; out fp: dspl_float): dspl_result; overload;

Returns object parameter value.

Public function dspl_obj_setc(obj: dspl_handle; param_id: int; fp: pdspl_float; len: dspl_int): dspl_result; overload;
 
Public 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.

Public function dspl_obj_setf(obj: dspl_handle; param_id: int; value: dspl_float): dspl_result;

Sets an integer property of a DSPLib object.

Public function dspl_obj_seti(obj: dspl_handle; param_id: int; value: dspl_int): dspl_result;

Sets an integer property of a DSPLib object.

Public 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.

Public function getOutData(channel: unsigned; out data: pdspl_float; out nSamples: unsigned): HRESULT;

Returns raw output audio buffer assigned to objects.

Public 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.

Public function setFormat(rate, bits, channels: int; isSubAuto: bool = false): HRESULT;

Specifies audio stream format. Only mono streams are supported.

Public procedure AfterConstruction(); override;
 
Public procedure BeforeDestruction(); override;
 

Properties

Public property root: unaDspLibAbstract read f_root;

Abstract DSPLib interface.

(c) 2012 Lake of Soft


Generated by PasDoc 0.12.1 on 2012-10-09