ThbWaveOut.Active
Unit: hbTapiWave
 

This property activates and deactivates the waveform-audio output device. Everytime ThbWaveOut.Active is set from False to True, the component begins to play all files and macros the Playlist contains. Playing begins with the first entry and ends with the last one. When playing the last entry has finished, ThbWaveOut.Active is set back False and the ThbWaveOut.OnDone event is fired. Setting Active to False while playing causes playing to stop. No ThbWaveOutOnDone event will be triggerd in that case.

hbWaveOut1.DeviceName := 'Sound Device #1';
if hbWaveOut1.Available the
try
  hbWaveOut1.PlayList.Clear;
  hbWaveOut1.PlayList.Add('greeting.wav');
  hbWaveOut1.Active := True;
except
  on E:EWaveError do
    MessageDlg('Error opening wave out line device: ' + E.Message, mtError, [mbOk],0);
end;

Availability

Design-Time: None / Run-Time: Read, Write

Declaration

property Active: Boolean;

Errors

Setting this property to True may cause an EWaveError exception. Error occuring during playing are given to the application as OnWaveError events. Possible errors are:

MMSYSERR_ALLOCATED, MMSYSERR_BADDEVICEID, MMSYSERR_NODRIVER, MMSYSERR_NOMEM, WAVERR_BADFORMAT, WAVERR_SYNC.

See Also

ThbWaveOut.OnWaveError, EWaveError