| Description | Hierarchy | Fields | Methods | Properties | 
type unaLibCELTcoder = class(unaObject)
Base abstract libcelt coder.
![]()  | 
f_proc: unaLibCELTAPI; | 
![]()  | 
f_frameSizeBytes: int; | 
![]()  | 
constructor create(rate: int = 24000; frame_size: int = 480; channels: int = 1; const libname: string = ''); | 
![]()  | 
function IOCTL(req: int; var value: int32): int; | 
![]()  | 
function open(): int; overload; | 
![]()  | 
function open(rate: int; frame_size: int = 480; channels: int = 1): int; overload; | 
![]()  | 
function doIOCTL(req: int; var value: int32): int; virtual; abstract; | 
![]()  | 
function doOpen(): int; virtual; abstract; | 
![]()  | 
function lock(timeout: tTimeout = 100): bool; | 
![]()  | 
procedure BeforeDestruction(); override; | 
![]()  | 
procedure close(); | 
![]()  | 
procedure doClose(); virtual; abstract; | 
![]()  | 
procedure doDataAvail(data: pointer; size: int); virtual; | 
![]()  | 
procedure unlock(); | 
![]()  | 
property active: bool read f_active; | 
![]()  | 
property frameSize: int read f_frameSize2 write setFrameSize; | 
![]()  | 
property lastError: int read f_lastError; | 
![]()  | 
property libOK: bool read f_libOK; | 
![]()  | 
property onDataAvail: unaLibCELTcoderDataAvail read f_onDataAvail write f_onDataAvail; | 
![]()  | 
property pcm_channels: int read f_channels; | 
![]()  | 
property pcm_rate: int read f_rate; | 
![]()  | 
property proc: punaLibCELTAPI read getProc; | 
![]()  | 
f_proc: unaLibCELTAPI; | 
![]()  | 
f_frameSizeBytes: int; | 
![]()  | 
constructor create(rate: int = 24000; frame_size: int = 480; channels: int = 1; const libname: string = ''); | 
| 
 Loads library and initializes the coder with specified parameters. Aborts with exception if library was not loaded. 
 Parameters
  | |
![]()  | 
function IOCTL(req: int; var value: int32): int; | 
| 
 Query and set coder parameters. 
 Parameters
 ReturnsError code  | |
![]()  | 
function open(): int; overload; | 
| 
 Initializes the coder with parameters specified upon creation or previois open(). Returns0 if succeeded, negative value otherwise (see CELT_ error codes).  | |
![]()  | 
function open(rate: int; frame_size: int = 480; channels: int = 1): int; overload; | 
| 
 Initializes the coder with specified parameters. 
 Parameters
 Returns0 if succeeded, negative value otherwise (see CELT_ error codes).  | |
![]()  | 
function doIOCTL(req: int; var value: int32): int; virtual; abstract; | 
| 
 IOCTL the coder.  | |
![]()  | 
function doOpen(): int; virtual; abstract; | 
| 
 Opens the coder.  | |
![]()  | 
function lock(timeout: tTimeout = 100): bool; | 
| 
 DLL Re-entrance lock.  | |
![]()  | 
procedure BeforeDestruction(); override; | 
![]()  | 
procedure close(); | 
| 
 Releases the coder resources.  | |
![]()  | 
procedure doClose(); virtual; abstract; | 
| 
 Closes the coder.  | |
![]()  | 
procedure doDataAvail(data: pointer; size: int); virtual; | 
| 
 Called when encoder or decoder is ready with new portion of data.  | |
![]()  | 
procedure unlock(); | 
| 
 DLL Re-entrance unlock.  | |
![]()  | 
property active: bool read f_active; | 
| 
 True if coder is opened  | |
![]()  | 
property frameSize: int read f_frameSize2 write setFrameSize; | 
| 
 frame size in samples (per channel)  | |
![]()  | 
property lastError: int read f_lastError; | 
| 
 Last error (shared for all threads!)  | |
![]()  | 
property libOK: bool read f_libOK; | 
| 
 True if liblary was loaded  | |
![]()  | 
property onDataAvail: unaLibCELTcoderDataAvail read f_onDataAvail write f_onDataAvail; | 
| 
 Fired for each new chunk of audio  | |
![]()  | 
property pcm_channels: int read f_channels; | 
| 
 number of channels  | |
![]()  | 
property pcm_rate: int read f_rate; | 
| 
 sampling rate  | |
![]()  | 
property proc: punaLibCELTAPI read getProc; | 
| 
 libcelt API  | |
(c) 2012 Lake of Soft