Home Units Hierarchy Routines All identifiers

Class unaWaveResampler

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type unaWaveResampler = class(unaWaveSoftwareDevice)

Description

This class can resample audio stream from one PCM format to another. It does not use ACM codecs.

8, 16 and 32 bits samples with virtually unlimited number of channels and samples per second are supported.

Hierarchy

Overview

Methods

Public constructor create(realTime: bool = false; overNum: unsigned = 0);
Public destructor Destroy(); override;
Public function setSampling(isSrc: bool; const format: WAVEFORMATEX): bool; overload;
Public function setSampling(isSrc: bool; samplesPerSec: unsigned = c_defSamplingSamplesPerSec; bitsPerSample: unsigned = c_defSamplingBitsPerSample; numChannels: unsigned = c_defSamplingNumChannels): bool; overload;
Public function setSamplingExt(isSrc: bool; format: PWAVEFORMATEXTENSIBLE): bool; overload;
Protected function afterOpen(): MMRESULT; override;
Protected function doWrite(buf: pointer; size: unsigned): unsigned; override;
Protected function flush2(waitForComplete: bool = true): bool; override;
Protected function getMasterIsSrc2(): bool; override;
Protected function onHeaderDone(header: unaWaveHeader; wakeUpByHeaderDone: bool): bool; override;
Public procedure AfterConstruction(); override;
Protected procedure afterClose(closeResult: MMRESULT); override;

Properties

Public property useSpeexDSP: bool read f_useSpeexDSP write f_useSpeexDSP;

Description

Methods

Public constructor create(realTime: bool = false; overNum: unsigned = 0);
 
Public destructor Destroy(); override;
 
Public function setSampling(isSrc: bool; const format: WAVEFORMATEX): bool; overload;

Sets the source or destination stream format.

Public function setSampling(isSrc: bool; samplesPerSec: unsigned = c_defSamplingSamplesPerSec; bitsPerSample: unsigned = c_defSamplingBitsPerSample; numChannels: unsigned = c_defSamplingNumChannels): bool; overload;

Sets the source or destination stream format.

Public function setSamplingExt(isSrc: bool; format: PWAVEFORMATEXTENSIBLE): bool; overload;
 
Protected function afterOpen(): MMRESULT; override;
 
Protected function doWrite(buf: pointer; size: unsigned): unsigned; override;

//

Protected function flush2(waitForComplete: bool = true): bool; override;

Forces all awaiting data to be resampled.

Protected function getMasterIsSrc2(): bool; override;

Returns false.

Protected function onHeaderDone(header: unaWaveHeader; wakeUpByHeaderDone: bool): bool; override;
 
Public procedure AfterConstruction(); override;
 
Protected procedure afterClose(closeResult: MMRESULT); override;
 

Properties

Public property useSpeexDSP: bool read f_useSpeexDSP write f_useSpeexDSP;

Try to use Speex DSP resampler if available.

(c) 2012 Lake of Soft


Generated by PasDoc 0.12.1 on 2012-10-09