ActiveX OCX to control the system mixer, with multi-soundcard support
The OCX can control all the detected lines of a soundcard , and with support to multiples soundcard installed
It will detect the following lines:
Master Volume
Wave
Midi
Microphone
Line
CD
Analog
Auxiliary
Telephone
Undefined
Digital
PC Speaker
After the detection it will make it possible to retrieve and set these lines of the soundcard with only a few functions
In order to set the Master Volume the following api will be used:
RSPMixer1.SetMasterVolume DeviceID, Left, Right
In this case the DeviceID is the identifier of the installed soundcard , Left is the value to the left channel ranging from 0 to 10 , Right is the value to the right channel
After the call the system mixer will have the value modified
In oder to retrieve the Master Volume the following api will be used:
Ret = RSPMixer1.GetMasterVolume(DeviceID, Left, Right)
In this case DeviceID is the identifier of the installed soundcard , Left is the variable that will receive the left channel value , Right is the variable that will receive the right channel value
In order to get the mute state for the Master Volume the following api will be used:
Ret = RSPMixer1.GetMasterMute(DeviceID, Value)
In this case DeviceID is the identifier of the installed soundcard , Value is the variable that will receive the mute state of the Master Volume , it can be 0 or 1 , 0 to mute off , and 1 to mute on
In order to set the mute state for the Master Volume the following api will be used:
RSPMixer1.SetMasterMute DeviceID, Value
In this case DeviceID is the identifier of the installed soundcard , Value is the new value to the mute state , 0 to mute off , and 1 to mute on
|