summaryrefslogtreecommitdiffstats
path: root/libs/audioflinger/AudioHardwareStub.cpp
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2009-05-22 09:18:15 -0700
committerEric Laurent <elaurent@google.com>2009-05-26 07:44:28 -0700
commit570dd0b4da533032ba4ec6214eeebb1c90f6d512 (patch)
treea8b8a21035b6c977ed330022082e9098dfb0ebeb /libs/audioflinger/AudioHardwareStub.cpp
parentdd9d5f68ebd53a307477231c43a53b8870f47a3a (diff)
downloadframeworks_native-570dd0b4da533032ba4ec6214eeebb1c90f6d512.zip
frameworks_native-570dd0b4da533032ba4ec6214eeebb1c90f6d512.tar.gz
frameworks_native-570dd0b4da533032ba4ec6214eeebb1c90f6d512.tar.bz2
Fix issue 1846343 - part 1
This change is the first part of a fix for issue 1846343, : - Added new enum values for input sources in AudioRecord and MediaRecorder for voice uplink, downlink and uplink+downlink sources. - renamed streamType to inputSource in all native functions handling audio record. A second change is required in opencore author driver and android audio input to completely fix the issue.
Diffstat (limited to 'libs/audioflinger/AudioHardwareStub.cpp')
-rw-r--r--libs/audioflinger/AudioHardwareStub.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/audioflinger/AudioHardwareStub.cpp b/libs/audioflinger/AudioHardwareStub.cpp
index c61e6e6..0ab4c60 100644
--- a/libs/audioflinger/AudioHardwareStub.cpp
+++ b/libs/audioflinger/AudioHardwareStub.cpp
@@ -61,8 +61,8 @@ AudioStreamIn* AudioHardwareStub::openInputStream(
status_t *status, AudioSystem::audio_in_acoustics acoustics)
{
// check for valid input source
- if ((inputSource != AudioRecord::DEFAULT_INPUT) &&
- (inputSource != AudioRecord::MIC_INPUT)) {
+ if ((inputSource < AudioRecord::DEFAULT_INPUT) ||
+ (inputSource >= AudioRecord::NUM_INPUT_SOURCES)) {
return 0;
}