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.
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.
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.
Retrieves the bass equalization for this input.
Syntax
HRESULT get_Bass(
double *pBass
);
Parameters
- pBass
- [in] Pointer to 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 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 indicating 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 value indicating whether loudness is on or off. TRUE indicates on, FALSE 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 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 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 value indicating 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 the value of 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 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 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] 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] Value 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] Value indicating 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
- 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] Value indicating 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] 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] 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.
Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.