was ist neu ¦  programmier tips ¦  indy artikel ¦  intraweb artikel ¦  informationen ¦  links ¦  interviews
 sonstiges ¦  tutorials ¦  Add&Win Gewinnspiel

Tips (1541)

Dateien (137)
Datenbanken (90)
Drucken (35)
Grafik (114)
IDE (21)
Indy (5)
Internet / LAN (130)
IntraWeb (0)
Mathematik (76)
Multimedia (45)
Oberfläche (107)
Objekte/
ActiveX (51)

OpenTools API (3)
Sonstiges (126)
Strings (83)
System (266)
VCL (242)

Tips sortiert nach
Komponente


Tip suchen

Tip hinzufügen

Add&Win Gewinnspiel

Werbung

45 Visitors Online


 
...die Lautstärke für das Mikrofon setzen/stumm setzen (erweitert)?
Autor: SilentScope(LT)
Homepage: http://www.gvt.lt/sveikinimas
[ Tip ausdrucken ]  

Tip Bewertung (21):  
     


{*********************************************************************

Thomas Stutz in
   http://www.swissdelphicenter.ch/torry/showcode.php?id=1204
showed some useful peace of code how to take control of mixer lines.

I would like to add some more information about taking control of the
!!! PLAYBACK or RECORD line !!!!

*********************************************************************}

// see the {*} marked lines in the SetMicrophoneVolume function

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
  
// Check if Mixer is available
  // Überprüfen, ob ein Mixer vorhanden
  
nMixerDevs := mixerGetNumDevs();
  if (nMixerDevs < 1) then
  begin
    
Exit;
  end;

  // open the mixer
  
intRet := mixerOpen(@hMix, 0, 0, 0, 0);
  if intRet = MMSYSERR_NOERROR then
  begin
    
mxl.dwComponentType := MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE;
    mxl.cbStruct        := SizeOf(mxl);

    {*}    // this option will tell the compiler which line destination to take:
    {*}    // 0 - PLAYBACK destination
    {*}    // 1 - RECORD destination
    {*}    // this time the compiler will take control of recording microphone line
    {*}    
mxl.dwDestination := 1;


    // get line info
    
intRet := mixerGetLineInfo(hMix, @mxl, MIXER_GETLINEINFOF_COMPONENTTYPE);

    //...
  
end;
end;

//...


 

Bewerten Sie diesen Tipp:

dürftig
ausgezeichnet


Copyright © by SwissDelphiCenter.ch
All trademarks are the sole property of their respective owners