General info | Getting started | Samples | Components reference | FAQ | Solutions |

Samples


Mixer

This example demonstrates:

1. How to use WaveMixer component to mix audio stream from the sound card (WaveIn component) with stream from WAV-file (WaveRiff component).

2. How to use WaveResampler component to change PCM parameters of audio stream (sampling rate, bits per sample and number of channels).

3. How to use GetDeviceCount and GetDeviceName methods of WaveIn /WaveOut components to enumerate audio devices.


Mixer

The chain of components we will build is (WaveIn, WaveRiff) => WaveMixer => WaveOut
(WaveIn and WaveRiff components are both providers for WaveMixer).

Please follow these steps:
1. Place WaveIn, WaveRiff, WaveMixer and WaveOut components on form.
2. Specify WAV file name you wish to playback by setting WaveRiff.FileName property.
3. Set WaveRiff.Loop property to True is you wish to loop WAV file playback.
4. Set WaveMixer.RealTime property to True.
5. Set links between components in chain by making WaveMixer to be a consumer of WaveIn and WaveRiff components, and WaveOut a consumer of WaveMixer. Refer to Providers & Consumers section for details.
6. Activate WaveIn and WaveRiff components by setting Active property to True.


Resampler

The chain of components we will build is WaveIn => WaveResampler => WaveOut

Please follow these steps:
1. Place WaveIn, WaveResampler and WaveOut components on form.
2. Set WaveResampler.DstSamplesPerSec property to 8000. This reduces quality of output stream from 44100 kHz to 8000 kHz.
3. Set WaveResampler.IsFormatProvider property to True. This will cause WaveResampler to assign its stream format parameters to consumer (WaveOut).
4. Set links between components in a chain by making WaveResampler to be a consumer of WaveIn component, and waveOut a consumer of WaveResampler. Refer to Providers & Consumers section for details.
5. Activate WaveIn component by setting Active property to True.


See also...

Simple WaveIn-WaveOut loopback, WAVe recorder/player, ASIO, MultiConsumer, TalkNow, Voice Chat, Conference, Volume Control, Remote Lecturer, DirectStream, IP Streaming, RTSP Multi-Transmitter Server, STUN Server and Client, RTP Conference, Web sample: MediaGate Client


VCX Library 3.0 © 2012 Lake of Soft
All rights reserved.