BB FlashBack SDK: FBRecorder

GetSoundSource

Description

Gets the ID of a sound source, its component type, and IDs used to identify changes made to the mute state and volume of the source made elsewhere in Windows.

Note: GetSoundSources should be called before accessing GetSoundSource, to build an internal list of sound sources.

Syntax

[C#/C++]
Public void GetSoundSource (long Index, long *LineID, long *MUXControlID, long *MuteControlID, long *VolControlID, long *ComponentType);

[VB.NET]
public Sub GetSoundSource (ByVal Index as Integer, ByRef LineID As Integer, ByRef MUXControlID As Integer, ByRef MuteControlID As Integer, ByRef VolControlID As Integer, ByRef ComponentType As Integer)

Parameters

Index (in): the index of the sound source

LineID (out): the LineID of the source. Set SoundSource to this ID to enable recording of the source. The ID can also be used in calls to Get/SetSoundLineMuteValue and Get/SetSoundLineVolume.

MUXControlID (out): the ID of the Mixer for this source.

MuteControlID (out): this is used if you want to show the mute state of this source in a window. See Remarks below for details.

VolControlID (out): this is used if you want to show the volume of this source in a window. See Remarks below for details.

ComponentType (out): the component type for this source. Component types would include speakers, microphone, line, aux, compact disc and many others - see MIXERLINE.dwComponentType defines in the Win32 SDK file mmsystem.h. An application can use the component type to display tailored graphics or to search for a particular component.

About the Mute and Volume Control IDs

The MuteControlID and VolControlID parameters returned from this method can be used if you want to display controls that show the mute state and volume of the source.

The mute state and volume can be changed via the Windows interface, and also other applications, and your controls should update in response to these external changes.

If you receive MM_MIXM_CONTROL_CHANGE messages from Windows, inspect at the LParam in these messages and compare to MuteControlID and VolControlID. If there is a match with either ID, the message indicates a change in the corresponding value.

See Also

FBRecorder::SoundSource  FBRecorder::GetSoundSources