ThbWaveIn.DeviceID
Unit: hbTapiWave
 

Set this property to indicate which waveform-audio input device should be used. All available devices are listed in the ThbWaveIn.DeviceList property. Legal values for this property are 0 to ThbWaveIn.DeviceList.Count -1. The ThbWaveIn.DeviceName property is set to the corresponding name.

for i := 0 to hbWaveIn1.DeviceList.Count-1 do
begin
  hbWaveIn1.DeviceID := i;
  if hbWaveIn1.Available then
  begin
    ListBox1.Items.Add(hbWaveIn1.DeviceName + ' is available');
  end;
end;

Availability

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

Declaration

property DeviceID: DWord;

Remarks

If the device is active prior to setting the DeviceID, then you must deactivate the component (WaveIn.Active := False) otherwise an exception will be raised. Your application should not save the DeviceID to restore an users configuration because it could change in due to installing/removing sound devices. The better choice is to store the DeviceName.

See Also

ThbWaveIn.DeviceName | DeviceList | Available