Represents a mixer control.
More...
|
override string | ToString () |
| Returns a string representation of the object, including the Name and ControlType properties.
|
|
|
void | GetControlDetails () |
| Retrieves details of the mixer control.
|
|
void | GetDetails (IntPtr pDetails) |
| Retrieves the details using the provided pointer to details.
|
|
Represents a mixer control.
◆ GetControlDetails()
void NAudio.Mixer.MixerControl.GetControlDetails |
( |
| ) |
|
|
inlineprotected |
Retrieves details of the mixer control.
This method retrieves the details of the specified mixer control and populates the mixerControlDetails structure with the retrieved information. The method first sets the size of the mixerControlDetails structure and assigns the control ID from the mixerControl . It then determines the number of channels for the control based on whether it is custom, uniform, or has a specific number of channels. If the control is a multiple item control, it sets the owner window handle to the value of mixerControl.cMultipleItems . It then determines the size of the details based on the type of control (boolean, list text, signed, unsigned, or custom) and the number of channels. After allocating memory for the details, it retrieves the control details using MixerInterop.mixerGetControlDetails and populates the details in the allocated buffer. If successful, it calls the GetDetails method to process the retrieved details and then frees the allocated memory. If an error occurs during the retrieval process, it throws a MmException with the error message "mixerGetControlDetails".
- Exceptions
-
MmException | Thrown when an error occurs during the retrieval of mixer control details. |
◆ GetDetails()
void NAudio.Mixer.MixerControl.GetDetails |
( |
IntPtr | pDetails | ) |
|
|
abstractprotected |
Retrieves the details using the provided pointer to details.
- Parameters
-
pDetails | A pointer to the details. |
This method retrieves the details using the provided pointer to details and is intended to be implemented in derived classes.
◆ GetMixerControl()
static MixerControl NAudio.Mixer.MixerControl.GetMixerControl |
( |
IntPtr | mixerHandle, |
|
|
int | nLineId, |
|
|
int | controlId, |
|
|
int | nChannels, |
|
|
MixerFlags | mixerFlags ) |
|
inlinestatic |
Retrieves the specified mixer control.
- Parameters
-
mixerHandle | The handle to the mixer device. |
nLineId | The line identifier. |
controlId | The control identifier. |
nChannels | The number of channels. |
mixerFlags | The mixer flags. |
- Returns
- The retrieved mixer control based on the specified parameters.
- Exceptions
-
MmException | Thrown when an error occurs during the retrieval of the mixer control. |
◆ GetMixerControls()
Retrieves the mixer controls associated with the specified mixer line.
- Parameters
-
mixerHandle | The handle to the mixer device. |
mixerLine | The mixer line for which controls are to be retrieved. |
mixerHandleType | The type of handle to be retrieved. |
- Returns
- A list of mixer controls associated with the specified mixer line.
- Exceptions
-
MmException | Thrown when an error occurs while retrieving the mixer controls. |
◆ IsControlBoolean()
static bool NAudio.Mixer.MixerControl.IsControlBoolean |
( |
MixerControlType | controlType | ) |
|
|
inlinestaticprivate |
Checks if the given MixerControlType is a boolean control type.
- Parameters
-
controlType | The MixerControlType to be checked. |
- Returns
- True if the controlType is a boolean control type; otherwise, false.
◆ IsControlCustom()
static bool NAudio.Mixer.MixerControl.IsControlCustom |
( |
MixerControlType | controlType | ) |
|
|
inlinestaticprivate |
Checks if the given MixerControlType is custom.
- Parameters
-
controlType | The MixerControlType to be checked. |
- Returns
- True if the controlType is custom; otherwise, false.
◆ IsControlListText()
static bool NAudio.Mixer.MixerControl.IsControlListText |
( |
MixerControlType | controlType | ) |
|
|
inlinestaticprivate |
Checks if the given MixerControlType is a type of control list text.
- Parameters
-
controlType | The MixerControlType to be checked. |
- Returns
- True if the control type is Equalizer, Mixer, MultipleSelect, Mux, or SingleSelect; otherwise, false.
◆ IsControlSigned()
static bool NAudio.Mixer.MixerControl.IsControlSigned |
( |
MixerControlType | controlType | ) |
|
|
inlinestaticprivate |
Checks if the given MixerControlType is signed.
- Parameters
-
controlType | The type of mixer control to be checked. |
- Returns
- True if the controlType is a signed control; otherwise, false.
This method checks if the specified controlType is one of the signed mixer control types, such as PeakMeter, SignedMeter, Signed, Decibels, Pan, QSoundPan, or Slider. If the controlType matches any of the signed types, it returns true; otherwise, it returns false.
◆ IsControlUnsigned()
static bool NAudio.Mixer.MixerControl.IsControlUnsigned |
( |
MixerControlType | controlType | ) |
|
|
inlinestaticprivate |
Determines if the given MixerControlType is of an unsigned type.
- Parameters
-
controlType | The MixerControlType to be checked. |
- Returns
- True if the controlType is of an unsigned type; otherwise, false.
◆ ToString()
override string NAudio.Mixer.MixerControl.ToString |
( |
| ) |
|
Returns a string representation of the object, including the Name and ControlType properties.
- Returns
- A string containing the Name and ControlType properties of the object.
◆ mixerHandle
IntPtr NAudio.Mixer.MixerControl.mixerHandle |
|
protected |
◆ mixerHandleType
MixerFlags NAudio.Mixer.MixerControl.mixerHandleType |
|
protected |
◆ nChannels
int NAudio.Mixer.MixerControl.nChannels |
|
protected |
◆ ControlType
◆ IsBoolean
bool NAudio.Mixer.MixerControl.IsBoolean |
|
get |
Is this a boolean control.
◆ IsCustom
bool NAudio.Mixer.MixerControl.IsCustom |
|
get |
True if this is a custom control.
◆ IsListText
bool NAudio.Mixer.MixerControl.IsListText |
|
get |
True if this is a list text control.
◆ IsSigned
bool NAudio.Mixer.MixerControl.IsSigned |
|
get |
True if this is a signed control.
◆ IsUnsigned
bool NAudio.Mixer.MixerControl.IsUnsigned |
|
get |
True if this is an unsigned control.
◆ Name
String NAudio.Mixer.MixerControl.Name |
|
get |
The documentation for this class was generated from the following file:
- /Users/sumansaurabh/Documents/my-startup/xeno-rat/Plugins/LiveMicrophone/lib/NAudio.WinMM/Mixer/MixerControl.cs