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

Commit 5c34652b authored by Andy Hung's avatar Andy Hung Committed by Automerger Merge Worker
Browse files

Merge "Add getTracks_l to a Thread" into main am: 2f5eb682

parents a4370e2b 2f5eb682
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -539,6 +539,8 @@ public:

    virtual IAfTrack* getTrackById_l(audio_port_handle_t trackId) REQUIRES(mutex()) = 0;

    virtual std::vector<sp<IAfTrack>> getTracks_l() REQUIRES(mutex()) = 0;

    virtual bool hasMixer() const = 0;

    virtual status_t setRequestedLatencyMode(audio_latency_mode_t mode) = 0;
+5 −0
Original line number Diff line number Diff line
@@ -3788,6 +3788,11 @@ IAfTrack* PlaybackThread::getTrackById_l(
    return nullptr;
}

// getTracks_l must be called with holding thread lock
std::vector<sp<IAfTrack>> PlaybackThread::getTracks_l() {
    return std::vector(mTracks.begin(), mTracks.end());
}

status_t PlaybackThread::addEffectChain_l(const sp<IAfEffectChain>& chain)
{
    audio_session_t session = chain->sessionId();
+2 −0
Original line number Diff line number Diff line
@@ -1187,6 +1187,8 @@ public:

    IAfTrack* getTrackById_l(audio_port_handle_t trackId) final REQUIRES(mutex());

    std::vector<sp<IAfTrack>> getTracks_l() final REQUIRES(mutex());

    bool hasMixer() const final {
                    return mType == MIXER || mType == DUPLICATING || mType == SPATIALIZER;
                }