Audio Mixer
(→DirectShow filter specification) |
|||
Line 5: | Line 5: | ||
Number of input pins >= 1 (new pin will be added after connection of all | Number of input pins >= 1 (new pin will be added after connection of all | ||
free input pins). | free input pins). | ||
+ | |||
Number of output pins >= 1 (new pin will be added after connection of all | Number of output pins >= 1 (new pin will be added after connection of all | ||
free output pins). | free output pins). | ||
− | Input/output media type: MEDIATYPE_Audio, MEDIASUBTYPE_PCM, | + | |
− | FORMAT_WaveFormatEx. | + | Input/output media type: MEDIATYPE_Audio, MEDIASUBTYPE_PCM, FORMAT_WaveFormatEx. |
Parameters of format: | Parameters of format: | ||
WAVEFORMATEX: wFormatTag=WAVE_FORMAT_PCM | WAVEFORMATEX: wFormatTag=WAVE_FORMAT_PCM | ||
− | WAVEFORMATEX: nSamplesPerSec, wBitsPerSample: the same for all | + | |
− | inputs/outputs. | + | WAVEFORMATEX: nSamplesPerSec, wBitsPerSample: the same for all inputs/outputs. |
+ | |||
WAVEFORMATEX: nChannels: 1 or 2 (mono or stereo). Can be different for | WAVEFORMATEX: nChannels: 1 or 2 (mono or stereo). Can be different for | ||
different input/output pins. | different input/output pins. | ||
Line 23: | Line 25: | ||
also (without graph stop). | also (without graph stop). | ||
− | Notes | + | Notes: |
− | + | ||
− | + | * All input frequencies should be identical (resampling not implemented in current version). | |
− | + | ||
− | (mono | + | * After start of graph the media type of output pins cannot be changed (mono to stereo and vice versa). |
The filter will have a COM interface and property page for set/get parameters of mixing (Input/channel -> Output/channel). | The filter will have a COM interface and property page for set/get parameters of mixing (Input/channel -> Output/channel). |
Revision as of 23:36, 14 March 2007
DirectShow filter specification
Audio mixer is a standard DirectShow filter.
Number of input pins >= 1 (new pin will be added after connection of all free input pins).
Number of output pins >= 1 (new pin will be added after connection of all free output pins).
Input/output media type: MEDIATYPE_Audio, MEDIASUBTYPE_PCM, FORMAT_WaveFormatEx.
Parameters of format:
WAVEFORMATEX: wFormatTag=WAVE_FORMAT_PCM
WAVEFORMATEX: nSamplesPerSec, wBitsPerSample: the same for all inputs/outputs.
WAVEFORMATEX: nChannels: 1 or 2 (mono or stereo). Can be different for different input/output pins.
Each input channel can be mixed with second channel of the same pin (for stereo inputs) or with any channel of another input pin (or several input pins). Input channels can be switched on another output pin in play time also (without graph stop).
Notes:
- All input frequencies should be identical (resampling not implemented in current version).
- After start of graph the media type of output pins cannot be changed (mono to stereo and vice versa).
The filter will have a COM interface and property page for set/get parameters of mixing (Input/channel -> Output/channel).
GraphEdit registration categories
You can see filter in GraphEdit:
DirectShow Filters -> MediaLooks AudioMixer MediaLooks Filters -> MediaLooks AudioMixer
GraphEdit usage instructions
Render two (or more) media files in GraphEdit. Connect uncompressed outputs to the inputs of the Audio Mixer and render one or more output pins (AM Out) of the Audio Mixer.
Open the property page of the Audio Mixer. The selector on the left shows the rendered output pins - if you have rendered only one one output pin, only "AM Out 01" is displayed.
The grid matrix on the right defines what is to be output to the selected output pin. Values from 0 (silence - in) to 1 (original level) are accepted. In the current version an empty field will also be treated as silence. If values higher than 1 are specified, the filter will work as an amplifier.
For editing the grid - either double click or press "Space" or "F2".
For example, if you have two input stereo streams and you wish to mix these streams in such a way that both of the input left channels are mixed to the right output channel and both input right channels - to the left, and at the same time decrease the volume of each channel by 30% - this is how your grid should look like.