summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-07-03 17:24:41 -0700
committerGlenn Kasten <gkasten@google.com>2012-07-17 11:31:59 -0700
commit28b76b334f92a15a2be3cc9e2f7d229a3275d1ac (patch)
treec605d3e995f4b6be55dd4b10e1c998b059990d0d /media
parentfd4e20c226eca185fc789de761beae64855bfbbb (diff)
downloadframeworks_av-28b76b334f92a15a2be3cc9e2f7d229a3275d1ac.zip
frameworks_av-28b76b334f92a15a2be3cc9e2f7d229a3275d1ac.tar.gz
frameworks_av-28b76b334f92a15a2be3cc9e2f7d229a3275d1ac.tar.bz2
Use audio_channel_mask_t for channel mask
Change-Id: I1c1896da48983aa9f1462a4b471f910498816f60
Diffstat (limited to 'media')
-rw-r--r--media/libmedia/AudioTrack.cpp17
-rw-r--r--media/libmedia/IAudioFlinger.cpp2
2 files changed, 10 insertions, 9 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index 177359b..73d396e 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -103,7 +103,7 @@ AudioTrack::AudioTrack(
audio_stream_type_t streamType,
uint32_t sampleRate,
audio_format_t format,
- int channelMask,
+ audio_channel_mask_t channelMask,
int frameCount,
audio_output_flags_t flags,
callback_t cbf,
@@ -136,7 +136,8 @@ AudioTrack::AudioTrack(
mIsTimed(false),
mPreviousPriority(ANDROID_PRIORITY_NORMAL), mPreviousSchedulingGroup(SP_DEFAULT)
{
- mStatus = set((audio_stream_type_t)streamType, sampleRate, (audio_format_t)format, channelMask,
+ mStatus = set((audio_stream_type_t)streamType, sampleRate, (audio_format_t)format,
+ (audio_channel_mask_t) channelMask,
frameCount, (audio_output_flags_t)flags, cbf, user, notificationFrames,
0 /*sharedBuffer*/, false /*threadCanCallJava*/, sessionId);
}
@@ -145,7 +146,7 @@ AudioTrack::AudioTrack(
audio_stream_type_t streamType,
uint32_t sampleRate,
audio_format_t format,
- int channelMask,
+ audio_channel_mask_t channelMask,
const sp<IMemory>& sharedBuffer,
audio_output_flags_t flags,
callback_t cbf,
@@ -186,7 +187,7 @@ status_t AudioTrack::set(
audio_stream_type_t streamType,
uint32_t sampleRate,
audio_format_t format,
- int channelMask,
+ audio_channel_mask_t channelMask,
int frameCount,
audio_output_flags_t flags,
callback_t cbf,
@@ -252,7 +253,7 @@ status_t AudioTrack::set(
}
if (!audio_is_output_channel(channelMask)) {
- ALOGE("Invalid channel mask");
+ ALOGE("Invalid channel mask %#x", channelMask);
return BAD_VALUE;
}
uint32_t channelCount = popcount(channelMask);
@@ -286,7 +287,7 @@ status_t AudioTrack::set(
status_t status = createTrack_l(streamType,
sampleRate,
format,
- (uint32_t)channelMask,
+ channelMask,
frameCount,
flags,
sharedBuffer,
@@ -304,7 +305,7 @@ status_t AudioTrack::set(
mStreamType = streamType;
mFormat = format;
- mChannelMask = (uint32_t)channelMask;
+ mChannelMask = channelMask;
mChannelCount = channelCount;
mSharedBuffer = sharedBuffer;
mMuted = false;
@@ -749,7 +750,7 @@ status_t AudioTrack::createTrack_l(
audio_stream_type_t streamType,
uint32_t sampleRate,
audio_format_t format,
- uint32_t channelMask,
+ audio_channel_mask_t channelMask,
int frameCount,
audio_output_flags_t flags,
const sp<IMemory>& sharedBuffer,
diff --git a/media/libmedia/IAudioFlinger.cpp b/media/libmedia/IAudioFlinger.cpp
index f5d6fd6..71e7c31 100644
--- a/media/libmedia/IAudioFlinger.cpp
+++ b/media/libmedia/IAudioFlinger.cpp
@@ -135,7 +135,7 @@ public:
audio_io_handle_t input,
uint32_t sampleRate,
audio_format_t format,
- uint32_t channelMask,
+ audio_channel_mask_t channelMask,
int frameCount,
track_flags_t flags,
pid_t tid,