SoundPool: Clean up attribute pointer

Test: atest SoundPoolAacTest
Test: atest SoundPoolHapticTest
Test: atest SoundPoolMidiTest
Test: atest SoundPoolOggTest
Test: atest AudioManagerTest#testSoundEffects
Test: soundpool_stress
Bug: 223815163
Change-Id: Idb2dafb9ad53dc7ffa0005425ea630fa7b7e5102
diff --git a/media/jni/soundpool/StreamManager.cpp b/media/jni/soundpool/StreamManager.cpp
index 7f987e3..487a696 100644
--- a/media/jni/soundpool/StreamManager.cpp
+++ b/media/jni/soundpool/StreamManager.cpp
@@ -106,10 +106,10 @@
 #pragma clang diagnostic ignored "-Wthread-safety-analysis"
 
 StreamManager::StreamManager(
-        int32_t streams, size_t threads, const audio_attributes_t* attributes,
+        int32_t streams, size_t threads, const audio_attributes_t& attributes,
         std::string opPackageName)
     : StreamMap(streams)
-    , mAttributes(*attributes)
+    , mAttributes(attributes)
     , mOpPackageName(std::move(opPackageName))
     , mLockStreamManagerStop(streams == 1 || kForceLockStreamManagerStop)
 {