Audio Capture Filter (Compact 2013)

3/26/2014

The Audio Capture filter represents an audio capture device. It has one capture output pin and one input pin for each media type on the card such as Line In, Mic and CD.

Filter property

Description

Filter Interfaces

IBaseFilter,

IAMAudioInputMixer, IAMFilterMiscFlags, IAMResourceControl, IPersistPropertyBag, ISpecifyPropertyPages

Input Pin Media Types

MEDIATYPE_AnalogAudio, MEDIASUBTYPE_NULL

Input Pin Interfaces

IMemInputPin, IPin, IQualityControl, IAMAudioInputMixer

Output Pin Media Types

MEDIATYPE_Audio, MEDIASUBTYPE_NULL

Output Pin Interfaces

IAMBufferNegotiation Interface, IAMPushSource, IAMStreamConfig Interface, IAMStreamControl, IKsPropertySet Interface, IReferenceClock Interface, IQualityControl

Filter CLSID

Not applicable

Executable

quartz.dll

Merit

MERIT_DO_NOT_USE

Filter Category

CLSID_AudioInputDeviceCategory

The input pins correspond to physical hardware connections. They are never connected to DirectShow filters.

GSM610 uses the PCM subtype but requires a specific wave format tag to select it.

The code example below shows how to set the format on the audio capture filter to enable GSM610 output:

AM_MEDIA_TYPE mt; 
GSM610WAVEFORMAT wf; 
#ifndef WAVE_FORMAT_GSM610 
#define WAVE_FORMAT_GSM610 0x31 
#endif 
mt.majortype = MEDIATYPE_Audio; 
mt.bFixedSizeSamples = true; 
mt.bTemporalCompression=false; 
mt.lSampleSize=4096; 
mt.formattype=FORMAT_WaveFormatEx; 
mt.pUnk=NULL; 
wf.wfx.wFormatTag = WAVE_FORMAT_GSM610; 
wf.wfx.nChannels = 0x0001; 
wf.wfx.nSamplesPerSec = 0x1f40; 
wf.wfx.nAvgBytesPerSec = 0x00000659; 
wf.wfx.nBlockAlign = 0x0041; 
wf.wfx.wBitsPerSample = 0x0000; 
wf.wfx.cbSize = 0x0002; 
wf.wSamplesPerBlock = 0x140; 
mt.cbFormat = sizeof( GSM610WAVEFORMAT ); 
mt.pbFormat = (BYTE *) &wf; 
Show: