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

Commit 70d6fb51 authored by Andy Hung's avatar Andy Hung Committed by Android (Google) Code Review
Browse files

Merge "audio: Add track metadata perfetto logging" into main

parents 02ee8be2 f767de06
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -163,6 +163,7 @@ public:
    virtual audio_channel_mask_t mixerChannelMask() const = 0;
    virtual audio_format_t format() const = 0;
    virtual uint32_t channelCount() const = 0;
    virtual std::string flagsAsString() const = 0;

    // Called by AudioFlinger::frameCount(audio_io_handle_t output) and effects,
    // and returns the [normal mix] buffer's frame count.
+4 −0
Original line number Diff line number Diff line
@@ -205,6 +205,7 @@ public:

    virtual const char* getTrackStateAsString() const = 0;

    virtual const std::string& getTraceSuffix() const = 0;
    // Called by the PlaybackThread to indicate that the track is becoming active
    // and a new interval should start with a given device list.
    virtual void logBeginInterval(const std::string& devices) = 0;
@@ -212,6 +213,9 @@ public:
    // Called by the PlaybackThread to indicate the track is no longer active.
    virtual void logEndInterval() = 0;

    // Called by the PlaybackThread when ATRACE is enabled.
    virtual void logRefreshInterval(const std::string& devices) = 0;

    // Called to tally underrun frames in playback.
    virtual void tallyUnderrunFrames(size_t frames) = 0;

+1 −0
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@ public:
    float getPortVolume() const override { return mVolume; }
    bool getPortMute() const override { return mMutedFromPort; }

    std::string trackFlagsAsString() const final { return {}; }
private:
    DISALLOW_COPY_AND_ASSIGN(MmapTrack);

+2 −0
Original line number Diff line number Diff line
@@ -231,6 +231,8 @@ public:
    float getPortVolume() const override { return mVolume; }
    bool getPortMute() const override { return mMutedFromPort; }

    std::string trackFlagsAsString() const final { return toString(mFlags); }

protected:

    DISALLOW_COPY_AND_ASSIGN(Track);
+2 −0
Original line number Diff line number Diff line
@@ -98,6 +98,8 @@ public:
        return mResamplerBufferProvider;
    }

    std::string trackFlagsAsString() const final { return toString(mFlags); }

private:
    DISALLOW_COPY_AND_ASSIGN(RecordTrack);

Loading