diff options
Diffstat (limited to 'include/private/media/AudioTrackShared.h')
-rw-r--r-- | include/private/media/AudioTrackShared.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/private/media/AudioTrackShared.h b/include/private/media/AudioTrackShared.h index 6d778dd..1379379 100644 --- a/include/private/media/AudioTrackShared.h +++ b/include/private/media/AudioTrackShared.h @@ -415,6 +415,13 @@ public: virtual void framesReadyIsCalledByMultipleThreads() { } bool setStreamEndDone(); // and return previous value + + // Add to the tally of underrun frames, and inform client of underrun + virtual void tallyUnderrunFrames(uint32_t frameCount); + + // Return the total number of frames which AudioFlinger desired but were unavailable, + // and thus which resulted in an underrun. + virtual uint32_t getUnderrunFrames() const { return mCblk->u.mStreaming.mUnderrunFrames; } }; class StaticAudioTrackServerProxy : public AudioTrackServerProxy { @@ -429,6 +436,8 @@ public: virtual void framesReadyIsCalledByMultipleThreads(); virtual status_t obtainBuffer(Buffer* buffer); virtual void releaseBuffer(Buffer* buffer); + virtual void tallyUnderrunFrames(uint32_t frameCount); + virtual uint32_t getUnderrunFrames() const { return 0; } private: ssize_t pollPosition(); // poll for state queue update, and return current position |