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

Get equalizer points of frequency bands.

C++
virtual __stdcall int GetEqualizerPoints(int * pnFreqPoint, int nFreqPointNumber) = 0;
Parameters 
Description 
int * pnFreqPoint 
Pointer to array of integers receiving frequency points for frequancy bands. You have frequency range from 0 Hz to SampleRate/2 Hz. One point will divide range into 2 bands, 2 points will divide range into 3 bands ... If this value is NULL, function returns required size of array, required number of points.
Caution: User must allocate memory for this array. 
nNumOfPoints 
Size of pnFreqPoint array, number of allocated points. If this value is 0, function returns required size for pnFreqPoint array, required number of points. 

Number of frequency points. 

If pnFreqPoint is NULL or nNumOfPoints is 0, function returns number of frequency points. Use this value to allocate memory for pnFreqPoint array.

New instance of interface has 10 default equalizer bands. 

int FreqPoint[9] = {115, 240, 455, 800, 2000, 4500, 9000, 13000, 15000};

  • band0: 0 - 115 Hz
  • band1: 115 - 240 Hz
  • band2: 240 - 455 Hz
  • band3: 455 - 800 Hz
  • band4: 800 - 2000 Hz
  • band5: 2000 - 4500 Hz
  • band6: 4500 - 9000 Hz
  • band7: 9000 - 13000 Hz
  • band8: 13000 - 15000 Hz
  • band9: 15000 - Samplerate/2 Hz

Get frequency points. 

ZPlay C++ Class interface  

int nNumOfPoints =  instance->GetEqualizerPoints(NULL, 0); // get number of frequancy points
int *pPoints = new int[nNumOfPoints]; // allocate memory
int i;
int number_of_points = instance->GetEqualizerPoints(pPoints, nNumOfPoints);
for(i = 0; i < number_of_points; i++)
{
  printf("Band %i: %i\n", i, pPoints[i]);
}
delete [] pPoints;

 

C Style interface

int nNumOfPoints =  zplay_GetEqualizerPoints(instance, NULL, 0); // get number of frequancy points
int *pPoints = new int[nNumOfPoints]; // allocate memory
int i;
int number_of_points = zplay_GetEqualizerPoints(instance, pPoints, nNumOfPoints);
for(i = 0; i < number_of_points; i++)
{
  printf("Band %i: %i\n", i, pPoints[i]);
}
delete [] pPoints;
Copyright (c) 2010. Zoran Cindori - All rights reserved.

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

Email: zcindori@inet.hr