diff options
Diffstat (limited to 'services/audioflinger')
-rw-r--r-- | services/audioflinger/PlaybackTracks.h | 2 | ||||
-rw-r--r-- | services/audioflinger/Tracks.cpp | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/services/audioflinger/PlaybackTracks.h b/services/audioflinger/PlaybackTracks.h index 2f37dbb..829b5d6 100644 --- a/services/audioflinger/PlaybackTracks.h +++ b/services/audioflinger/PlaybackTracks.h @@ -82,7 +82,9 @@ protected: int64_t pts = kInvalidPTS); // releaseBuffer() not overridden + // ExtendedAudioBufferProvider interface virtual size_t framesReady() const; + virtual size_t framesReleased() const; bool isPausing() const { return mState == PAUSING; } bool isPaused() const { return mState == PAUSED; } diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp index 690f1dd..2fb76dd 100644 --- a/services/audioflinger/Tracks.cpp +++ b/services/audioflinger/Tracks.cpp @@ -507,6 +507,10 @@ status_t AudioFlinger::PlaybackThread::Track::getNextBuffer( return status; } +// releaseBuffer() is not overridden + +// ExtendedAudioBufferProvider interface + // Note that framesReady() takes a mutex on the control block using tryLock(). // This could result in priority inversion if framesReady() is called by the normal mixer, // as the normal mixer thread runs at lower @@ -519,6 +523,11 @@ size_t AudioFlinger::PlaybackThread::Track::framesReady() const { return mAudioTrackServerProxy->framesReady(); } +size_t AudioFlinger::PlaybackThread::Track::framesReleased() const +{ + return mAudioTrackServerProxy->framesReleased(); +} + // Don't call for fast tracks; the framesReady() could result in priority inversion bool AudioFlinger::PlaybackThread::Track::isReady() const { if (mFillingUpStatus != FS_FILLING || isStopped() || isPausing()) { |