diff options
author | Glenn Kasten <gkasten@google.com> | 2012-12-18 15:57:32 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2013-06-12 14:33:10 -0700 |
commit | 9f80dd223d83d9bb9077fb6baee056cee4eaf7e5 (patch) | |
tree | 79f19f80ebb7978e9bab16e1d9b835849c735592 /services/audioflinger/PlaybackTracks.h | |
parent | 9fef8d453b15a91a2b748faac2bfaff713bcf1e1 (diff) | |
download | frameworks_av-9f80dd223d83d9bb9077fb6baee056cee4eaf7e5.zip frameworks_av-9f80dd223d83d9bb9077fb6baee056cee4eaf7e5.tar.gz frameworks_av-9f80dd223d83d9bb9077fb6baee056cee4eaf7e5.tar.bz2 |
New control block for AudioTrack and AudioRecord
Main differences between old and new control block:
- removes the mutex, which was a potential source of priority inversion
- circular indices into shared buffer, which is now always a power-of-2 size
Change-Id: I4e9b7fa99858b488ac98a441fa70e31dbba1b865
Diffstat (limited to 'services/audioflinger/PlaybackTracks.h')
-rw-r--r-- | services/audioflinger/PlaybackTracks.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/services/audioflinger/PlaybackTracks.h b/services/audioflinger/PlaybackTracks.h index a749d7a..b1286d3 100644 --- a/services/audioflinger/PlaybackTracks.h +++ b/services/audioflinger/PlaybackTracks.h @@ -46,6 +46,8 @@ public: void destroy(); int name() const { return mName; } + virtual uint32_t sampleRate() const; + audio_stream_type_t streamType() const { return mStreamType; } @@ -139,6 +141,7 @@ private: // 'volatile' means accessed without lock or // barrier, but is read/written atomically bool mIsInvalid; // non-resettable latch, set by invalidate() + AudioTrackServerProxy* mAudioTrackServerProxy; }; // end of Track class TimedTrack : public Track { @@ -255,10 +258,6 @@ public: private: - enum { - NO_MORE_BUFFERS = 0x80000001, // same in AudioTrack.h, ok to be different value - }; - status_t obtainBuffer(AudioBufferProvider::Buffer* buffer, uint32_t waitTimeMs); void clearBufferQueue(); |