diff options
author | Eric Laurent <elaurent@google.com> | 2014-11-11 14:01:13 -0800 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2014-11-11 14:01:13 -0800 |
commit | e714af927c1e87a488178315b78b0c12c0ec9db9 (patch) | |
tree | d5a92fdf7eaaf5b0f27d9f8789ed92a7950c22b2 | |
parent | b4b0608b0560a7cad27aeec0af8b1728b971aa3a (diff) | |
download | platform_hardware_libhardware_legacy-lollipop-mr1-wfc-release.tar.gz platform_hardware_libhardware_legacy-lollipop-mr1-wfc-release.tar.bz2 platform_hardware_libhardware_legacy-lollipop-mr1-wfc-release.zip |
audio policy: use legacy stream type definitionsandroid-5.1.1_r5android-5.1.1_r28android-5.1.1_r22android-5.1.1_r17android-5.1.1_r12lollipop-mr1-wfc-releaselollipop-mr1-dev
New stream types have been added, so make sure that
legacy implementation uses legacy stream definitions
Bug: 18067208
Change-Id: I8042ebe9ac3e7eda380b8c91650f2ac16b44bc34
-rw-r--r-- | audio/AudioPolicyManagerBase.cpp | 4 | ||||
-rw-r--r-- | include/hardware_legacy/AudioPolicyManagerBase.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/audio/AudioPolicyManagerBase.cpp b/audio/AudioPolicyManagerBase.cpp index c03224a..74070fd 100644 --- a/audio/AudioPolicyManagerBase.cpp +++ b/audio/AudioPolicyManagerBase.cpp @@ -3138,7 +3138,7 @@ const AudioPolicyManagerBase::VolumeCurvePoint }; const AudioPolicyManagerBase::VolumeCurvePoint - *AudioPolicyManagerBase::sVolumeProfiles[AUDIO_STREAM_CNT] + *AudioPolicyManagerBase::sVolumeProfiles[AudioSystem::NUM_STREAM_TYPES] [AudioPolicyManagerBase::DEVICE_CATEGORY_CNT] = { { // AUDIO_STREAM_VOICE_CALL sDefaultVoiceVolumeCurve, // DEVICE_CATEGORY_HEADSET @@ -3194,7 +3194,7 @@ const AudioPolicyManagerBase::VolumeCurvePoint void AudioPolicyManagerBase::initializeVolumeCurves() { - for (int i = 0; i < AUDIO_STREAM_CNT; i++) { + for (int i = 0; i < AudioSystem::NUM_STREAM_TYPES; i++) { for (int j = 0; j < DEVICE_CATEGORY_CNT; j++) { mStreams[i].mVolumeCurve[j] = sVolumeProfiles[i][j]; diff --git a/include/hardware_legacy/AudioPolicyManagerBase.h b/include/hardware_legacy/AudioPolicyManagerBase.h index c5aac7b..531a737 100644 --- a/include/hardware_legacy/AudioPolicyManagerBase.h +++ b/include/hardware_legacy/AudioPolicyManagerBase.h @@ -244,7 +244,7 @@ protected: static const VolumeCurvePoint sDefaultVoiceVolumeCurve[AudioPolicyManagerBase::VOLCNT]; static const VolumeCurvePoint sSpeakerVoiceVolumeCurve[AudioPolicyManagerBase::VOLCNT]; // default volume curves per stream and device category. See initializeVolumeCurves() - static const VolumeCurvePoint *sVolumeProfiles[AUDIO_STREAM_CNT][DEVICE_CATEGORY_CNT]; + static const VolumeCurvePoint *sVolumeProfiles[AudioSystem::NUM_STREAM_TYPES][DEVICE_CATEGORY_CNT]; // descriptor for audio outputs. Used to maintain current configuration of each opened audio output // and keep track of the usage of this output by each audio stream type. |