📄 index_demos.html
字号:
<TR class="small" bgcolor="#FFFFFF">
<TD><A HREF="#vcmulticast">Multicast source and end-point</A></TD>
<TD></TD>
<TD>Multicast source and end-point samples. Show how to create a multicast source, join a multicast group and stream real-time audio over multicast connection.</TD>
</TR>
<TR class="small" bgcolor="#DFDFDF">
<TD><A HREF="#vcconfroom">Conference Server and Client</A></TD>
<TD></TD>
<TD>An audio conference sample, where several clients can communicate with each other at the same time.</TD>
</TR>
<TR class="small" bgcolor="#FFFFFF">
<TD></TD>
<TD></TD>
<TD></TD>
</TR>
</TABLE>
</DIV>
<!------------------------->
<DIV><P><HR>
<P><A NAME="base"><H4>Simple console samples</H4></A>
<P>Basic tasks, such as audio recording, playback, mixing, stream encoding and decoding are easy to do with VC components. These tasks are demonstrated in a set of simple samples. Every sample performs exactly one task. You can skip this section if you are interested in more advanced examples.
<P>We will start with <B>deviceEnum</B> application. It lists all audio devices installed on a system. To save the output, redirect it to a file:
<P><CODE>deviceEnum.exe > devices.xml</CODE>
<P>Then open <CODE>devices.xml</CODE> file with Internet browser. Or you can use the GUI window provided with this application to view the output.
<P>The <CODE>deviceEnum.dpr</CODE> source file shows that we are using <CODE>unaWaveInDevice</CODE> and <CODE>unaWaveOutDevice</CODE> classes from <CODE>unaMsAcmClasses.pas</CODE> unit for device enumeration.
<P>Similar <B>acmEnum</B> application enumerates audio codecs installed on a system. It uses Microsoft Multimedia Audio API and Audio Compression Manager (ACM) routines to perform the enumeration.
<P><B>recorder</B> and <B>player</B> demos show how to record and playback audio streams with different sampling parameters. Review configuration parameters of these demos by editing the <CODE>recorder.ini</CODE> and <CODE>player.ini</CODE> files.
<P>Audio streams encoding and decoding is also one of the basic task, which is usually performed with VC components. The <B>codec</B> application uses <CODE>unaMsAcmCodec</CODE> class which wraps the ACM API. Before encoding a file with PCM audio stream should be created (use <B>recorder</B> demo to do so). Default input file name is <CODE>rec_buf.dat</CODE>. Output will be saved in <CODE>out_buf.dat</CODE> file. Refer to the <CODE>codec.ini</CODE> file for configuration details. To decode the stream back to PCM format, start the demo with "/rev" command line switch:
<P><CODE>>codec.exe /rev out_buf.dat</CODE>
<P>Some applications require several audio streams to be mixed together to be played back at the same time. While many sound card drivers allow several wave streams to be played back at the same time (so they will be mixed by hardware), sometimes it is more advisable to mix audio inside your application, and that is what our <B>mixer</B> application does. By default it mixes two input PCM files--<CODE>rec_buf1.dat</CODE> and <CODE>rec_buf2.dat</CODE>, but it is possible to supply any number of files when starting the demo from command line, or by editing the <CODE>mixer.ini</CODE> configuration file. Mixing result will be saved in <CODE>mix_buf.dat</CODE> file. Note, that audio streams with different sampling parameters will not be mixed properly. Refer to the <A HREF="#vcsampler">vcSampler</A> application, which can mix any streams.
<P>The <B>volLevel</B> demo is a simple wave volume meter application, which demonstrates the usage of volume detection mechanism, supported by <CODE>unaWaveInDevice</CODE> class (<A HREF="#voicerec">voiceRecDemo</A> application uses the same feature for voice detection). Refer to the <CODE>volLevel.ini</CODE> configuration file, where <CODE>minVolumeLevel</CODE> and <CODE>minActiveTime</CODE> parameters are used to specify the minimum volume level and activation timeout values.
<P>As you may have noticed, all these demos do not use VCL, so resulting executable files are very compact in size. If you are not going to use GUI and VCL in your applications, VC components still can be used efficiently.
<!------------------------->
<DIV><P><HR>
<P><A NAME="fconv"><H4>Format converters</H4></A>
<P><A NAME="wav2mp3"><A HREF="pix/wav2mp3_shot.gif"><IMG src="pix/wav2mp3_shot_thumb.gif" alt="wav2mp3 shot, click for full sized image." border="0"/></A>
<P><B>Wav2mp3</B>, <B>Wav2ogg</B> and <B>Ogg2wav</B> demos use one of the external encoder/decoder to convert WAV into MP3 or Ogg files and Ogg files back to WAV. Currently supported are <A HREF="http://bladeenc.mp3.no/">Blade</A> and <A HREF="http://www.mp3dev.org/">Lame</A> MP3 encoders and <A HREF="http://www.xiph.org/ogg/vorbis/">Ogg/Vorbis</A> encoder and decoder. You need the encoder library files (one or more DLLs) for this demos to work properly. Original WAV file does not has to have required sampling rate, bits or channels number. It even does not has to be in PCM format. All necessary conversion will be done by RIFF reader and PCM resampler used in our demos. The <A HREF="#vcmp3demo">vcMp3Demo</A></LI> demo uses same classes to create or read real-time MP3 or Ogg/Vorbis streams.
</DIV>
<!------------------------->
<DIV><P><HR>
<P><A NAME="vcwaveplay"><H4>Wave Player</H4></A>
<P><A HREF="pix2/wavePlayer.gif"><IMG src="pix2/wavePlayer_tn.gif" alt="Wave Player, click for full sized image." border="0"/></A>
<P><B>Wave Player</B> is a basic WAVe file playback sample with position, volume and tempo control, auto rewind feature and graphics display of audio data.
</DIV>
<!------------------------->
<DIV><P><HR>
<P><A NAME="vcsampler"><H4>Sampler</H4></A>
<P><A HREF="pix2/sampler.gif"><IMG src="pix2/sampler_tn.gif" alt="Sampler, click for full sized image." border="0"/></A>
<A HREF="pix2/sampler_source.gif"><IMG src="pix2/sampler_source_tn.gif" alt="Sampler source, click for full sized image." border="0"/></A>
<P>A more advanced example, <B>Sampler</B> includes the following features: real-time recording and playback, mixing, resampling, WAVe files reading and writing. It is possible to select any of the supported PCM formats for playback and recording. When playback device is active, you can add several wave channels to be mixed together. The source of audio could be any WAVe file stored on your disks.
<P>Every source wave can be resampled at different frequency, which leads to change in tempo it is played back by device. You can also change the volume and pan the wave between channels.
<P>In the <CODE>bin\Free\samples\</CODE> folder of VC demos installation you can find several WAVe files, which can be used as source wave streams for this demo.
</DIV>
<!------------------------->
<DIV><P><HR>
<P><A NAME="vcpulsegen"><H4>Pulse Gen</H4></A>
<P><A HREF="pix2/pulseGen.gif"><IMG src="pix2/pulseGen_tn.gif" alt="Pulse Gen, click for full sized image." border="0"/></A>
<A HREF="pix2/pulseGen_source.gif"><IMG src="pix2/pulseGen_source_tn.gif" alt="Pulse Gen source, click for full sized image." border="0"/></A>
<P>The <B>Pulse Gen</B> sample shows how to generate a sine audio waves, mix and playback them in real time and optionally save the result into a WAVe file.
</DIV>
<!------------------------->
<DIV><P><HR>
<P><A NAME="vcLoopback"><H4>Loopback</H4></A>
<P><A HREF="pix2/loopback.gif"><IMG src="pix2/loopback_tn.gif" alt="Loopback, click for full sized image." border="0"/></A>
<P>It is possible to fine-tune internal chunk size used by all VC components to achieve smaller latency or better CPU performance according to special needs. <B>Loopback</B> demo shows how to change the chunk size programmatically, and displays codec compression ratio as well as current recording/playback latency.
<P>To calculate the latency this demo compares actual number of samples being recorded and played back. Some audio drivers or sound cards may return incorrect values, so correct calculation is not always possible.
</DIV>
<!------------------------->
<DIV><P><HR>
<P><A NAME="voicerec"><H4>Voice Recording</H4></A>
<P><A HREF="pix2/voiceRecording.gif"><IMG src="pix2/voiceRecording_tn.gif" alt="Voice Recording, click for full sized image." border="0"/></A>
<P>Silence detection feature is important to save the network traffic when recording and sending a human voice. Try to record your voice with <B>Voice Recording</B> sample. Change the vertical slider to adjust minimum volume level you wish to record. When playing back notice that silence gaps were not included in final recording.
<P>This demo also shows how to create non-PCM (compressed) WAVe files to save the disk space.
<P>Refer to <A href="#vcvoicechat">Voice Chat</A> sample which shows how to send compressed voice over network, and use silence detection to save the traffic.
</DIV>
<!------------------------->
<DIV><P><HR>
<P><A NAME="vcdaf"><H4>DAF</H4></A>
<P><A HREF="pix2/daf.gif"><IMG src="pix2/daf_tn.gif" alt="DAF, click for full sized image." border="0"/></A>
<P>Sometimes it may be needed to control the audio chunks manually to achieve some special functionalty. For example, in <B>DAF</B> sample we pass audio chunks from recording device to playback device. Although it may be done by simply linking waveIn with waveOut component, we need to ensure very short delay, of about 20 ms. Due to buffering, it only possible if we take control of the process and pass audio chunks to playback device as soon as they arrive from recording device.
<P>Main job is done by the <CODE>unaAudioFeedbackClass</CODE> class declared in <CODE>unaAudioFeedback</CODE> unit. It intercept audio chunks by assigning <CODE>onDataAvailable</CODE> event handler for waveIn component. Then chunk is being delayed by specified number of milliseconds (or no delayed at all) and sent to internal waveOut component.
</DIV>
<!------------------------->
<DIV><P><HR>
<P><A NAME="vcfft"><H4>Frequency Bands</H4></A>
<P><A HREF="pix2/fft.gif"><IMG src="pix2/fft_tn.gif" alt="Frequency Bands, click for full sized image." border="0"/></A>
<P>The simple <B>Frequency Bands</B> sample shows different kinds of frequency bands displays, all connected to one audio source.
It uses <CODE>TunadspFFTControl</CODE> component for rendering. Small bands can be placed on a form to attract end-users and make your applications more live and bright.
</DIV>
<!------------------------->
<DIV><P><HR>
<P><A NAME="dspeq"><H4>EQ and Splitter</H4></A>
<P><A HREF="pix2/dspeq.gif"><IMG src="pix2/dspeq_tn.gif" alt="DSP EQ, click for full sized image." border="0" /></A>
<P>This demo shows how to use equalizer and frequency splitter from DSP library.
</DIV>
<!------------------------->
<DIV><P><HR>
<P><A NAME="dspnoise"><H4>Noise detector</H4></A>
<P><A HREF="pix2/dspnoise.gif"><IMG src="pix2/dspnoise_tn.gif" alt="Noise Detector, click for full sized image." border="0" /></A>
<P>Displays how different configuration parameters affect the level and noise detectors from DSP Library.
</DIV>
<!------------------------->
<DIV><P><HR>
<P><A NAME="vcsoundrec"><H4>Tape Recorder</H4></A>
<P><A HREF="pix2/soundRecorder.gif"><IMG src="pix2/soundRecorder_tn.gif" alt="Tape Recorder, click for full sized image." border="0"/></A>
<P>Audio data may be stored in memory before it is saved in a file. That allows end-user to master the recording, making small corrections, overwriting or inserting new recording data. The most common application of the <B>Tape Recorder</B> sample is a digital voice recording.
</DIV>
<!------------------------->
<DIV><P><HR>
<P><A NAME="vcmixer"><H4>Mixer Demo</H4></A>
<P><A HREF="pix2/mixerDemo.gif"><IMG src="pix2/mixerDemo_tn.gif" alt="Mixer Demo, click for full sized image." border="0" /></A>
<P>Despite the name, <B>Mixer Demo</B> does not mix audio streams. It simply shows how to use classes from the <CODE>unaMsMixer</CODE> unit, designed to work with system mixer devices. You can select recording source line, control the volume levels and do other tasks, which usually can be done with standard Volume Control application.
</DIV>
<!------------------------->
<DIV><P><HR>
<P><A NAME="vcvoicechat"><H4>Voice Chat</H4></A>
<P><A HREF="pix2/voiceChat.gif"><IMG src="pix2/voiceChat_tn.gif" alt="Voice Chat, click for full sized image." border="0"/></A>
<P><B>Voice Chat</B> is the voice chat sample where TCP/IP network streaming components are used to send and receive audio and text. It includes server and client parts. Server part should be running on one machine while client part on another. Streaming is done in both directions using one connection. No configuration is required for the server. Client must know the IP address (or DNS name) of server machine. This demo uses GSM codec to save the network traffic, and you can choose the sampling rate.
<P>This demo can also use silence detection mechanism to reduce the network traffic. In addition to voice, you can exchange with short text messages.
<P>For more advanced audio streaming application, refer to <A href="#vctalknow">Talk Now</A> or <A href="#vcnettalk">Net Talk</A> demos.
</DIV>
<!------------------------->
<DIV><P><HR>
<P><A NAME="pushbmp"><H4>Push BMP</H4></A>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -