ThbWaveOut.Playlist
Unit: hbTapiWave
 

The property Playlist is a string list that holds all files and macros to play over the waveform-audio output device. The playing begins directly after ThbWaveOut.Active is set to True. The entries are played in the order of there place in list. After all entries of Playlist have been played, the OnDone event is fired and ThbWaveOut.Active is set back to False.

A file to play is defined by the file name or complete path. There are two macros that can be used: Beep and Silence

hbhbWaveIn1.DeviceName := 'Sound Device #1';
if hbhbWaveIn1.Available then
begin
  hbhbWaveIn1.Playlist.Clear;
  hbhbWaveIn1.Playlist.Add('greeting.wav');
  hbhbWaveIn1.Playlist.Add('record.wav');
  hbhbWaveIn1.Playlist.Add('Beep(1000, 500)');
  try
    hbhbWaveIn1.Active := True;
  except
    // handle errors
  end;
end;

Availability

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

Declaration

property Playlist: TStrings;

Remarks

The audio format of all files within the playlist has to be the same because it can't be switched during playing.

See Also

ThbWaveOut.Active | OnDone


Beep

Syntax: Beep(Frequence, Duration: DWORD)

The macro beep generates a sinus tone of the frequence defined by the parameter Frequence and the length defined by the parameter Duration in milli-seconds.

Silence

Syntax: Silence(Duration: DWORD)

This macro generates silence (pause) of the length defined by the parameter Duration in milli-seconds.