vctalknow-client.pxs

来自「Voice Commnucation Components for Delphi」· PXS 代码 · 共 73 行

PXS
73
字号

{
	vcTalkNow-client demo script.
	Use with VC 2.5 Pro Scriptor component.

	Copyright (c) 2002-2005 Lake of Soft, Ltd
	All rights reserved

	http://lakeofsoft.com/vc/
}

{===================================================

	TalkNow Client.

        SCRIPT INFORMATION:

	This is client part of vcTalkNow demo.
	You probaly need to change the IP address of
	server machine (ipClient.host property).

	Start the vcTalkNow server before executing the
	client script.

	Press Execute button to execute the script.
	Press Clear button to destroy the components.

====================================================}

// it is a good idea to clear the components list before doing a new job.

clear;


// -- create devices --

waveOut = TunavclWaveOutDevice;
waveIn = TunavclWaveInDevice;
waveIn.pcm_numChannels = 1;		// mono
waveIn.pcm_samplesPerSec = 8000;	// voice

codecIn = TunavclWaveCodecDevice;
codecIn.inputIsPCM = true;
codecIn.formatTag = 49;	// GSM

codecOut = TunavclWaveCodecDevice;
codecOut.inputIsPCM = false;
codecOut.formatTagImmunable = false;

ipClient = TunavclIPOutStream;
ipClient.isFormatProvider = true;
ipClient.port = '17820';
ipClient.proto = udp;

// NOTE: assign valid IP address or DNS name of server machine here
ipClient.host = '192.168.1.1';



// -- link components --

waveIn.consumer = codecIn;
codecIn.consumer = ipClient;
ipClient.consumer = codecOut;
codecOut.consumer = waveOut;


// -- activate devices --

waveIn.active = true;

// -- EOF --

⌨️ 快捷键说明

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