Class unaWaveDevice
Unit
unaMsAcmClasses
Declaration
type unaWaveDevice = class(unaMsAcmStreamDevice)
Description
This abstract class is used as base for unaWaveInDevice (recorder) and unaWaveOutDevice (playback) devices.
Since both In and Out devices are working with PCM streams only, we can simplify the process of specifying wave formats. Instead of tag/index pair setSampling() method takes three parameters: samples per second, bits per sample and number of channels. Commonly used values for samples per second are 8,000; 11,025; 22,050 and 44,100. Bits per sample could be 8 or 16 or more. Number of channels is usually 1 (mono) or 2 (stereo).
Hierarchy
Overview
Methods
Properties
Description
Methods
 |
constructor create(deviceID: uint = WAVE_MAPPER; mapped: bool = false; direct: bool = false; isIn: bool = true; overNum: unsigned = 0); |
Parameters
- mapped
- - The deviceID parameter specifies a waveform-audio device to be mapped to by the wave mapper.
- direct
- - If this flag is specified, the ACM driver does not perform conversions on the audio data.
|
 |
function setSampling(pcmFormat: pWAVEFORMATEX): bool; overload; |
Since most wave devices supports PCM formats only it is handy to have this method.
|
 |
function setSampling(const pcmFormat: unaPCMFormat): bool; overload; |
Since most wave devices supports PCM formats only it is handy to have this method.
|
 |
function setSamplingExt(isSrc: bool; format: PWAVEFORMATEXTENSIBLE): bool; |
Since most wave devices supports PCM formats only it is handy to have this method.
|
 |
function addHeader(header: unaWaveHeader): MMRESULT; virtual; abstract; |
|
 |
function close2(timeout: tTimeout = 10014): MMRESULT; override; |
|
 |
function execute(globalIndex: unsigned): int; override; |
|
 |
function open2(query: bool = false; timeout: tTimeout = 10004; flags: uint = 0; startDevice: bool = true): MMRESULT; override; |
|
 |
procedure BeforeDestruction(); override; |
|
 |
procedure shareASIOwith(device: unaWaveDevice); |
Share ASIO driver with specified device. When ASIO is shared, no new ASIO driver will be initialized.
Parameters
- device
- Wave device to share ASIO driver with. If nil, old share will be removed (if any).
|
 |
procedure removeHeader(var header: pointer); override; |
|
Properties
 |
property deviceId: uint read f_deviceId write setDeviceId; |
Device Id.
|
 |
property direct: bool read f_direct write f_direct; |
If this flag is specified, the ACM driver does not perform conversions on the audio data.
|
 |
property mapped: bool read f_mapped write f_mapped; |
The deviceID parameter specifies a waveform-audio device to be mapped to by the wave mapper.
|
(c) 2012 Lake of Soft
Generated by PasDoc 0.12.1 on 2012-10-09