summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2014-07-02 16:46:18 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-07-01 23:17:33 +0000
commitbe55c0d23b02f9de9f295f3bca2f7cd7f016c4d6 (patch)
tree9ff74181637eb00977aa23b474607d46a2802880 /core
parentdf0697e392c1789a49966d5091c2ee9e1003a02f (diff)
parentdbf55665c5c4802cbfc56463198805be48ec75af (diff)
downloadframeworks_base-be55c0d23b02f9de9f295f3bca2f7cd7f016c4d6.zip
frameworks_base-be55c0d23b02f9de9f295f3bca2f7cd7f016c4d6.tar.gz
frameworks_base-be55c0d23b02f9de9f295f3bca2f7cd7f016c4d6.tar.bz2
Merge "audio: fixed channel count determination from channel mask"
Diffstat (limited to 'core')
-rw-r--r--core/jni/android_media_AudioRecord.cpp2
-rw-r--r--core/jni/android_media_AudioTrack.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/jni/android_media_AudioRecord.cpp b/core/jni/android_media_AudioRecord.cpp
index a54eba1..c8812fc 100644
--- a/core/jni/android_media_AudioRecord.cpp
+++ b/core/jni/android_media_AudioRecord.cpp
@@ -150,7 +150,7 @@ android_media_AudioRecord_setup(JNIEnv *env, jobject thiz, jobject weak_this,
ALOGE("Error creating AudioRecord: channel mask %#x is not valid.", channelMask);
return (jint) AUDIORECORD_ERROR_SETUP_INVALIDCHANNELMASK;
}
- uint32_t channelCount = popcount(channelMask);
+ uint32_t channelCount = audio_channel_count_from_in_mask(channelMask);
// compare the format against the Java constants
audio_format_t format = audioFormatToNative(audioFormat);
diff --git a/core/jni/android_media_AudioTrack.cpp b/core/jni/android_media_AudioTrack.cpp
index 677c230..7e2448e 100644
--- a/core/jni/android_media_AudioTrack.cpp
+++ b/core/jni/android_media_AudioTrack.cpp
@@ -205,7 +205,7 @@ android_media_AudioTrack_setup(JNIEnv *env, jobject thiz, jobject weak_this,
return (jint) AUDIOTRACK_ERROR_SETUP_INVALIDCHANNELMASK;
}
- uint32_t channelCount = popcount(nativeChannelMask);
+ uint32_t channelCount = audio_channel_count_from_out_mask(nativeChannelMask);
// check the format.
// This function was called from Java, so we compare the format against the Java constants