summaryrefslogtreecommitdiffstats
path: root/media/libmedia/AudioTrack.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/AudioTrack.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/AudioTrack.cpp')
-rw-r--r--media/libmedia/AudioTrack.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index aea164b..f85b0ce 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -108,7 +108,7 @@ AudioTrack::AudioTrack(
uint32_t sampleRate,
audio_format_t format,
audio_channel_mask_t channelMask,
- int frameCount,
+ size_t frameCount,
audio_output_flags_t flags,
callback_t cbf,
void* user,
@@ -182,7 +182,7 @@ status_t AudioTrack::set(
uint32_t sampleRate,
audio_format_t format,
audio_channel_mask_t channelMask,
- int frameCountInt,
+ size_t frameCount,
audio_output_flags_t flags,
callback_t cbf,
void* user,
@@ -195,9 +195,9 @@ status_t AudioTrack::set(
int uid,
pid_t pid)
{
- ALOGV("set(): streamType %d, sampleRate %u, format %#x, channelMask %#x, frameCount %d, "
+ ALOGV("set(): streamType %d, sampleRate %u, format %#x, channelMask %#x, frameCount %zu, "
"flags #%x, notificationFrames %u, sessionId %d, transferType %d",
- streamType, sampleRate, format, channelMask, frameCountInt, flags, notificationFrames,
+ streamType, sampleRate, format, channelMask, frameCount, flags, notificationFrames,
sessionId, transferType);
switch (transferType) {
@@ -236,13 +236,6 @@ status_t AudioTrack::set(
mSharedBuffer = sharedBuffer;
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;
-
ALOGV_IF(sharedBuffer != 0, "sharedBuffer: %p, size: %d", sharedBuffer->pointer(),
sharedBuffer->size());