⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vc25pro_doc_unavcide.html

📁 Voice Commnucation Components for Delphi
💻 HTML
📖 第 1 页 / 共 5 页
字号:
    <P /><I>Example</I>: refer to the vcTalkNow demo. It has waveOut_server and waveOut_client components.
    Both are used to playback real-time PCM stream received from remote side.
    In this demo, waveOut_server is a consumer of c_codec_serverIn component.
    That means PCM stream, produced by c_codec_serverIn will be passed to waveOut_server automatically.
  <P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">procedure <A HREF="#class_TunavclWaveOutDevice"><SPAN class="class">TunavclWaveOutDevice</SPAN></A>.createNewDevice(); override;</SPAN><P />
      Creates wave Out (playback) device.
    </TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_TunavclWaveOutDevice"><SPAN class="class">TunavclWaveOutDevice</SPAN></A>.applyDeviceFormat(const format: WAVEFORMATEX; isSrc: bool = true): bool; override;</SPAN><P />
    </TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">property <A HREF="#class_TunavclWaveOutDevice"><SPAN class="class">TunavclWaveOutDevice</SPAN></A>.inputIsPcm: [unknown];</SPAN><P />
      Since waveOut device is output device, and output format is PCM, we should specify input format as not PCM.
    </TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">procedure <A HREF="#class_TunavclWaveOutDevice"><SPAN class="class">TunavclWaveOutDevice</SPAN></A>.AfterConstruction(); override;</SPAN><P />
    </TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">property <A HREF="#class_TunavclWaveOutDevice"><SPAN class="class">TunavclWaveOutDevice</SPAN></A>.waveOutDevice: unaWaveOutDevice;</SPAN><P />
      Returns waveOut device.
    </TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">property <A HREF="#class_TunavclWaveOutDevice"><SPAN class="class">TunavclWaveOutDevice</SPAN></A>.deviceId: [unknown];</SPAN><P /></TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">property <A HREF="#class_TunavclWaveOutDevice"><SPAN class="class">TunavclWaveOutDevice</SPAN></A>.mapped: [unknown];</SPAN><P /></TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">property <A HREF="#class_TunavclWaveOutDevice"><SPAN class="class">TunavclWaveOutDevice</SPAN></A>.direct: [unknown];</SPAN><P /></TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">property <A HREF="#class_TunavclWaveOutDevice"><SPAN class="class">TunavclWaveOutDevice</SPAN></A>.calcVolume: [unknown];</SPAN><P /></TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">property <A HREF="#class_TunavclWaveOutDevice"><SPAN class="class">TunavclWaveOutDevice</SPAN></A>.enableDataProcessing: [unknown];</SPAN><P />
      Specifies whether the component would playback any data.
      Setting this property to False does not release the waveOut device.
      Set active property to False to release the device as well.
    </TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">property <A HREF="#class_TunavclWaveOutDevice"><SPAN class="class">TunavclWaveOutDevice</SPAN></A>.onFeedChunk: unavclPipeDataEvent;</SPAN><P />
      Fired when another audio chunk was passed to driver for playback.
      If you are self-feeding the playback, it means you have to feed another chunk to achieve continuous playback.
      <BR /><STRONG>NOTE</STRONG>: VCL is NOT multi-threading safe, and you should avoid using VCL routines and classes in this event.
    </TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">property <A HREF="#class_TunavclWaveOutDevice"><SPAN class="class">TunavclWaveOutDevice</SPAN></A>.onFeedDone: unavclPipeDataEvent;</SPAN><P />
      Fired when chunk was just played out by device.
      This is a good place for any user feedback. Since the data passed
      to this event was played out about 1/25 second ago, you can achieve
      very short delay between actual data being played back, and feedback.
      For example, if you draw an oscilloscope of a wave, use this event
      to be in synch with actual playback.
      <BR /><STRONG>NOTE</STRONG>: VCL is NOT multi-threading safe, and you should avoid using VCL routines and classes in this event.
    </TD></TR></TABLE></DIV>
