diff options
author | Glenn Kasten <gkasten@google.com> | 2012-01-17 07:27:46 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-01-17 07:27:46 -0800 |
commit | 613882293184e575a44bff681a3decaefe889e69 (patch) | |
tree | 052f84c8fe6e7b201f03117f617c3ad77b8b0dd0 /include | |
parent | 0107954f72153db747a3727dc1157e9236dfed90 (diff) | |
parent | b9980659501d0428d65d8292f3c32da69d37fbd2 (diff) | |
download | frameworks_av-613882293184e575a44bff681a3decaefe889e69.zip frameworks_av-613882293184e575a44bff681a3decaefe889e69.tar.gz frameworks_av-613882293184e575a44bff681a3decaefe889e69.tar.bz2 |
Merge "Use size_t for frame size"
Diffstat (limited to 'include')
-rw-r--r-- | include/media/AudioRecord.h | 2 | ||||
-rw-r--r-- | include/media/AudioTrack.h | 7 | ||||
-rw-r--r-- | include/private/media/AudioTrackShared.h | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/include/media/AudioRecord.h b/include/media/AudioRecord.h index 2fb69b6..84a8f1c 100644 --- a/include/media/AudioRecord.h +++ b/include/media/AudioRecord.h @@ -206,7 +206,7 @@ public: int channelCount() const; int channels() const; uint32_t frameCount() const; - int frameSize() const; + size_t frameSize() const; int inputSource() const; diff --git a/include/media/AudioTrack.h b/include/media/AudioTrack.h index fd83162..6e4a9f5 100644 --- a/include/media/AudioTrack.h +++ b/include/media/AudioTrack.h @@ -219,7 +219,12 @@ public: audio_format_t format() const; int channelCount() const; uint32_t frameCount() const; - int frameSize() const; + + /* Return channelCount * (bit depth per channel / 8). + * channelCount is determined from channelMask, and bit depth comes from format. + */ + size_t frameSize() const; + sp<IMemory>& sharedBuffer(); diff --git a/include/private/media/AudioTrackShared.h b/include/private/media/AudioTrackShared.h index 86e0682..33a92cd 100644 --- a/include/private/media/AudioTrackShared.h +++ b/include/private/media/AudioTrackShared.h @@ -80,7 +80,7 @@ struct audio_track_cblk_t // 8 bit PCM data: in this case, mCblk->frameSize is based on a sample size of // 16 bit because data is converted to 16 bit before being stored in buffer - uint8_t frameSize; + uint8_t frameSize; // would normally be size_t, but 8 bits is plenty uint8_t pad1; uint16_t bufferTimeoutMs; // Maximum cumulated timeout before restarting audioflinger |