diff options
author | Andy Hung <hunga@google.com> | 2014-05-23 15:59:21 -0700 |
---|---|---|
committer | Andy Hung <hunga@google.com> | 2014-05-23 15:59:21 -0700 |
commit | 76de029ec49b535ca8aa3aef777d0dfb1838889e (patch) | |
tree | b377a32ee4b1407b041f423ca11c83a9114ff871 | |
parent | 759687c36cbeaaa40408960eafa3ffd14e76cbc6 (diff) | |
download | android_frameworks_wilhelm-76de029ec49b535ca8aa3aef777d0dfb1838889e.tar.gz android_frameworks_wilhelm-76de029ec49b535ca8aa3aef777d0dfb1838889e.tar.bz2 android_frameworks_wilhelm-76de029ec49b535ca8aa3aef777d0dfb1838889e.zip |
Add mono to android_audioPlayer_validateChannelMask
Change-Id: I898401a1a0b6081dc0d4e9d41be09cb38c675951
-rw-r--r-- | src/android/AudioPlayer_to_android.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/android/AudioPlayer_to_android.cpp b/src/android/AudioPlayer_to_android.cpp index d17f680..356d38b 100644 --- a/src/android/AudioPlayer_to_android.cpp +++ b/src/android/AudioPlayer_to_android.cpp @@ -882,8 +882,8 @@ SLresult android_audioPlayer_validateChannelMask(uint32_t mask, int numChans) { ALOGE("Unsupported channels (top or front left/right of center)"); return SL_RESULT_CONTENT_UNSUPPORTED; } - // verify has FL/FR - if ((mask & AUDIO_CHANNEL_OUT_STEREO) != AUDIO_CHANNEL_OUT_STEREO) { + // verify has FL/FR if more than one channel + if (numChans > 1 && (mask & AUDIO_CHANNEL_OUT_STEREO) != AUDIO_CHANNEL_OUT_STEREO) { ALOGE("Front channels must be present"); return SL_RESULT_CONTENT_UNSUPPORTED; } |