<DIV><P /><H4>Class <A NAME="class_TunavclWaveCodecDevice"><SPAN class="class">TunavclWaveCodecDevice</SPAN></A>(<A HREF="#class_unavclInOutWavePipe"><SPAN class="class">unavclInOutWavePipe</SPAN></A>)</H4><P />
    <P /><I>Purpose</I>: audio stream conversion from one supported format to another. It can convert PCM stream to other format (compression) or other format to PCM (decompression).
    <P /><I>Usage</I>: If components has no provider component with formatProvider=true, specify PCM stream parameters before activating: pcm_SamplesPerSec, pcm_BitsPerSample and pcm_NumChannels.
    Set formatTag property to specify the audio format you wish to compress to or decompress from.
    Refer to WAVE_FORMAT_XXXX constants from unaMsAcmAPI.pas unit for possible values of this property, or you can use the output of amcEnum demo to receive the list of installed formats.
    Set inputIsPCM to true,  if you wish to convert PCM stream to another audio format (compression).
    Set inputIsPCM to false, if you wish to convert some audio format to PCM stream (decompression).
    <P /><I>Example</I>: refer to the vcTalkNow demo. It has c_codec_serverOut component, which is a consumer of waveIn_server component.
    That means PCM stream, produced by waveIn_server will be passed to c_codec_serverOut automatically.
    It also has ip_server as a consumer. That means compressed audio stream will be passed to ip_server automatically.
  <P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">procedure <A HREF="#class_TunavclWaveCodecDevice"><SPAN class="class">TunavclWaveCodecDevice</SPAN></A>.doSetDriverMode(value: unaAcmCodecDriverMode); override;</SPAN><P /></TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">procedure <A HREF="#class_TunavclWaveCodecDevice"><SPAN class="class">TunavclWaveCodecDevice</SPAN></A>.doSetDriverLibrary(const value: wideString); override;</SPAN><P /></TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">procedure <A HREF="#class_TunavclWaveCodecDevice"><SPAN class="class">TunavclWaveCodecDevice</SPAN></A>.createNewDevice(); override;</SPAN><P />
      Creates ACM codec device.
    </TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">procedure <A HREF="#class_TunavclWaveCodecDevice"><SPAN class="class">TunavclWaveCodecDevice</SPAN></A>.onDriverChanged(); override;</SPAN><P />
      Notifies ACM codec device about driver change.
    </TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_TunavclWaveCodecDevice"><SPAN class="class">TunavclWaveCodecDevice</SPAN></A>.applyDeviceFormat(const format: WAVEFORMATEX; isSrc: bool = true): bool; override;</SPAN><P />
      Applies PCM format for ACM codec device.
    </TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_TunavclWaveCodecDevice"><SPAN class="class">TunavclWaveCodecDevice</SPAN></A>.getFormatExchangeData(out data: pointer): unsigned; override;</SPAN><P />
      Returns format exchange data of the codec.
    </TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">procedure <A HREF="#class_TunavclWaveCodecDevice"><SPAN class="class">TunavclWaveCodecDevice</SPAN></A>.AfterConstruction(); override;</SPAN><P />
    </TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_TunavclWaveCodecDevice"><SPAN class="class">TunavclWaveCodecDevice</SPAN></A>.setNonPCMFormat(const format: WAVEFORMATEX): bool;</SPAN><P />
      Sets non-PCM format for ACM codec device.
    </TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">property <A HREF="#class_TunavclWaveCodecDevice"><SPAN class="class">TunavclWaveCodecDevice</SPAN></A>.codec: unaMsAcmCodec;</SPAN><P />
      Returns ACM codec device.
    </TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">property <A HREF="#class_TunavclWaveCodecDevice"><SPAN class="class">TunavclWaveCodecDevice</SPAN></A>.formatTag: [unknown];</SPAN><P /></TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">property <A HREF="#class_TunavclWaveCodecDevice"><SPAN class="class">TunavclWaveCodecDevice</SPAN></A>.inputIsPcm: [unknown];</SPAN><P /></TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">property <A HREF="#class_TunavclWaveCodecDevice"><SPAN class="class">TunavclWaveCodecDevice</SPAN></A>.calcVolume: [unknown];</SPAN><P /></TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">property <A HREF="#class_TunavclWaveCodecDevice"><SPAN class="class">TunavclWaveCodecDevice</SPAN></A>.formatTagImmunable: [unknown];</SPAN><P />
      Codecs usually does not use the format tag provided by other PCM devices.
    </TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">property <A HREF="#class_TunavclWaveCodecDevice"><SPAN class="class">TunavclWaveCodecDevice</SPAN></A>.driverMode: [unknown];</SPAN><P />
      ACM driver mode. When set to unacdm_acm, codec uses ACM to access stream conversion routines.
      unacdm_installable tells codec to use installable driver, specified by driverLibrary.
      unacdm_internal is not currently used.
    </TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">property <A HREF="#class_TunavclWaveCodecDevice"><SPAN class="class">TunavclWaveCodecDevice</SPAN></A>.driverLibrary: [unknown];</SPAN><P />
      When driverMode is set to unacdm_installable this property specifies the name of driver library to use.
      Refer to MSDN documentation for more information about installable drivers.
    </TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">property <A HREF="#class_TunavclWaveCodecDevice"><SPAN class="class">TunavclWaveCodecDevice</SPAN></A>.isFormatProvider: [unknown];</SPAN><P />
      codec component is usually a format provider--so default value for was changed to true.
    </TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">property <A HREF="#class_TunavclWaveCodecDevice"><SPAN class="class">TunavclWaveCodecDevice</SPAN></A>.enableDataProcessing: [unknown];</SPAN><P />
      Specifies whether the component would perform any data conversion.
    </TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">property <A HREF="#class_TunavclWaveCodecDevice"><SPAN class="class">TunavclWaveCodecDevice</SPAN></A>.silenceDetectionMode: [unknown];</SPAN><P />
      Specifies how component should detect silence.
    </TD></TR></TABLE></DIV>
