From 211eeaf17e5565b68447d29799dbf158a33cf4cf Mon Sep 17 00:00:00 2001 From: Glenn Kasten Date: Fri, 20 Jan 2012 09:37:45 -0800 Subject: [PATCH] More audio_stream_type_t Change-Id: I1260259efe0aa3fc1ef13de69758aaa592e1f815 --- include/media/AudioSystem.h | 2 +- media/libmedia/AudioSystem.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h index 6b12c1451c..74a1e623cf 100644 --- a/include/media/AudioSystem.h +++ b/include/media/AudioSystem.h @@ -248,7 +248,7 @@ private: static sp gAudioPolicyService; // mapping between stream types and outputs - static DefaultKeyedVector gStreamOutputMap; + static DefaultKeyedVector gStreamOutputMap; // list of output descriptors containing cached parameters // (sampling rate, framecount, channel count...) static DefaultKeyedVector gOutputs; diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp index 124032b369..df5017b57f 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -35,7 +35,8 @@ sp AudioSystem::gAudioFlinger; sp AudioSystem::gAudioFlingerClient; audio_error_callback AudioSystem::gAudioErrorCallback = NULL; // Cached values -DefaultKeyedVector AudioSystem::gStreamOutputMap(0); + +DefaultKeyedVector AudioSystem::gStreamOutputMap(0); DefaultKeyedVector AudioSystem::gOutputs(0); // Cached values for recording queries, all protected by gLock @@ -404,7 +405,7 @@ void AudioSystem::AudioFlingerClient::binderDied(const wp& who) { void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, int ioHandle, void *param2) { ALOGV("ioConfigChanged() event %d", event); OutputDescriptor *desc; - uint32_t stream; + audio_stream_type_t stream; if (ioHandle == 0) return; @@ -413,7 +414,7 @@ void AudioSystem::AudioFlingerClient::ioConfigChanged(int event, int ioHandle, v switch (event) { case STREAM_CONFIG_CHANGED: if (param2 == 0) break; - stream = *(uint32_t *)param2; + stream = *(audio_stream_type_t *)param2; ALOGV("ioConfigChanged() STREAM_CONFIG_CHANGED stream %d, output %d", stream, ioHandle); if (gStreamOutputMap.indexOfKey(stream) >= 0) { gStreamOutputMap.replaceValueFor(stream, ioHandle); -- 2.11.0