Home Units Hierarchy Routines All identifiers

Class unaGSMcoder

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type unaGSMcoder = class(unaObject)

Description

no description available, unaObject description follows

Base class for all objects defined in this unit.

Hierarchy

Overview

Methods

Public constructor create(isWav49: bool = false);
Public destructor Destroy(); override;
Public function write(data: pointer; len: int): int;
Protected procedure initCoder(); virtual; abstract;
Protected procedure onNewData(sender: unaObject; data: pointer; len: int); virtual;
Protected procedure processFrames(data: pointer; len: int); virtual; abstract;

Properties

Public property frameSizeIn: int read f_frameSizeIn;
Public property frameSizeOut: int read f_frameSizeOut;
Public property gsmOpt[opt:int32]: int32 read getOpt write setOpt;

Description

Methods

Public constructor create(isWav49: bool = false);
 
Public destructor Destroy(); override;
 
Public function write(data: pointer; len: int): int;

Pass new portion of data to encoder/decoder. Output frames will be notified via onNewData() mehtod

Returns

number of bytes processed in this write

Protected procedure initCoder(); virtual; abstract;

There is stuff we must know for sure, like frame sizes.

Protected procedure onNewData(sender: unaObject; data: pointer; len: int); virtual;

Override to be notified of new data from coder.

Protected procedure processFrames(data: pointer; len: int); virtual; abstract;

Each processing is specific and thus must be overrided.

Parameters
len
is guaranted to be at least one frame, or more integer number of frames

Properties

Public property frameSizeIn: int read f_frameSizeIn;

Size of input frame in bytes.

For encoder it should be 160*2 = 320 bytes For WAV49 encoder it should be 160*2*2 = 640 bytes // For decoder it should be 33 For WAV49 encoder it should be 65

Public property frameSizeOut: int read f_frameSizeOut;

Size of output frame in bytes.

For encoder it should be 33 For WAV49 encoder it should be 65 // For decoder it should be 160*2 = 320 bytes For WAV49 encoder it should be 160*2*2 = 640 bytes

Public property gsmOpt[opt:int32]: int32 read getOpt write setOpt;

GSM options, see GSM_OPT_XXX for index values

(c) 2012 Lake of Soft


Generated by PasDoc 0.12.1 on 2012-10-09