Loading media/jni/soundpool/SoundPool.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -85,12 +85,13 @@ bool checkLoop(int32_t *loop) } // namespace SoundPool::SoundPool( int32_t maxStreams, const audio_attributes_t* attributes, const std::string& opPackageName) int32_t maxStreams, const audio_attributes_t& attributes, const std::string& opPackageName) : mStreamManager(maxStreams, kStreamManagerThreads, attributes, opPackageName) { ALOGV("%s(maxStreams=%d, attr={ content_type=%d, usage=%d, flags=0x%x, tags=%s })", __func__, maxStreams, attributes->content_type, attributes->usage, attributes->flags, attributes->tags); attributes.content_type, attributes.usage, attributes.flags, attributes.tags); } SoundPool::~SoundPool() Loading media/jni/soundpool/SoundPool.h +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ namespace android { */ class SoundPool { public: SoundPool(int32_t maxStreams, const audio_attributes_t* attributes, SoundPool(int32_t maxStreams, const audio_attributes_t& attributes, const std::string& opPackageName = {}); ~SoundPool(); Loading media/jni/soundpool/StreamManager.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -106,10 +106,10 @@ int32_t StreamMap::getNextIdForStream(Stream* stream) const { #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) { Loading media/jni/soundpool/StreamManager.h +1 −1 Original line number Diff line number Diff line Loading @@ -387,7 +387,7 @@ class StreamManager : public StreamMap { public: // Note: the SoundPool pointer is only used for stream initialization. // It is not stored in StreamManager. StreamManager(int32_t streams, size_t threads, const audio_attributes_t* attributes, StreamManager(int32_t streams, size_t threads, const audio_attributes_t& attributes, std::string opPackageName); ~StreamManager(); Loading media/jni/soundpool/android_media_SoundPool.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -520,7 +520,7 @@ android_media_SoundPool_native_setup(JNIEnv *env, jobject thiz, (audio_flags_mask_t) env->GetIntField(jaa, javaAudioAttrFields.fieldFlags); ScopedUtfChars opPackageNameStr(env, opPackageName); auto soundPool = std::make_shared<SoundPool>( maxChannels, &audioAttributes, opPackageNameStr.c_str()); maxChannels, audioAttributes, opPackageNameStr.c_str()); soundPool->setCallback(android_media_callback, nullptr /* user */); // register with SoundPoolManager. Loading Loading
media/jni/soundpool/SoundPool.cpp +3 −2 Original line number Diff line number Diff line Loading @@ -85,12 +85,13 @@ bool checkLoop(int32_t *loop) } // namespace SoundPool::SoundPool( int32_t maxStreams, const audio_attributes_t* attributes, const std::string& opPackageName) int32_t maxStreams, const audio_attributes_t& attributes, const std::string& opPackageName) : mStreamManager(maxStreams, kStreamManagerThreads, attributes, opPackageName) { ALOGV("%s(maxStreams=%d, attr={ content_type=%d, usage=%d, flags=0x%x, tags=%s })", __func__, maxStreams, attributes->content_type, attributes->usage, attributes->flags, attributes->tags); attributes.content_type, attributes.usage, attributes.flags, attributes.tags); } SoundPool::~SoundPool() Loading
media/jni/soundpool/SoundPool.h +1 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ namespace android { */ class SoundPool { public: SoundPool(int32_t maxStreams, const audio_attributes_t* attributes, SoundPool(int32_t maxStreams, const audio_attributes_t& attributes, const std::string& opPackageName = {}); ~SoundPool(); Loading
media/jni/soundpool/StreamManager.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -106,10 +106,10 @@ int32_t StreamMap::getNextIdForStream(Stream* stream) const { #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) { Loading
media/jni/soundpool/StreamManager.h +1 −1 Original line number Diff line number Diff line Loading @@ -387,7 +387,7 @@ class StreamManager : public StreamMap { public: // Note: the SoundPool pointer is only used for stream initialization. // It is not stored in StreamManager. StreamManager(int32_t streams, size_t threads, const audio_attributes_t* attributes, StreamManager(int32_t streams, size_t threads, const audio_attributes_t& attributes, std::string opPackageName); ~StreamManager(); Loading
media/jni/soundpool/android_media_SoundPool.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -520,7 +520,7 @@ android_media_SoundPool_native_setup(JNIEnv *env, jobject thiz, (audio_flags_mask_t) env->GetIntField(jaa, javaAudioAttrFields.fieldFlags); ScopedUtfChars opPackageNameStr(env, opPackageName); auto soundPool = std::make_shared<SoundPool>( maxChannels, &audioAttributes, opPackageNameStr.c_str()); maxChannels, audioAttributes, opPackageNameStr.c_str()); soundPool->setCallback(android_media_callback, nullptr /* user */); // register with SoundPoolManager. Loading