uses MMSystem
function SetMicrophoneVolume(bValue: Word): Boolean;
var {0..65535}
hMix: HMIXER;
mxlc: MIXERLINECONTROLS;
mxcd: TMIXERCONTROLDETAILS;
vol: TMIXERCONTROLDETAILS_UNSIGNED;
mxc: MIXERCONTROL;
mxl: TMixerLine;
intRet: Integer;
nMixerDevs: Integer;
begin
nMixerDevs := mixerGetNumDevs();
if (nMixerDevs < 1) then
begin
Exit;
end;
intRet := mixerOpen(@hMix, 0, 0, 0, 0);
if intRet = MMSYSERR_NOERROR then
begin
mxl.dwComponentType := MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE;
mxl.cbStruct := SizeOf(mxl);
{*}
{*}
{*}
{*}
{*} mxl.dwDestination := 1;
intRet := mixerGetLineInfo(hMix, @mxl, MIXER_GETLINEINFOF_COMPONENTTYPE);
end;
end;
Beispiel :
procedure TForm1.ScrollBar1Change(Sender: TObject);
begin
// Set Value {0..65535}
SetMicrophoneVolume(ScrollBar1.Position);
end;
Keine Kommentare:
Kommentar veröffentlichen