summaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-12-04 12:22:46 -0800
committerGlenn Kasten <gkasten@google.com>2012-12-12 12:21:59 -0800
commit552f274d82fb4988fb972df69134e031d375abfe (patch)
tree6c356ad9ec05a6b6e392aae86cdc296c98d13a65 /include/media
parentcc492bd388898f90cec4faae3c7fde561dd52239 (diff)
downloadframeworks_av-552f274d82fb4988fb972df69134e031d375abfe.zip
frameworks_av-552f274d82fb4988fb972df69134e031d375abfe.tar.gz
frameworks_av-552f274d82fb4988fb972df69134e031d375abfe.tar.bz2
Start isolating control block accesses in a proxy
The proxy object will eventually be the only code that understands the details of the control block. This should make it easier to change the control block in the future. Initial set of control block fields that are isolated: - sample rate - send level - volume Prepare for streaming/static separation by adding a union to the control block for the new fields. Fix bug in handling of max sample rate on a track. It was only checking at re-configuration, not at each mix. Simplify OutputTrack::obtainBuffer. Change-Id: I2249f9d04f73a911a922ad1d7f6197292c74cd92
Diffstat (limited to 'include/media')
-rw-r--r--include/media/AudioRecord.h3
-rw-r--r--include/media/AudioTrack.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h
index ae444c3..38c6548 100644
--- a/include/media/AudioRecord.h
+++ b/include/media/AudioRecord.h
@@ -29,6 +29,7 @@
namespace android {
class audio_track_cblk_t;
+class AudioRecordClientProxy;
// ----------------------------------------------------------------------------
@@ -374,6 +375,7 @@ private:
uint32_t mUpdatePeriod; // in ms
// constant after constructor or set()
+ uint32_t mSampleRate;
size_t mFrameCount;
audio_format_t mFormat;
uint8_t mChannelCount;
@@ -393,6 +395,7 @@ private:
int mPreviousPriority; // before start()
SchedPolicy mPreviousSchedulingGroup;
+ AudioRecordClientProxy* mProxy;
};
}; // namespace android
diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h
index 6f85527..9d07ed5 100644
--- a/include/media/AudioTrack.h
+++ b/include/media/AudioTrack.h
@@ -36,6 +36,7 @@ namespace android {
// ----------------------------------------------------------------------------
class audio_track_cblk_t;
+class AudioTrackClientProxy;
// ----------------------------------------------------------------------------
@@ -538,6 +539,7 @@ protected:
float mVolume[2];
float mSendLevel;
+ uint32_t mSampleRate;
size_t mFrameCount; // corresponds to current IAudioTrack
size_t mReqFrameCount; // frame count to request the next time a new
// IAudioTrack is needed
@@ -596,6 +598,7 @@ protected:
bool mIsTimed;
int mPreviousPriority; // before start()
SchedPolicy mPreviousSchedulingGroup;
+ AudioTrackClientProxy* mProxy;
};
class TimedAudioTrack : public AudioTrack