libZPlay documentation (Win32)
IndexReferenceHome
PreviousUpNext
ZPlay::GetEqualizerParam Method

Get equalizer parameters, band gain and preamp gain.

C++
virtual __stdcall int GetEqualizerParam(int * pnPreAmpGain, int * pnBandGain, int nNumberOfBands) = 0;
Parameters 
Description 
int * pnBandGain 
Pointer to array of integers receiving gain for each band in millidecibels (thousandth of decibel). If this value is 0 function returns number of equalizer bands.
Caution: User must allocate memory for this array. 
int nNumberOfBands 
Number of frequency bands. If this value is 0, function returns number of equalizer bands. 
nPreAmpGain 
Pointer to integer variable receiving preamp gain in millidecibels

  • If this value is NULL function returns number of equalizer bands.

 

Number of equalizer bands. 

If nPreAmpGain is NULL or pnBandGain is NULL or nNumberOfBands is 0, function returns number of equalizer bands. Use this function to allocate mmeory for nPreAmpGain array.

Note: Band gain is expressed in millidecibels. 

Class has by default 10 equalizer bands. See SetEqualizerPoints. If you create custom bands, use correct number of bands as nNumberOfBands parameter. And don't forget to specify pnBandGain array with correct size.

Get equalizer parameters. 

ZPlay C++ Class interface  

int nNumOfBands = instance->GetEqualizerParam(NULL, NULL, 0); // get number of equalizer bands
int *pGain = new int[nNumOfBands]; // allocate memory
int nPreamp;
int i;
int number_of_bands = instance->GetEqualizerParam(&nPreamp, pGain, nNumOfBands); // retrieve gains
for(i = 0; i < number_of_bands; i++)
{
  printf("Band %i: %i\n", i, pGain[i]);
}
delete [] pGain;

 

C Style interface

int nNumOfBands = zplay_GetEqualizerParam(instance, NULL, NULL, 0); // get number of equalizer bands
int *pGain = new int[nNumOfBands]; // allocate memory
int nPreamp;
int i;
int number_of_bands = zplay_GetEqualizerParam(instance, &nPreamp, pGain, nNumOfBands);  // retrieve gains   
for(i = 0; i < number_of_bands; i++)
{
  printf("Band %i: %i\n", i, pGain[i]);
}
delete [] pGain;
Copyright (c) 2010. Zoran Cindori - All rights reserved.

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

Email: zcindori@inet.hr