LEADTOOLS Multimedia (Leadtools.Multimedia assembly) Send comments on this topic. | Back to Introduction | Help Version 17.0.3.22
BassRange Property
See Also 
Leadtools.Multimedia Namespace > AudioInput Class : BassRange Property



Gets the bass equalization range for the audio input.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property BassRange As Double
Visual Basic (Usage)Copy Code
Dim instance As AudioInput
Dim value As Double
 
value = instance.BassRange
C# 
public double BassRange {get;}
C++/CLI 
public:
property double BassRange {
   double get();
}

Property Value

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

Example

Visual BasicCopy Code
Public _result As Boolean = False
Public _form As CaptureCtrlForm = New CaptureCtrlForm()
Public Sub AudioInputsExample()
  Dim txtInfo As String = String.Empty

  ' reference the capture control
  Dim capturectrl As CaptureCtrl = _form.CaptureCtrl

  ' select an audio device, use your device name here instead of USB
  If capturectrl.AudioDevices("USB") Is Nothing Then
     Throw New Exception("No USB audio device available")
  End If

  capturectrl.AudioDevices("USB").Selected = True

  ' get the audio inputs object
  Dim audioinputs As AudioInputs = capturectrl.AudioInputs

  Try
     ' get master values
        txtInfo = String.Format("Enable state {0}" & Microsoft.VisualBasic.Constants.vbLf & "Loudness state {1}" & Microsoft.VisualBasic.Constants.vbLf & "Mixlevel value {2}" & Microsoft.VisualBasic.Constants.vbLf & "Mono state {3}" & Microsoft.VisualBasic.Constants.vbLf & "Pan value {4}" & Microsoft.VisualBasic.Constants.vbLf & "Bass value {5}" & Microsoft.VisualBasic.Constants.vbLf & "Bass range value {6}" & Microsoft.VisualBasic.Constants.vbLf & "Treble value {7}" & Microsoft.VisualBasic.Constants.vbLf & "Treble range value {8}" & Microsoft.VisualBasic.Constants.vbLf + Microsoft.VisualBasic.Constants.vbLf & "Are these values correct?", audioinputs.Enable, audioinputs.Loudness, audioinputs.MixLevel.ToString(), audioinputs.Mono, audioinputs.Pan.ToString(), audioinputs.Bass, audioinputs.BassRange, audioinputs.Treble, audioinputs.TrebleRange)

     ' display the named audio input properties
     _result = (MessageBox.Show(_form, txtInfo, "Test Verify", MessageBoxButtons.YesNo) = DialogResult.Yes)
  Catch e1 As Exception
     _result = False
  End Try

  ' 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.
  Do While capturectrl.State = CaptureState.Running
     Application.DoEvents()
  Loop
End Sub
C#Copy Code
public bool _result = false;
public CaptureCtrlForm _form = new CaptureCtrlForm();
public void AudioInputsExample()
{
   string txtInfo = string.Empty;

   // reference the capture control
   CaptureCtrl capturectrl = _form.CaptureCtrl;

   // select an audio device, use your device name here instead of USB
   if (capturectrl.AudioDevices["USB"] == null)
      throw new Exception("No USB audio device available");

   capturectrl.AudioDevices["USB"].Selected = true;

   // get the audio inputs object
   AudioInputs audioinputs = capturectrl.AudioInputs;

   try
   {
      // get master values
      txtInfo = string.Format("Enable state {0}\n" +
                              "Loudness state {1}\n" +
                              "Mixlevel value {2}\n" +
                              "Mono state {3}\n" +
                              "Pan value {4}\n" +
                              "Bass value {5}\n" +
                              "Bass range value {6}\n" +
                              "Treble value {7}\n" +
                              "Treble range value {8}\n\n" +
                              "Are these values correct?",
      audioinputs.Enable, audioinputs.Loudness, audioinputs.MixLevel.ToString(), audioinputs.Mono,
      audioinputs.Pan.ToString(), audioinputs.Bass, audioinputs.BassRange, audioinputs.Treble, audioinputs.TrebleRange);

      // 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();
}

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.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also