summaryrefslogtreecommitdiffstats
path: root/media/libmedia/AudioRecord.cpp
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2014-02-27 15:29:51 -0800
committerGlenn Kasten <gkasten@google.com>2014-02-28 07:56:38 -0800
commitbce50bfc3846ab008bafa75c5d3f29fd7b5395f7 (patch)
treeebefb9f660bf71aec96bd297e155d12c9d3588e8 /media/libmedia/AudioRecord.cpp
parent838b3d8bafa4a781e277870dee4e0390165cff52 (diff)
downloadframeworks_av-bce50bfc3846ab008bafa75c5d3f29fd7b5395f7.zip
frameworks_av-bce50bfc3846ab008bafa75c5d3f29fd7b5395f7.tar.gz
frameworks_av-bce50bfc3846ab008bafa75c5d3f29fd7b5395f7.tar.bz2
Fix type of AudioTrack/AudioRecord parameter frameCount
It's size_t consistently Change-Id: I29638ef59ac773218025f2403a3508a307b487e0
Diffstat (limited to 'media/libmedia/AudioRecord.cpp')
-rw-r--r--media/libmedia/AudioRecord.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/media/libmedia/AudioRecord.cpp b/media/libmedia/AudioRecord.cpp
index f372da6..a3cb538 100644
--- a/media/libmedia/AudioRecord.cpp
+++ b/media/libmedia/AudioRecord.cpp
@@ -73,7 +73,7 @@ AudioRecord::AudioRecord(
uint32_t sampleRate,
audio_format_t format,
audio_channel_mask_t channelMask,
- int frameCount,
+ size_t frameCount,
callback_t cbf,
void* user,
uint32_t notificationFrames,
@@ -114,7 +114,7 @@ status_t AudioRecord::set(
uint32_t sampleRate,
audio_format_t format,
audio_channel_mask_t channelMask,
- int frameCountInt,
+ size_t frameCount,
callback_t cbf,
void* user,
uint32_t notificationFrames,
@@ -123,9 +123,9 @@ status_t AudioRecord::set(
transfer_type transferType,
audio_input_flags_t flags)
{
- ALOGV("set(): inputSource %d, sampleRate %u, format %#x, channelMask %#x, frameCount %d, "
+ ALOGV("set(): inputSource %d, sampleRate %u, format %#x, channelMask %#x, frameCount %zu, "
"notificationFrames %u, sessionId %d, transferType %d, flags %#x",
- inputSource, sampleRate, format, channelMask, frameCountInt, notificationFrames,
+ inputSource, sampleRate, format, channelMask, frameCount, notificationFrames,
sessionId, transferType, flags);
switch (transferType) {
@@ -151,13 +151,6 @@ status_t AudioRecord::set(
}
mTransfer = transferType;
- // FIXME "int" here is legacy and will be replaced by size_t later
- if (frameCountInt < 0) {
- ALOGE("Invalid frame count %d", frameCountInt);
- return BAD_VALUE;
- }
- size_t frameCount = frameCountInt;
-
AutoMutex lock(mLock);
// invariant that mAudioRecord != 0 is true only after set() returns successfully