Microsoft DirectX 9.0 |
Description
The Synth filter is a source filter that generates audio waveforms.
This filter illustrates dynamic graph building. It can switch between uncompressed PCM audio and compressed MS_ADPCM (Microsoft Adaptive Delta Pulse Code Modulation) format.
This filter appears in GraphEdit as "Audio Synthesizer Filter."
For more information about dynamic graph building, see Dynamic Graph Building.
Path
Source: (SDK root)\Samples\C++\DirectShow\Filters\Synth
User's Guide
The Synth filter enables the user to set the waveform, frequency, number of channels, and other properties through the property page. To set either the upper or lower endpoint of the swept frequency range, hold down SHIFT while adjusting the frequency slider. The filter also supports a custom interface, ISynth2, for setting these properties.
To demonstrate the dynamic graph building feature, do the following:
This sample contains the following files:
The CDynamicSource class is adapted from the CSource base class. It uses one or more output pins derived from the CDynamicSourceStream class. The CDynamicSourceStream class is adapted from the CSourceStream class, but derives from the CDynamicOutputPin class rather than the CBaseOutputPin class.
The CDynamicSource class has the following methods not found in CSource:
The CDynamicSourceStream class has the following methods not found in CSourceStream: