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

Get current echo effects.

C++
__stdcall __declspec(dllimport) int zplay_GetEchoParam(ZPLAY_HANDLE handle, TEchoEffect * pEchoEffectm, int nNumberOfEffects);
Parameters 
Description 
ZPLAY_HANDLE handle 
ZPLAY handle. Get this handle with zplay_CreateZPlay
int nNumberOfEffects 
Size of pEchoEffect array. If this value is 0 function returns number of echo effects. 
pEchoEffect 
Pointer to array of TEchoEffect structures receiving echo effects.
Caution: User must alloacte memory for this array.
If this value is NULL function returns number of echo effects. 

Number of echo effects.

Call this function with pEchoEffect set to NULL, or nNumberOfEffects set to 0, to get number of echo effects. Allocate memory for pEchoEffect parameter and then call this function again using this allocated memory. 

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

Get echo effects. 

ZPlay C++ Class interface  

int nNumberOfEffects = instance->GetEchoParam(NULL, 0); // get number of effects
if(nNumberOfEffects)
{
  TEchoEffect *effects = new TEchoEffect[nNumberOfEffects]; // allocate memory
  nNumberOfEffects = instance->GetEchoParam(effects, nNumberOfEffects); // get echo effects
  for(int i = 0; i < nNumberOfEffects; i++)
  {
    printf("Effect: %i  Delay: %i  OriginalVol: %i   EchoVol %i\n",
            i,
            effects[i].nLeftDelay, 
            effects[i].nLeftSrcVolume,
            effects[i].nLeftEchoVolume);
  }
  delete [] effects;
}

 

C Style interface

int nNumberOfEffects = zplay_GetEchoParam(instance, NULL, 0); // get number of effects
if(nNumberOfEffects)
{
  TEchoEffect *effects = new TEchoEffect[nNumberOfEffects]; // allocate memory
  nNumberOfEffects = zplay_GetEchoParam(instance, effects, nNumberOfEffects); // get echo effects
  for(int i = 0; i < nNumberOfEffects; i++)
  {
    printf("Effect: %i  Delay: %i  OriginalVol: %i   EchoVol %i\n",
            i,
            effects[i].nLeftDelay, 
            effects[i].nLeftSrcVolume,
            effects[i].nLeftEchoVolume);
  }
  delete [] effects;
}
Copyright (c) 2010. Zoran Cindori - All rights reserved.

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

Email: zcindori@inet.hr