libZPlay documentation (Win32)
IndexReferenceHome
PreviousUpNext
libZPlayCpp::zplay_EnableEcho Function

Enable or disable echo.

C++
__stdcall __declspec(dllimport) int zplay_EnableEcho(ZPLAY_HANDLE handle, int fEnable);
Parameters 
Description 
ZPLAY_HANDLE handle 
ZPLAY handle. Get this handle with zplay_CreateZPlay
int fEnable 
Flag for enabling or disabling echo. If this parameter is 1, echo is enabled. If this parameter is 0, echo is disabled. 
Return Values 
Description 
All OK. 
Error. To get error message read here

Note: By default, new class instance has programmed one simple echo effect, 1000 ms delay, 70 % original volume + 30 % echo volume. 

Note: By default, new created class has disabled echo effect. To use echo effect, user must enable echo effect. To change default, simple echo effect and to create new advanced effect, use SetEchoParam

Apply simple echo, 2000 milliseconds delay, volume ration 90/20. 

ZPlay C++ Class interface  

TEchoEffect effect;
// combine 90 % volume of orignal samples with 20 % volume of delayed samples
effect.nLeftDelay = 2000;  // 2000 ms delay
effect.nLeftEchoVolume = 20; // use 20 % volume of delayed samples
effect.nLeftSrcVolume = 90;  // use 90 % volume of original samples
effect.nRightDelay = 2000;  // 2000 ms delay
effect.nRightEchoVolume = 20;
effect.nRightSrcVolume = 90;
instance->SetEchoParam(effect, 1);
instance->EnableEcho(1); // enable echo effect

 

C Style interface

TEchoEffect effect;
// combine 90 % volume of orignal samples with 20 % volume of delayed samples
effect.nLeftDelay = 2000;  // 2000 ms delay
effect.nLeftEchoVolume = 20; // use 20 % volume of delayed samples
effect.nLeftSrcVolume = 90;  // use 90 % volume of original samples
effect.nRightDelay = 2000;  // 2000 ms delay
effect.nRightEchoVolume = 20;
effect.nRightSrcVolume = 90;
zplay_SetEchoParam(instance, effect, 1);
zplay_EnableEcho(instance, 1); // enable echo effect
Copyright (c) 2010. Zoran Cindori - All rights reserved.

Web: http://libzplay.sourceforge.net/

Email: zcindori@inet.hr