Home Units Hierarchy Routines All identifiers

Class unaG7221Coder

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type unaG7221Coder = class(unaObject)

Description

G.722.1 Coder

Hierarchy

Overview

Methods

Public constructor create(sampleRate: int = 16000; bitrate: int = 24000);
Public destructor Destroy(); override;
Public function write(data: pointer; len: uint): int;
Protected function chunkSize(): uint; virtual; abstract;
Protected function init(sampleRate: int = 16000; bitrate: int = 24000): bool; virtual;
Protected function process(ptr: pointer; len: uint): int; virtual; abstract;
Public procedure close();
Public procedure open();
Protected procedure notify(stream: pointer; sizeBytes: int); virtual;

Properties

Public property framesize: int32 read f_framesize;
Public property number_of_16bit_words_per_frame: int32 read f_number_of_16bit_words_per_frame;
Public property number_of_bits_per_frame: int32 read f_number_of_bits_per_frame;

Description

Methods

Public constructor create(sampleRate: int = 16000; bitrate: int = 24000);
 
Public destructor Destroy(); override;
 
Public function write(data: pointer; len: uint): int;

Sends more data to coder.

Parameters
data
16-bit samples for encoder or
len
size of buffer in bytes
Returns

number of full frames processed in this call.

Protected function chunkSize(): uint; virtual; abstract;

Size of portion of data (frame) the coder is expecting to process at once. In bytes.

Protected function init(sampleRate: int = 16000; bitrate: int = 24000): bool; virtual;
 
Protected function process(ptr: pointer; len: uint): int; virtual; abstract;

Encodes/decodes data.

Returns

number of full frames processed.

Public procedure close();

Closes the coder.

Public procedure open();

Opens the coder.

Protected procedure notify(stream: pointer; sizeBytes: int); virtual;

Called when new encoded/decoded frame is ready.

Properties

Public property framesize: int32 read f_framesize;

Size of mono frame in samples.

Public property number_of_16bit_words_per_frame: int32 read f_number_of_16bit_words_per_frame;

Size of frame in 16-bit words.

Public property number_of_bits_per_frame: int32 read f_number_of_bits_per_frame;

Size of frame in bits.

(c) 2012 Lake of Soft


Generated by PasDoc 0.12.1 on 2012-10-09