Home Units Hierarchy Routines All identifiers

Class unavclWaveOutDevice

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type unavclWaveOutDevice = class(unavclInOutWavePipe)

Description

Real time PCM audio stream playback using the sound card or other hardware device.

Usage: If components has no provider component with formatProvider=true, specify PCM stream parameters before activating: pcm_SamplesPerSec, pcm_BitsPerSample and pcm_NumChannels.

Example: refer to the vcTalkNow demo. It has waveOut_server and waveOut_client components. Both are used to playback real-time PCM stream received from remote side. In this demo, waveOut_server is a consumer of c_codec_serverIn component. That means PCM stream, produced by c_codec_serverIn will be passed to waveOut_server automatically.

Hierarchy

Overview

Methods

Protected function doOpen(): bool; override;
Public procedure AfterConstruction(); override;
Protected procedure createNewDevice(); override;
Protected procedure doSetEnableDP(value: boolean); override;

Properties

Published property calcVolume;
Published property deviceId;
Published property enableDataProcessing;
Protected property inputIsPcm default false;
Published property onFeedChunk: unavclPipeDataEvent read f_onFC write f_onFC;
Published property onFeedDone: unavclPipeDataEvent read f_onFD write f_onFD;
Published property playbackOptions: unavcPlaybackOptions read f_po write f_po;
Published property waveEngine;
Public property waveOutDevice: unaWaveOutDevice read getWaveOutDevice;

Description

Methods

Protected function doOpen(): bool; override;

Assign playback options

Public procedure AfterConstruction(); override;
 
Protected procedure createNewDevice(); override;

Creates wave Out (playback) device.

Protected procedure doSetEnableDP(value: boolean); override;

Sets enableDataProcessing value.

Properties

Published property calcVolume;
 
Published property deviceId;
 
Published property enableDataProcessing;

Specifies whether the component would playback any data. Setting this property to False does not release the waveOut device. Set active property to False to release the device as well.

Protected property inputIsPcm default false;

Since waveOut device is output device, and output format is PCM, we should specify input format as not PCM.

Published property onFeedChunk: unavclPipeDataEvent read f_onFC write f_onFC;

Fired when another audio chunk was passed to driver for playback. If you are self-feeding the playback, it means you have to feed another chunk to achieve continuous playback.

WARNING: This event is deprecated, refer to onFeedDone.

<STRONG>NOTE</STRONG>: VCL is NOT multi-threading safe, and you should avoid using VCL routines and classes in this event.

Published property onFeedDone: unavclPipeDataEvent read f_onFD write f_onFD;

Fired when chunk was just played out by device. This is a good place for any user feedback. Since the data passed to this event was played out about 1/50 second ago, you can achieve very short delay between actual data being played back, and feedback. For example, if you draw an oscilloscope of a wave, use this event to be in synch with actual playback.

<STRONG>NOTE</STRONG>: VCL is NOT multi-threading safe, and you should avoid using VCL routines and classes in this event.

Published property playbackOptions: unavcPlaybackOptions read f_po write f_po;

Controls how playback is started and what to do when waveout queue is out of audio data.

Published property waveEngine;
 
Public property waveOutDevice: unaWaveOutDevice read getWaveOutDevice;

Returns waveOut device.

(c) 2012 Lake of Soft


Generated by PasDoc 0.12.1 on 2012-10-09