diff options
| author | 2019-02-05 01:02:43 +0000 | |
|---|---|---|
| committer | 2019-02-05 01:02:43 +0000 | |
| commit | 24e3c2f28801957337b62e6828322f45ece9c81f (patch) | |
| tree | 767222f185b8b2da72440513a3ec865ac8b7b695 | |
| parent | adf7c8575e7b0a44d5ea7622c5332c8549889108 (diff) | |
| parent | 713f0e4a6379b27af3a703b75750fd6100553ab1 (diff) | |
Merge "audiopolicy: get rid of hardcoded attributes <--> stream types"
| -rw-r--r-- | core/jni/Android.bp | 1 | ||||
| -rw-r--r-- | media/jni/soundpool/SoundPool.cpp | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/core/jni/Android.bp b/core/jni/Android.bp index e7a1c49e7a99..345058bd4f6f 100644 --- a/core/jni/Android.bp +++ b/core/jni/Android.bp @@ -276,6 +276,7 @@ cc_library_shared { "libmediametrics", "libmeminfo", "libaudioclient", + "libaudiopolicy", "libjpeg", "libusbhost", "libharfbuzz_ng", diff --git a/media/jni/soundpool/SoundPool.cpp b/media/jni/soundpool/SoundPool.cpp index 5f513207bd5f..e08dab48ce39 100644 --- a/media/jni/soundpool/SoundPool.cpp +++ b/media/jni/soundpool/SoundPool.cpp @@ -26,7 +26,6 @@ #include <media/AudioTrack.h> #include "SoundPool.h" #include "SoundPoolThread.h" -#include <media/AudioPolicyHelper.h> #include <media/NdkMediaCodec.h> #include <media/NdkMediaExtractor.h> #include <media/NdkMediaFormat.h> @@ -746,7 +745,8 @@ void SoundChannel::play(const sp<Sample>& sample, int nextChannelID, float leftV // initialize track size_t afFrameCount; uint32_t afSampleRate; - audio_stream_type_t streamType = audio_attributes_to_stream_type(mSoundPool->attributes()); + audio_stream_type_t streamType = + AudioSystem::attributesToStreamType(*mSoundPool->attributes()); if (AudioSystem::getOutputFrameCount(&afFrameCount, streamType) != NO_ERROR) { afFrameCount = kDefaultFrameCount; } |