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. |
Retrieves the bass equalization for this input.
HRESULT get_Bass(
double *pBass
);
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. |
Retrieves the bass range for this input.
HRESULT get_BassRange(
double *pRange
);
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. |
Retrieves whether the input is enabled.
HRESULT get_Enable(
BOOL *pfEnable
);
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. |
Retrieves the loudness control setting for this input.
HRESULT get_Loudness(
int *pfLoudness
);
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. |
Retrieves the recording level for this input.
HRESULT get_MixLevel(
double *pLevel
);
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. |
Retrieves whether all channels of an input are combined into a mono signal.
HRESULT get_Mono(
BOOL *pfMono
);
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. |
Retrieves the pan level for this input.
HRESULT get_Pan(
double * pPan
);
Value | Meaning |
-1 | Full left |
0 | Center |
1 | Full right |
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. |
Retrieves the treble equalization for this input.
HRESULT get_Treble(
double *pTreble
);
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. |
Retrieves the treble range for this input.
HRESULT get_TrebleRange(
double *pRange
);
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. |
Sets the bass equalization for this input.
HRESULT put_Bass(
double Bass
);
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. |
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.
HRESULT put_Enable(
BOOL fEnable
);
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. |
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.
HRESULT put_Loudness(
BOOL fLoudness
);
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. |
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.
HRESULT put_MixLevel(
double Level
);
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. |
Combines all channels of an input into a mono signal.
HRESULT put_Mono(
BOOL fMono
);
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. |
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.
HRESULT put_Pan(
double Pan
);
Value | Meaning |
-1 | Full left |
0 | Center |
1 | Full right |
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. |
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.
HRESULT put_Treble(
[in] double Treble
);
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. |
This method boosts or cuts the signal's treble by a specified number of decibels before it is recorded.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.