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.

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 methodsDescription
QueryInterface Retrieves pointers to supported interfaces.
AddRef Increments the reference count.
Release Decrements the reference count.
IAMAudioInputMixer methodsDescription
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::get_Bass

IAMAudioInputMixer Interface

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.

IAMAudioInputMixer::get_BassRange

IAMAudioInputMixer Interface

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.

IAMAudioInputMixer::get_Enable

IAMAudioInputMixer Interface

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_FAILCouldn't retrieve information.
E_POINTER Null pointer argument.
E_INVALIDARG Invalid argument.
E_NOTIMPL Method isn't supported.
NOERROR Success.

IAMAudioInputMixer::get_Loudness

IAMAudioInputMixer Interface

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_FAILError.
E_POINTER Null pointer argument.
E_INVALIDARG Invalid argument.
E_NOTIMPL Method isn't supported.
E_OUTOFMEMORYOut of memory.
NOERROR Success.

IAMAudioInputMixer::get_MixLevel

IAMAudioInputMixer Interface

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_FAILError retrieving recording level.
E_POINTER Null pointer argument.
E_INVALIDARG Invalid argument.
E_NOTIMPL Method isn't supported.
NOERROR Success.

IAMAudioInputMixer::get_Mono

IAMAudioInputMixer Interface

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_FAILError getting mono control.
E_POINTER Null pointer argument.
E_INVALIDARG Invalid argument.
E_NOTIMPL Method isn't supported.
NOERROR Success.

IAMAudioInputMixer::get_Pan

IAMAudioInputMixer Interface

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_FAILError retrieving pan level.
E_POINTER Null pointer argument.
E_INVALIDARG Invalid argument.
E_NOTIMPL Can't pan: not stereo.
NOERROR Success.

IAMAudioInputMixer::get_Treble

IAMAudioInputMixer Interface

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.

IAMAudioInputMixer::get_TrebleRange

IAMAudioInputMixer Interface

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.

IAMAudioInputMixer::put_Bass

IAMAudioInputMixer Interface

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.

IAMAudioInputMixer::put_Enable

IAMAudioInputMixer Interface

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_FAILFailed 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::put_Loudness

IAMAudioInputMixer Interface

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_FAILLoudness 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::put_MixLevel

IAMAudioInputMixer Interface

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_FAILError 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::put_Mono

IAMAudioInputMixer Interface

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_FAILError 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::put_Pan

IAMAudioInputMixer Interface

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_FAILError 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::put_Treble

IAMAudioInputMixer Interface

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 Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.