Lines Matching refs:band

145 static SLresult IEqualizer_SetBandLevel(SLEqualizerItf self, SLuint16 band, SLmillibel level)  in IEqualizer_SetBandLevel()  argument
151 (band >= thiz->mNumBands)) { in IEqualizer_SetBandLevel()
156 thiz->mLevels[band] = level; in IEqualizer_SetBandLevel()
164 android_eq_setParam(thiz->mEqEffect, EQ_PARAM_BAND_LEVEL, band, &level); in IEqualizer_SetBandLevel()
175 static SLresult IEqualizer_GetBandLevel(SLEqualizerItf self, SLuint16 band, SLmillibel *pLevel) in IEqualizer_GetBandLevel() argument
184 if (band >= thiz->mNumBands) { in IEqualizer_GetBandLevel()
190 level = thiz->mLevels[band]; in IEqualizer_GetBandLevel()
197 android_eq_getParam(thiz->mEqEffect, EQ_PARAM_BAND_LEVEL, band, &level); in IEqualizer_GetBandLevel()
210 static SLresult IEqualizer_GetCenterFreq(SLEqualizerItf self, SLuint16 band, SLmilliHertz *pCenter) in IEqualizer_GetCenterFreq() argument
218 if (band >= thiz->mNumBands) { in IEqualizer_GetCenterFreq()
223 *pCenter = thiz->mBands[band].mCenter; in IEqualizer_GetCenterFreq()
232 android_eq_getParam(thiz->mEqEffect, EQ_PARAM_CENTER_FREQ, band, &center); in IEqualizer_GetCenterFreq()
245 static SLresult IEqualizer_GetBandFreqRange(SLEqualizerItf self, SLuint16 band, in IEqualizer_GetBandFreqRange() argument
254 if (band >= thiz->mNumBands) { in IEqualizer_GetBandFreqRange()
260 *pMin = thiz->mBands[band].mMin; in IEqualizer_GetBandFreqRange()
262 *pMax = thiz->mBands[band].mMax; in IEqualizer_GetBandFreqRange()
271 android_eq_getParam(thiz->mEqEffect, EQ_PARAM_BAND_FREQ_RANGE, band, range); in IEqualizer_GetBandFreqRange()
302 const struct EqualizerBand *band; in IEqualizer_GetBand() local
306 for (band = thiz->mBands; band < &thiz->mBands[thiz->mNumBands]; ++band) { in IEqualizer_GetBand()
307 if (!(band->mMin <= frequency && frequency <= band->mMax)) in IEqualizer_GetBand()
309 assert(band->mMin <= band->mCenter && band->mCenter <= band->mMax); in IEqualizer_GetBand()
310 assert(band->mCenter != 0); in IEqualizer_GetBand()
311 float ratio = frequency <= band->mCenter ? in IEqualizer_GetBand()
312 floatFreq / band->mCenter : band->mCenter / floatFreq; in IEqualizer_GetBand()
315 bestBand = band - thiz->mBands; in IEqualizer_GetBand()
321 uint16_t band = 0; in IEqualizer_GetBand() local
327 android_eq_getParam(thiz->mEqEffect, EQ_PARAM_GET_BAND, frequency, &band); in IEqualizer_GetBand()
331 *pBand = (SLuint16)band; in IEqualizer_GetBand()
384 SLuint16 band; in IEqualizer_UsePreset() local
385 for (band = 0; band < thiz->mNumBands; ++band) in IEqualizer_UsePreset()
386 thiz->mLevels[band] = EqualizerPresets[index].mLevels[band]; in IEqualizer_UsePreset()
480 unsigned band; in IEqualizer_init()
481 for (band = 0; band < MAX_EQ_BANDS; ++band) in IEqualizer_init()
482 thiz->mLevels[band] = 0; in IEqualizer_init()