~VisualizerJniContextHolder()
 {
     if (binder.get()) {
         binder->unbind(visualizer);
     }
     binder.clear();
     visualizer.clear();
 }
Ejemplo n.º 2
0
//-----------------------------------------------------------------------------
bool android_fx_initEffectObj(audio_session_t sessionId, android::sp<android::AudioEffect>& effect,
        const effect_uuid_t *type) {
    //SL_LOGV("android_fx_initEffectObj on session %d", sessionId);

    effect = new android::AudioEffect(type, android::String16(), EFFECT_UUID_NULL,
            0,// priority
            0,// effect callback
            0,// callback data
            sessionId,// session ID
            0 );// output

    android::status_t status = effect->initCheck();
    if (android::NO_ERROR != status) {
        effect.clear();
        SL_LOGE("Effect initCheck() returned %d", status);
        return false;
    }

    return true;
}
 ~BassBoostJniContextHolder() { bassboost.clear(); }
 ~EnvironmentalReverbJniContextHolder() { envreverb.clear(); }
 ~PresetReverbJniContextHolder() { presetreverb.clear(); }
 virtual void TearDown() {
     mRemoteAudio->release();
     mRemoteAudio.clear();
 }