Microsoft DirectX 8.0 |
The IAMAudioInputMixer interface is implemented on each input pin of the Audio Capture Filter and tells the filter what level, panning, and equalizer to use for each input. The name of each pin, such as "Line in" or "Microphone", reflects the type of input.
Because the capabilities of the Audio Capture filter reflect the particular hardware device it is associated with, the filter cannot support an interface method if the device does not support it.
Application developers: Use this interface to access the sound card's analog inputs, and adjust audio input characteristics on the Audio Capture filter such as mixing, use of mono or stereo, mix level, pan level, loudness, treble, and bass settings. Use the pin names to decide how to set the recording levels for each type of input.
Filter Developers: Implement this interface on each input pin of an audio capture filter. You can also implement this interface on the audio capture filter itself to control the overall record level and panning after the audio mixing occurs.
Methods in Vtable Order
IUnknown methods Description QueryInterface Retrieves pointers to supported interfaces. AddRef Increments the reference count. Release Decrements the reference count. IAMAudioInputMixer methods Description put_Enable Enables or disables an input in the mix. get_Enable Retrieves whether the input is enabled. put_Mono Combines all channels of an input into a mono signal. get_Mono Retrieves whether all channels of an input are combined into a mono signal. put_MixLevel Sets the record level for this input. get_MixLevel Retrieves the recording level for this input. put_Pan Sets the pan for this input. get_Pan Retrieves the pan for this input. put_Loudness Turns the loudness control for this input on or off. get_Loudness Retrieves the loudness control setting for this input. put_Treble Sets the treble equalization for this input. get_Treble Retrieves the treble equalization for this input. get_TrebleRange Retrieves the treble range for this input. put_Bass Sets the bass equalization for this input. get_Bass Retrieves the bass equalization for this input. get_BassRange Retrieves the bass range for this input.
Retrieves the bass equalization for this input.
Syntax
HRESULT get_Bass(
double *pBass
);
Parameters
- pBass
- [in] Pointer to a variable of type double that represents the bass gain in decibels (a negative value means attenuate).
Return Value
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
E_FAIL Failure. E_POINTER Null pointer argument. E_INVALIDARG Invalid argument. E_NOTIMPL Method isn't supported. NOERROR Success.
Retrieves the bass range for this input.
Syntax
HRESULT get_BassRange(
double *pRange
);
Parameters
- pRange
- [out, retval] pointer to a variable of type double that represents the largest value allowed in the bass range specified in put_Bass. For example, 6.0 means any value between 6.0 and 6.0 is allowed.
Return Value
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
E_FAIL Failure. E_POINTER Null pointer argument. E_INVALIDARG Invalid argument. E_NOTIMPL Method isn't supported. NOERROR Success.
Retrieves whether the input is enabled.
Syntax
HRESULT get_Enable(
BOOL *pfEnable
);
Parameters
- pfEnable
- [in] Pointer to a value of type BOOL that indicates whether mixing is enabled for the input. TRUE indicates the input is enabled, FALSE indicates the input is disabled.
Return Value
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
E_FAIL Couldn't retrieve information. E_POINTER Null pointer argument. E_INVALIDARG Invalid argument. E_NOTIMPL Method isn't supported. NOERROR Success.
Retrieves the loudness control setting for this input.
Syntax
HRESULT get_Loudness(
int *pfLoudness
);
Parameters
- pfLoudness
- [in] Pointer to a variable of type int that indicates whether loudness is on or off; 1 indicates on, 0 indicates off.
Return Value
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
E_FAIL Error. E_POINTER Null pointer argument. E_INVALIDARG Invalid argument. E_NOTIMPL Method isn't supported. E_OUTOFMEMORY Out of memory. NOERROR Success.
Retrieves the recording level for this input.
Syntax
HRESULT get_MixLevel(
double *pLevel
);
Parameters
- [out] pLevel
- Pointer to a variable of type bool that represents the recording level. Values range between 0 (off) and 1 (full volume). AMF_AUTOMATICGAIN (-0x0001), if supported, means automatic adjustment of level.
Return Value
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
E_FAIL Error retrieving recording level. E_POINTER Null pointer argument. E_INVALIDARG Invalid argument. E_NOTIMPL Method isn't supported. NOERROR Success.
Retrieves whether all channels of an input are combined into a mono signal.
Syntax
HRESULT get_Mono(
BOOL *pfMono
);
Parameters
- pfMono
- [in] Pointer to a variable of type BOOL that indicates whether mono is enabled. TRUE indicates mono is enabled, FALSE indicates mono is disabled.
Return Value
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
E_FAIL Error getting mono control. E_POINTER Null pointer argument. E_INVALIDARG Invalid argument. E_NOTIMPL Method isn't supported. NOERROR Success.
Retrieves the pan level for this input.
Syntax
HRESULT get_Pan(
double *pPan
);
Parameters
- pPan
- [in] Pointer to a variable of type double that represents the pan level. Possible levels are from 1 to 1, with specific values as follows:
1 Full left 0 Center 1 Full right
Return Value
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
E_FAIL Error retrieving pan level. E_POINTER Null pointer argument. E_INVALIDARG Invalid argument. E_NOTIMPL Can't pan: not stereo. NOERROR Success.
Retrieves the treble equalization for this input.
Syntax
HRESULT get_Treble(
double *pTreble
);
Parameters
- pTreble
- [in] Pointer to a variable of type double that represents the treble gain in decibels (a negative value means attenuate).
Return Value
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
E_FAIL Failure. E_POINTER Null pointer argument. E_INVALIDARG Invalid argument. E_NOTIMPL Method isn't supported. NOERROR Success.
Retrieves the treble range for this input.
Syntax
HRESULT get_TrebleRange(
double *pRange
);
Parameters
- pRange
- [out, retval] Pointer to a variable of type double that represents the largest value allowed in the treble range. This is the maximum value allowed in put_Treble. For example, 6.0 means any value between 6.0 and 6.0 is allowed.
Return Value
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
E_FAIL Failure. E_POINTER Null pointer argument. E_INVALIDARG Invalid argument. E_NOTIMPL Method isn't supported. NOERROR Success.
Sets the bass equalization for this input.
Syntax
HRESULT put_Bass(
double Bass
);
Parameters
- Bass
- [in] Variable of type double that specifies the gain in decibels (a negative value means attenuate).
Return Value
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
E_FAIL Failure. E_POINTER Null pointer argument. E_INVALIDARG Argument is invalid. Must be in range given by get_BassRange. E_NOTIMPL Method isn't supported. NOERROR Success.
Remarks
Boosts or cuts the signal's bass before it is recorded by the number of decibels specified by Bass.
Enables or disables an input in the mix.
Syntax
HRESULT put_Enable(
BOOL fEnable
);
Parameters
- fEnable
- [in] Variable of type BOOL that specifies whether to enable or disable an input. TRUE enables the input, FALSE disables it.
Return Value
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
E_FAIL Failed to enable or disable an input. E_POINTER Null pointer argument. E_INVALIDARG Invalid argument. E_NOTIMPL Method isn't supported. NOERROR Successfully enabled or disabled an input.
Remarks
If disabled, this input will not be mixed in as part of the recorded signal.
Turns the loudness control for this input on or off.
Syntax
HRESULT put_Loudness(
BOOL fLoudness
);
Parameters
- fLoudness
- [in] Variable of type BOOL that specifies whether loudness is on. TRUE sets loudness on, FALSE sets loudness off.
Return Value
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
E_FAIL Loudness control set. E_POINTER Null pointer argument. E_INVALIDARG Invalid argument. E_NOTIMPL Method isn't supported. NOERROR Success.
Remarks
IAMAudioInputMixer::put_Loudness boosts the bass of low volume signals before they are recorded to compensate for the fact that your ear doesn't hear quiet bass sounds as well as other sounds.
Sets the record level for this input.
Syntax
HRESULT put_MixLevel(
double Level
);
Parameters
- Level
- Variable of type double that specifies the recording level. Values range between 0 (off) and 1 (full volume). AMF_AUTOMATICGAIN (-0x0001), if supported, means automatic adjustment of level.
Return Value
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
E_FAIL Error setting volume. E_POINTER Null pointer argument. E_INVALIDARG Record level must be between 0 and 1. E_NOTIMPL Automatic gain currently not implemented. NOERROR Success.
Combines all channels of an input into a mono signal.
Syntax
HRESULT put_Mono(
BOOL fMono
);
Parameters
- fMono
- [in] Variable of type BOOL that specifies a mono or multichannel signal. TRUE indicates mono, FALSE indicates multichannel.
Return Value
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
E_FAIL Error setting mono control. E_POINTER Null pointer argument. E_INVALIDARG Invalid argument. E_NOTIMPL Method isn't supported. NOERROR Success.
Remarks
When set to mono mode, making a stereo recording of this input will have both channels contain the same data. The result will be a mixture of the left and right signals.
Sets the pan for this input.
Syntax
HRESULT put_Pan(
double Pan
);
Parameters
- Pan
- [in] Variable of type double that specifies the pan level. Possible values for Pan are from -1 to 1, with specific values as follows:
-1 Full left 0 Center 1 Full right
Return Value
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
E_FAIL Error setting volume. E_POINTER Null pointer argument. E_INVALIDARG Pan level must be between -1 and 1. E_NOTIMPL Can't pan: not stereo. NOERROR Success.
Remarks
Setting the pan of an input to full left makes that input's signal go only into the left channel of a stereo recording. Panning has no effect for a mono recording.
Sets the treble equalization for this input.
Syntax
HRESULT put_Treble(
[in] double Treble
);
Parameters
- Treble
- [in] Variable of type double that specifies the gain in decibels (a negative value means attenuate).
Return Value
Returns an HRESULT value that depends on the implementation of the interface. HRESULT can include one of the following standard constants, or other values not listed.
E_FAIL Failure. E_POINTER Null pointer argument. E_INVALIDARG Argument is invalid. Must be in range given by get_TrebleRange. E_NOTIMPL Method isn't supported. NOERROR Success.
Remarks
This method boosts or cuts the signal's treble by a specified number of decibels before it is recorded.