Lines Matching refs:thiz
59 IEqualizer *thiz = (IEqualizer *) self; in IEqualizer_SetEnabled() local
60 interface_lock_exclusive(thiz); in IEqualizer_SetEnabled()
61 thiz->mEnabled = (SLboolean) enabled; in IEqualizer_SetEnabled()
65 if (NO_EQ(thiz)) { in IEqualizer_SetEnabled()
69 thiz->mEqEffect->setEnabled((bool) thiz->mEnabled); in IEqualizer_SetEnabled()
73 interface_unlock_exclusive(thiz); in IEqualizer_SetEnabled()
86 IEqualizer *thiz = (IEqualizer *) self; in IEqualizer_IsEnabled() local
87 interface_lock_exclusive(thiz); in IEqualizer_IsEnabled()
89 SLboolean enabled = thiz->mEnabled; in IEqualizer_IsEnabled()
93 if (NO_EQ(thiz)) { in IEqualizer_IsEnabled()
96 *pEnabled = (SLboolean) thiz->mEqEffect->getEnabled(); in IEqualizer_IsEnabled()
100 interface_unlock_exclusive(thiz); in IEqualizer_IsEnabled()
114 IEqualizer *thiz = (IEqualizer *) self; in IEqualizer_GetNumberOfBands() local
116 *pNumBands = thiz->mNumBands; in IEqualizer_GetNumberOfBands()
132 IEqualizer *thiz = (IEqualizer *) self; in IEqualizer_GetBandLevelRange() local
135 *pMin = thiz->mBandLevelRangeMin; in IEqualizer_GetBandLevelRange()
137 *pMax = thiz->mBandLevelRangeMax; in IEqualizer_GetBandLevelRange()
149 IEqualizer *thiz = (IEqualizer *) self; in IEqualizer_SetBandLevel() local
150 if (!(thiz->mBandLevelRangeMin <= level && level <= thiz->mBandLevelRangeMax) || in IEqualizer_SetBandLevel()
151 (band >= thiz->mNumBands)) { in IEqualizer_SetBandLevel()
154 interface_lock_exclusive(thiz); in IEqualizer_SetBandLevel()
156 thiz->mLevels[band] = level; in IEqualizer_SetBandLevel()
157 thiz->mPreset = SL_EQUALIZER_UNDEFINED; in IEqualizer_SetBandLevel()
160 if (NO_EQ(thiz)) { in IEqualizer_SetBandLevel()
164 android_eq_setParam(thiz->mEqEffect, EQ_PARAM_BAND_LEVEL, band, &level); in IEqualizer_SetBandLevel()
168 interface_unlock_exclusive(thiz); in IEqualizer_SetBandLevel()
182 IEqualizer *thiz = (IEqualizer *) self; in IEqualizer_GetBandLevel() local
184 if (band >= thiz->mNumBands) { in IEqualizer_GetBandLevel()
188 interface_lock_shared(thiz); in IEqualizer_GetBandLevel()
190 level = thiz->mLevels[band]; in IEqualizer_GetBandLevel()
193 if (NO_EQ(thiz)) { in IEqualizer_GetBandLevel()
197 android_eq_getParam(thiz->mEqEffect, EQ_PARAM_BAND_LEVEL, band, &level); in IEqualizer_GetBandLevel()
201 interface_unlock_shared(thiz); in IEqualizer_GetBandLevel()
217 IEqualizer *thiz = (IEqualizer *) self; in IEqualizer_GetCenterFreq() local
218 if (band >= thiz->mNumBands) { in IEqualizer_GetCenterFreq()
223 *pCenter = thiz->mBands[band].mCenter; in IEqualizer_GetCenterFreq()
227 interface_lock_shared(thiz); in IEqualizer_GetCenterFreq()
228 if (NO_EQ(thiz)) { in IEqualizer_GetCenterFreq()
232 android_eq_getParam(thiz->mEqEffect, EQ_PARAM_CENTER_FREQ, band, ¢er); in IEqualizer_GetCenterFreq()
235 interface_unlock_shared(thiz); in IEqualizer_GetCenterFreq()
253 IEqualizer *thiz = (IEqualizer *) self; in IEqualizer_GetBandFreqRange() local
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()
266 interface_lock_shared(thiz); in IEqualizer_GetBandFreqRange()
267 if (NO_EQ(thiz)) { in IEqualizer_GetBandFreqRange()
271 android_eq_getParam(thiz->mEqEffect, EQ_PARAM_BAND_FREQ_RANGE, band, range); in IEqualizer_GetBandFreqRange()
274 interface_unlock_shared(thiz); in IEqualizer_GetBandFreqRange()
296 IEqualizer *thiz = (IEqualizer *) self; in IEqualizer_GetBand() local
306 for (band = thiz->mBands; band < &thiz->mBands[thiz->mNumBands]; ++band) { in IEqualizer_GetBand()
315 bestBand = band - thiz->mBands; in IEqualizer_GetBand()
322 interface_lock_shared(thiz); in IEqualizer_GetBand()
323 if (NO_EQ(thiz)) { in IEqualizer_GetBand()
327 android_eq_getParam(thiz->mEqEffect, EQ_PARAM_GET_BAND, frequency, &band); in IEqualizer_GetBand()
330 interface_unlock_shared(thiz); in IEqualizer_GetBand()
346 IEqualizer *thiz = (IEqualizer *) self; in IEqualizer_GetCurrentPreset() local
347 interface_lock_shared(thiz); in IEqualizer_GetCurrentPreset()
349 SLuint16 preset = thiz->mPreset; in IEqualizer_GetCurrentPreset()
350 interface_unlock_shared(thiz); in IEqualizer_GetCurrentPreset()
355 if (NO_EQ(thiz)) { in IEqualizer_GetCurrentPreset()
359 android_eq_getParam(thiz->mEqEffect, EQ_PARAM_CUR_PRESET, 0, &preset); in IEqualizer_GetCurrentPreset()
362 interface_unlock_shared(thiz); in IEqualizer_GetCurrentPreset()
378 IEqualizer *thiz = (IEqualizer *) self; in IEqualizer_UsePreset() local
379 if (index >= thiz->mNumPresets) { in IEqualizer_UsePreset()
382 interface_lock_exclusive(thiz); in IEqualizer_UsePreset()
385 for (band = 0; band < thiz->mNumBands; ++band) in IEqualizer_UsePreset()
386 thiz->mLevels[band] = EqualizerPresets[index].mLevels[band]; in IEqualizer_UsePreset()
387 thiz->mPreset = index; in IEqualizer_UsePreset()
388 interface_unlock_exclusive(thiz); in IEqualizer_UsePreset()
391 if (NO_EQ(thiz)) { in IEqualizer_UsePreset()
395 android_eq_setParam(thiz->mEqEffect, EQ_PARAM_CUR_PRESET, 0, &index); in IEqualizer_UsePreset()
398 interface_unlock_shared(thiz); in IEqualizer_UsePreset()
413 IEqualizer *thiz = (IEqualizer *) self; in IEqualizer_GetNumberOfPresets() local
415 *pNumPresets = thiz->mNumPresets; in IEqualizer_GetNumberOfPresets()
431 IEqualizer *thiz = (IEqualizer *) self; in IEqualizer_GetPresetName() local
433 if (index >= thiz->mNumPresets) { in IEqualizer_GetPresetName()
436 *ppName = (SLchar *) thiz->mPresets[index].mName; in IEqualizer_GetPresetName()
440 if (index >= thiz->mNumPresets) { in IEqualizer_GetPresetName()
447 *ppName = (SLchar *) thiz->mThis->mEngine->mEqPresetNames[index]; in IEqualizer_GetPresetName()
475 IEqualizer *thiz = (IEqualizer *) self; in IEqualizer_init() local
476 thiz->mItf = &IEqualizer_Itf; in IEqualizer_init()
477 thiz->mEnabled = SL_BOOLEAN_FALSE; in IEqualizer_init()
478 thiz->mPreset = SL_EQUALIZER_UNDEFINED; in IEqualizer_init()
482 thiz->mLevels[band] = 0; in IEqualizer_init()
485 thiz->mNumPresets = 0; in IEqualizer_init()
486 thiz->mNumBands = 0; in IEqualizer_init()
488 thiz->mBands = EqualizerBands; in IEqualizer_init()
489 thiz->mPresets = EqualizerPresets; in IEqualizer_init()
491 thiz->mBandLevelRangeMin = 0; in IEqualizer_init()
492 thiz->mBandLevelRangeMax = 0; in IEqualizer_init()
494 memset(&thiz->mEqDescriptor, 0, sizeof(effect_descriptor_t)); in IEqualizer_init()
496 (void) new (&thiz->mEqEffect) android::sp<android::AudioEffect>(); in IEqualizer_init()
503 IEqualizer *thiz = (IEqualizer *) self; in IEqualizer_deinit() local
505 thiz->mEqEffect.~sp(); in IEqualizer_deinit()
512 IEqualizer *thiz = (IEqualizer *) self; in IEqualizer_Expose() local
513 if (!android_fx_initEffectDescriptor(SL_IID_EQUALIZER, &thiz->mEqDescriptor)) { in IEqualizer_Expose()
515 thiz->mNumPresets = 0; in IEqualizer_Expose()
516 thiz->mNumBands = 0; in IEqualizer_Expose()
517 thiz->mBandLevelRangeMin = 0; in IEqualizer_Expose()
518 thiz->mBandLevelRangeMax = 0; in IEqualizer_Expose()