diff options
author | Eric Laurent <elaurent@google.com> | 2009-05-22 09:18:15 -0700 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2009-05-26 07:44:28 -0700 |
commit | 570dd0b4da533032ba4ec6214eeebb1c90f6d512 (patch) | |
tree | a8b8a21035b6c977ed330022082e9098dfb0ebeb /libs/audioflinger/AudioHardwareGeneric.cpp | |
parent | dd9d5f68ebd53a307477231c43a53b8870f47a3a (diff) | |
download | frameworks_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/AudioHardwareGeneric.cpp')
-rw-r--r-- | libs/audioflinger/AudioHardwareGeneric.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/audioflinger/AudioHardwareGeneric.cpp b/libs/audioflinger/AudioHardwareGeneric.cpp index a97c0bc..1e159b8 100644 --- a/libs/audioflinger/AudioHardwareGeneric.cpp +++ b/libs/audioflinger/AudioHardwareGeneric.cpp @@ -98,8 +98,8 @@ AudioStreamIn* AudioHardwareGeneric::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; } |