libZPlay documentation (Win32)
IndexReferenceHome
PreviousUpNext
ZPlay.SetEchoParam Method

Set and change echo effect parameters.

Visual Basic
Public Function SetEchoParam(ByRef EchoEffectArray() As TEchoEffect, ByVal NumberOfEffects As Integer) As Boolean
Parameters 
Description 
ByRef EchoEffectArray() As TEchoEffect 
Reference to array of TEchoEffect structures specifying echo effects. 
ByVal NumberOfEffects As Integer 
Number of echo effects in EchoEffectArray array. 
Return Values 
Description 
True 
All OK. 
False 
Error. To get error message read here

To produce echo effect, original samples are combined with delayed samples. You need to specify delay (in milliseconds) and volume of original samples and delayed samples. 

To specify one echo effect, fill TEchoEffect with valid data. To specify multiple, complex echo effects, specify array of TEchoEffects. Output sound is combination of original samples and delayed samples. 

Note: If you specify multiple delay effects, make note about volume because all effects will combine original samples with delayed samples for each effect and you will have summary of all samples. 

For example: first effect is using 60 % volume of original(not delayed) samples and on these samples are added 20 % volume delayed samples. Second effect is using 0 % volume of original samples and 20 % volume of delayed samples. And resulting samples from first effect are added to resulting samples from second effect. If you use too much percent of volume, you can get overflow of sample amplitude and sound distorsions. 

Note: There is no limit on number of echo effects. 

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

Dim effect(2) As TEchoEffect

effect(0).nLeftDelay = 2000
effect(0).nLeftSrcVolume = 50
effect(0).nLeftEchoVolume = 30
effect(0).nRightDelay = 2000
effect(0).nRightSrcVolume = 50
effect(0).nRightEchoVolume = 30

effect(1).nLeftDelay = 30
effect(1).nLeftSrcVolume = 50
effect(1).nLeftEchoVolume = 30
effect(1).nRightDelay = 30
effect(1).nRightSrcVolume = 50
effect(1).nRightEchoVolume = 30

player.SetEchoParam(effect, 2)
Copyright (c) 2010. Zoran Cindori - All rights reserved.

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

Email: zcindori@inet.hr