Index Topic Contents | |||
Previous Topic: IAMAudioCutListElement Interface Next Topic: IAMBufferNegotiation Interface |
IAMAudioInputMixer Interface
The IAMAudioInputMixer interface tells an audio capture filter what level, panning, and equalizer to use for each input. The name of each pin, such as "Line input 1" or "Mic", reflects the type of input.
Implementation of the methods on this interface depends on the device. A device might not implement all methods depending on its capabilities.
When to Implement
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.
When to Use
Use this interface when your application needs to adjust audio input characteristics such as mixing of a particular input, 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.
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. IAMAudioInputMixer Interface
IAMAudioInputMixer::get_BassRetrieves the bass equalization for this input.
HRESULT get_Bass(
double *pBass
);Parameters
- pBass
- [in] Pointer to the bass gain in decibels (a negative value means attenuate).
Return Values
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.
Value Meaning E_FAIL Failure. E_POINTER Null pointer argument. E_INVALIDARG Invalid argument. E_NOTIMPL Method isn't supported. NOERROR Success. IAMAudioInputMixer Interface
IAMAudioInputMixer::get_BassRangeRetrieves the bass range for this input.
HRESULT get_BassRange(
double *pRange
);Parameters
- pRange
- [out, retval] 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 Values
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.
Value Meaning E_FAIL Failure. E_POINTER Null pointer argument. E_INVALIDARG Invalid argument. E_NOTIMPL Method isn't supported. NOERROR Success. IAMAudioInputMixer Interface
IAMAudioInputMixer::get_EnableRetrieves whether the input is enabled.
HRESULT get_Enable(
BOOL *pfEnable
);Parameters
- pfEnable
- [in] Pointer to a value indicating whether mixing is enabled for the input. TRUE indicates the input is enabled, FALSE indicates the input is disabled.
Return Values
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.
Value Meaning E_FAIL Couldn't retrieve information. E_POINTER Null pointer argument. E_INVALIDARG Invalid argument. E_NOTIMPL Method isn't supported. NOERROR Success. IAMAudioInputMixer Interface
IAMAudioInputMixer::get_LoudnessRetrieves the loudness control setting for this input.
HRESULT get_Loudness(
int *pfLoudness
);Parameters
- pfLoudness
- [in] Pointer to value indicating whether loudness is on or off. TRUE indicates on, FALSE indicates off.
Return Values
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.
Value Meaning 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. IAMAudioInputMixer Interface
IAMAudioInputMixer::get_MixLevelRetrieves the recording level for this input.
HRESULT get_MixLevel(
double *pLevel
);Parameters
- [out] pLevel
- Pointer to the value of the recording level. Values range between 0 (off) and 1 (full volume). AMF_AUTOMATICGAIN (-0x0001), if supported, means automatic adjustment of level.
Return Values
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.
Value Meaning E_FAIL Error retrieving recording level. E_POINTER Null pointer argument. E_INVALIDARG Invalid argument. E_NOTIMPL Method isn't supported. NOERROR Success. IAMAudioInputMixer Interface
IAMAudioInputMixer::get_MonoRetrieves whether all channels of an input are combined into a mono signal.
HRESULT get_Mono(
BOOL *pfMono
);Parameters
- pfMono
- [in] Pointer to a value indicating whether mono is enabled. TRUE indicates mono is enabled, FALSE indicates mono is disabled.
Return Values
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.
Value Meaning E_FAIL Error getting mono control. E_POINTER Null pointer argument. E_INVALIDARG Invalid argument. E_NOTIMPL Method isn't supported. NOERROR Success. IAMAudioInputMixer Interface
IAMAudioInputMixer::get_PanRetrieves the pan level for this input.
HRESULT get_Pan(
double * pPan
);Parameters
- pPan
- [in] Pointer to the value of the pan level. Possible levels are from -1 to 1, with specific values as follows:
Value Meaning -1 Full left 0 Center 1 Full right Return Values
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.
Value Meaning E_FAIL Error retrieving pan level. E_POINTER Null pointer argument. E_INVALIDARG Invalid argument. E_NOTIMPL Can't pan: not stereo. NOERROR Success. IAMAudioInputMixer Interface
IAMAudioInputMixer::get_TrebleRetrieves the treble equalization for this input.
HRESULT get_Treble(
double *pTreble
);Parameters
- pTreble
- [in] Pointer to the treble gain in decibels (a negative value means attenuate).
Return Values
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.
Value Meaning E_FAIL Failure. E_POINTER Null pointer argument. E_INVALIDARG Invalid argument. E_NOTIMPL Method isn't supported. NOERROR Success. IAMAudioInputMixer Interface
IAMAudioInputMixer::get_TrebleRangeRetrieves the treble range for this input.
HRESULT get_TrebleRange(
double *pRange
);Parameters
- pRange
- [out, retval] 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 Values
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.
Value Meaning E_FAIL Failure. E_POINTER Null pointer argument. E_INVALIDARG Invalid argument. E_NOTIMPL Method isn't supported. NOERROR Success. IAMAudioInputMixer Interface
IAMAudioInputMixer::put_BassSets the bass equalization for this input.
HRESULT put_Bass(
double Bass
);Parameters
- Bass
- [in] Gain in decibels (a negative value means attenuate).
Return Values
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.
Value Meaning 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.
IAMAudioInputMixer Interface
IAMAudioInputMixer::put_EnableEnables or disables an input in the mix.
HRESULT put_Enable(
BOOL fEnable
);Parameters
- fEnable
- [in] Value to enable or disable an input. TRUE enables the input, FALSE disables it.
Return Values
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.
Value Meaning 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.
IAMAudioInputMixer Interface
IAMAudioInputMixer::put_LoudnessTurns the loudness control for this input on or off.
HRESULT put_Loudness(
BOOL fLoudness
);Parameters
- fLoudness
- [in] TRUE sets loudness on, FALSE sets loudness off.
Return Values
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.
Value Meaning 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.
IAMAudioInputMixer Interface
IAMAudioInputMixer::put_MixLevelSets the record level for this input.
HRESULT put_MixLevel(
double Level
);Parameters
- Level
- Recording level. Values range between 0 (off) and 1 (full volume). AMF_AUTOMATICGAIN (-0x0001), if supported, means automatic adjustment of level.
Return Values
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.
Value Meaning 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. IAMAudioInputMixer Interface
IAMAudioInputMixer::put_MonoCombines all channels of an input into a mono signal.
HRESULT put_Mono(
BOOL fMono
);Parameters
- fMono
- [in] TRUE indicates mono, FALSE indicates multichannel.
Return Values
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.
Value Meaning 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.
IAMAudioInputMixer Interface
IAMAudioInputMixer::put_PanSets the pan for this input.
HRESULT put_Pan(
double Pan
);Parameters
- Pan
- [in] Pan level. Possible values for Pan are from -1 to 1, with specific values as follows:
Value Meaning -1 Full left 0 Center 1 Full right Return Values
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.
Value Meaning 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.
IAMAudioInputMixer Interface
IAMAudioInputMixer::put_TrebleSets the treble equalization for this input.
HRESULT put_Treble(
[in] double Treble
);Parameters
- Treble
- [in] Gain in decibels (a negative value means attenuate).
Return Values
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.
Value Meaning 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.
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.