Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 41709559 authored by Eric Laurent's avatar Eric Laurent
Browse files

audioflinger: refactor EffectModule class

Introduce a class EffecBase as a parent class of
EffectModule with default implementation for handles management,
basic properties storage and state management.

Bug: 146177259
Test: CTS: AudioEffectTest, EqualizerTest, VisualizerTest,
AudioPreProcessingTest
Test: manual test: Play Music EQ settings, Duo EAC and NS
Change-Id: Id91cef9db6b4f6be0d2e77a8b4afcbdc7234e519
parent c43423a6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3529,7 +3529,7 @@ sp<IEffect> AudioFlinger::createEffect(

    if (lStatus == NO_ERROR || lStatus == ALREADY_EXISTS) {
        // Check CPU and memory usage
        sp<EffectModule> effect = handle->effect().promote();
        sp<EffectBase> effect = handle->effect().promote();
        if (effect != nullptr) {
            status_t rStatus = effect->updatePolicyState();
            if (rStatus != NO_ERROR) {
+1 −0
Original line number Diff line number Diff line
@@ -533,6 +533,7 @@ private:
    class AsyncCallbackThread;
    class Track;
    class RecordTrack;
    class EffectBase;
    class EffectModule;
    class EffectHandle;
    class EffectChain;