Code sample - How to select an audio output device
Delphi and C# (ActiveX) sample code.
Get the list of available audio output devices
for I := 0 to VideoCapture1.Audio_OutputDevices_GetCount - 1 do
cbAudioOutputDevice.Items.Add(VideoCapture1.Audio_OutputDevices_GetItem(i));
for (int i = 0; i < VideoCapture1.Audio_OutputDevices_GetCount(); i++)
cbAudioOutputDevice.Items.Add(VideoCapture1.Audio_OutputDevices_GetItem(i));
Select device
VideoCapture1.Audio_OutputDevice := cbAudioOutputDevice.Items[cbAudioOutputDevice.ItemIndex];
VideoCapture1.Audio_OutputDevice = cbAudioOutputDevice.Text;
Enable audio output
VideoCapture1.Audio_PlayAudio := true;
VideoCapture1.Audio_PlayAudio = true;
Set volume level
VideoCapture1.Audio_OutputDevice_SetVolume(tbAudioVolume.Position);
VideoCapture1.Audio_OutputDevice_SetVolume((uint)tbAudioVolume.Value);
Set balance level
VideoCapture1.Audio_OutputDevice_SetBalance(tbAudioBalance.Position);
VideoCapture1.Audio_OutputDevice_SetBalance(tbAudioBalance.Value);
Please get in touch with support to get help with this tutorial. Visit our GitHub page to get more code samples.