BassRange Property

Summary
Gets the bass equalization range for the audio input.
Syntax
C#
C++/CLI
public double BassRange { get; } 
public: 
property double BassRange { 
   double get(); 
} 

Property Value

A value that represents the range of bass equalization for the audio input.

Remarks

This value is the absolute value of the limits. For example, a value of 1.0 means that the range is from -1.0 to 1.0.

For more information, refer to the Microsoft documentation for IAMAudioInputMixer.get_BassRange.

Example
C#
using Leadtools; 
using Leadtools.Multimedia; 
using LeadtoolsMultimediaExamples.Fixtures; 
 
 
public bool _result = true; 
public CaptureCtrlForm _form = new CaptureCtrlForm(); 
 
public void AudioInputExample() 
{ 
   string txtInfo = string.Empty; 
 
   // reference the capture control 
   CaptureCtrl capturectrl = _form.CaptureCtrl; 
 
   // select an audio device. use your device's name here instead of USB 
   if (capturectrl.AudioDevices["USB"] == null) 
      throw new Exception("No USB audio device available"); 
   capturectrl.AudioDevices["USB"].Selected = true; 
 
   // reference the Master Volume audio input 
   AudioInput audioinput = capturectrl.AudioInputs["Master Volume"]; 
 
   try 
   { 
      // get the values of the read-only audioInput properties 
      double bassRange = audioinput.BassRange; 
      string friendlyName = audioinput.FriendlyName; 
      string name = audioinput.Name; 
      double trebleRange = audioinput.TrebleRange;             
 
      // set the values for the audioInput properties, if supported by the driver of the chosen input 
      audioinput.Bass = bassRange; // maximum bass range 
      audioinput.Enable = true; // enable video input 
      audioinput.Loudness = true; // enable loudness 
      audioinput.MixLevel = -1.0; // automatic gain adjustment  
      audioinput.Mono = false; // multi-channel audio input 
      audioinput.Pan = 1.0; // full right signal distribution 
      audioinput.Treble = trebleRange; // maximum treble gain 
 
      // get the values after setting them 
      // note that if the value did not change then it might not be supported by the audio driver 
      // get the master values 
      txtInfo = string.Format("Name {0}\n" + 
                              "Friendly Name {1}\n" + 
                              "Bass range value {2}\n" + 
                              "Treble range value {3}\n" + 
                              "Bass value {4}\n" + 
                              "Enabled: {5}\n" + 
                              "Loudness: {6}\n" + 
                              "Mix level value {7}\n" + 
                              "Mono: {8}\n" + 
                              "Pan value {9}\n" + 
                              "Treble value: {10}\n\n" + 
                              "Are these values correct?", 
      name, friendlyName, bassRange, trebleRange, audioinput.Bass, 
      audioinput.Enable, audioinput.Loudness, audioinput.MixLevel, 
      audioinput.Mono, audioinput.Pan, audioinput.Treble); 
 
      // display the named audio input properties 
      _result = (MessageBox.Show(_form, txtInfo, "Test Verify", MessageBoxButtons.YesNo) == DialogResult.Yes); 
   } 
   catch (Exception) 
   { 
      _result = false; 
   } 
 
   // we'll loop on the state and pump messages for this example. 
   // but you should not need to if running from a Windows Forms application. 
   while (capturectrl.State == CaptureState.Running) 
      Application.DoEvents(); 
} 
Requirements

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Multimedia Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.