This example demonstrates how to use VolumeControl
component and give applications control over installed Windows mixers.
This component can be used in two ways:
As IvcproVolumeControlX interface.
RecSource property indicates the recording source channel. Set RecSource = rsCurrent if you don't want to change the current channel.
Use GetRecVolume, SetRecVolume, GetPlayVolume and SetPlayVolume methods to get or set recording/playback channel volume.
Playback volume control functions (GetPlayVolume and SetPlayVolume) require additional PlayDest parameter. It specifies playback channel to use. When PlayDest = psTotal, the total playback level will be adjusted.
As IvcproVolumeControl2X interface.
GetMixerCount, GetMixerName and SelectMixer enumerate mixer devices.
GetLineCount, GetLineName and GetLineIndex methods enumerate lines of selected mixer.
GetLineConnectionCount, GetLineConnectionName, GetLineConnectionType and GetLineConnectionByType methods work with line connections.
GetVolume and SetVolume methods work with volume level of specified connection.
IsMutedConnection and MuteConnection methods let examine whether specific connection is muted, and change its mute state.
GetRecSource and SetRecSource methods let you control which connection is current for recording.