Einzelnen Beitrag anzeigen

TiGü

Registriert seit: 6. Apr 2011
Ort: Berlin
3.060 Beiträge
 
Delphi 10.4 Sydney
 
#109

AW: TAudioVolume Komponente incl. System Mixer

  Alt 16. Mai 2018, 16:32
Es ist diese.. und sie wird überschrieben wenn ein neues Control erstellt wird.
Unregistriert und neu registriert für das aktuelle Device.

Delphi-Quellcode:
    // Get default audio endpoint device with the specified data-flow direction (eRender or eCapture)
    // and device role.
    HR := Device_Enumerator.GetDefaultAudioEndpoint(eRender, eMultimedia, MDevice);
    if HR <> S_OK then
      raise Exception.Create('Error : Unable to get DefaultAudioEndpoint Device');
Larry sagt im verlinkten SO-Post:
Zitat:
You should also use the eConsole role instead of the eMultimedia role. It doesn't effectively matter (if you have only one audio device) but it's more correct


Halte dir testhalber mal die Instanzen von Device, SessionManager2 und SessionEnumerator in einer oder mehreren Listen. Siehe Beispielprogramm.
Vielleicht geht es dann.
  Mit Zitat antworten Zitat