Set equalizer parameters, band gain and preamp gain.
__stdcall __declspec(dllimport) int zplay_SetEqualizerParam(ZPLAY_HANDLE handle, int nPreAmpGain, int * pnBandGain, int nNumberOfBands);
Parameters |
Description |
ZPLAY_HANDLE handle |
ZPLAY handle. Get this handle with zplay_CreateZPlay. |
int nPreAmpGain |
Preamp gain in millidecibels (thousandth of decibel). Value 0 specifies no change. Positive values boost volume, negative value drops volume. This value has effect on all bands. |
int * pnBandGain |
Array of integers specifying gain for each band in millidecibels (thousandth of decibel). Positive values boost volume, negative value drops volume. |
int nNumberOfBands |
Number of frequency bands. |
Return Values |
Description |
1 |
All OK. |
0 |
Error. To get error message read here. |
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.
If you create 20 equalizer bands, then you need to send pointer to 20 values as pnBandGain parameter.
GetEqualizerParam, SetEqualizerPoints, GetEqualizerPoints, SetEqualizerPreampGain, GetEqualizerPreampGain, SetEqualizerBandGain, GetEqualizerBandGain, EnableEqualizer
zplay_GetEqualizerParam, zplay_SetEqualizerPoints, zplay_GetEqualizerPoints, zplay_SetEqualizerPreampGain, zplay_GetEqualizerPreampGain, zplay_SetEqualizerBandGain, zplay_GetEqualizerBandGain, zplay_EnableEqualizer
Cut bas and boost high tones. Don't change preamp gain.
int eq_values[10]; eq_values[0] = -12000; eq_values[1] = -12000; // cut bas 12 db eq_values[2] = 0; eq_values[3] = 0; // unchanged eq_values[4] = 0; eq_values[5] = 0; eq_values[6] = 0; eq_values[7] = 12000; // boost high tones 12 db eq_values[8] = 12500; eq_values[9] = 0; instance->SetEqualizerParam(0, eq_values, 10); instance->EnableEqualizer(1); // enable equalizer
int eq_values[10]; eq_values[0] = -12000; eq_values[1] = -12000; // cut bas 12 db eq_values[2] = 0; eq_values[3] = 0; // unchanged eq_values[4] = 0; eq_values[5] = 0; eq_values[6] = 0; eq_values[7] = 12000; // boost high tones 12 db eq_values[8] = 12500; eq_values[9] = 0; zplay_SetEqualizerParam(instance, 0, eq_values, 10); zplay_EnableEqualizer(instance, 1); // enable equalizer
Copyright (c) 2010. Zoran Cindori - All rights reserved.
Web: http://libzplay.sourceforge.net/ Email: zcindori@inet.hr |