<DIV><P /><H4>Class <A NAME="class_TunavclWaveRiff"><SPAN class="class">TunavclWaveRiff</SPAN></A>(<A HREF="#class_unavclInOutWavePipe"><SPAN class="class">unavclInOutWavePipe</SPAN></A>)</H4><P />
    <P /><I>Purpose</I>: reads audio stream from WAV file, producing PCM stream, or creates and writes new WAV file.
    <P /><I>Usage</I>: set fileName property to specify the file to use.
    Set isInput to true if you wish to read from WAV file.
    Set isInput to false if you wish to create and write into WAV file.
    Set active to true, or call the open() method to start reading or writing.
    Set active to false, or call the close() method to stop reading, or close the produced WAV file.
    Set realTime to true if you wish the stream read from WAV file will be available in real time manner.
    <P /><I>Example (reading)</I>: refer to the vcWavePlayer demo. Look for wavIn component, which is used to read the stream from WAV file.
    It has waveResampler as a consumer, that means read audio stream will be passed to waveResampler automatically.
    <P /><I>Example (writing)</I>: refer to the voiceRec demo. Look for waveRiff component, which is a consumer of waveIn component.
    That means PCM stream, produced by waveIn will be passed to waveRiff automatically. In this demo waveRiff component is used to create the WAV file.
  <P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">procedure <A HREF="#class_TunavclWaveRiff"><SPAN class="class">TunavclWaveRiff</SPAN></A>.doSetLoop(value: bool); override;</SPAN><P /></TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">procedure <A HREF="#class_TunavclWaveRiff"><SPAN class="class">TunavclWaveRiff</SPAN></A>.createNewDevice(); override;</SPAN><P />
      Creates Riff wave device.
    </TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_TunavclWaveRiff"><SPAN class="class">TunavclWaveRiff</SPAN></A>.applyDeviceFormat(const format: WAVEFORMATEX; isSrc: bool = true): bool; override;</SPAN><P />
      This method is supported in WAV-writing mode only (isInput = false),
      and only PCM formats are supported.
    </TD></TR></TABLE><P /><TABLE BORDER="1" width="100%"><TR><TD><SPAN class="source">function <A HREF="#class_TunavclWaveRiff"><SPAN class="class">TunavclWaveRiff</SPAN></A>.getFormatExchangeData(out data: pointer): unsigned; override;</SPAN><P />
    </TD></TR></TABLE><P

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -