Skip to content

Mixer_AddAudioToMixer

function

Delphi
function Mixer_AddAudioToMixer (SourceUniqueID: LongInt): LongInt;
C++Builder
System::LongInt __fastcall Mixer_AddAudioToMixer(System::LongInt SourceUniqueID);
C#
public int Mixer_AddAudioToMixer(int SourceUniqueID);
VB.NET
Public Function Mixer_AddAudioToMixer(SourceUniqueID As Integer) As Integer
C++/Qt
int Mixer_AddAudioToMixer (int SourceUniqueID);

Mixes the audio of another TVideoGrabber component into the audio of this component.

Remarks

Invoke this function on the destination component, passing the UniqueID of the source component as SourceUniqueID. While both components are running, the audio samples (PCM) of the source component are added to the audio stream of this component, at the levels set on this component by MixAudioSamples_CurrentSourceLevel (its own audio) and MixAudioSamples_ExternalSourceLevel (the audio of the source components). With AudioSource = as_UseMixAudioSample, the audio stream of this component is made of the audio samples of the source components only.

Only the audio is concerned: to mix the video, use Mixer_AddToMixer or Mixer_SetupPIPFromSource.

Return value: an identifier to pass to Mixer_AudioActivation and Mixer_RemoveAudioFromMixer, or -1 if no TVideoGrabber component has this UniqueID. Invoking this function again for the same source component replaces the previous association.