Loading policy_hal/Android.mk +3 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,9 @@ LOCAL_CFLAGS += -DVOICE_CONCURRENCY LOCAL_CFLAGS += -DWFD_CONCURRENCY endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_MULTIPLE_TUNNEL)), true) LOCAL_CFLAGS += -DMULTIPLE_OFFLOAD_ENABLED endif include $(BUILD_SHARED_LIBRARY) Loading policy_hal/AudioPolicyManager.cpp +13 −0 Original line number Diff line number Diff line Loading @@ -1324,6 +1324,18 @@ audio_io_handle_t AudioPolicyManager::getOutput(AudioSystem::stream_type stream, if (profile != NULL) { AudioOutputDescriptor *outputDesc = NULL; #ifdef MULTIPLE_OFFLOAD_ENABLED bool multiOffloadEnabled = false; char value[PROPERTY_VALUE_MAX] = {0}; property_get("audio.offload.multiple.enabled", value, NULL); if (atoi(value) || !strncmp("true", value, 4)) multiOffloadEnabled = true; // if multiple concurrent offload decode is supported // do no check for reuse and also don't close previous output if its offload // previous output will be closed during track destruction if (multiOffloadEnabled) goto get_output__new_output_desc; #endif for (size_t i = 0; i < mOutputs.size(); i++) { AudioOutputDescriptor *desc = mOutputs.valueAt(i); if (!desc->isDuplicated() && (profile == desc->mProfile)) { Loading @@ -1342,6 +1354,7 @@ audio_io_handle_t AudioPolicyManager::getOutput(AudioSystem::stream_type stream, if (outputDesc != NULL) { closeOutput(outputDesc->mId); } get_output__new_output_desc: outputDesc = new AudioOutputDescriptor(profile); outputDesc->mDevice = device; outputDesc->mSamplingRate = samplingRate; Loading Loading
policy_hal/Android.mk +3 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,9 @@ LOCAL_CFLAGS += -DVOICE_CONCURRENCY LOCAL_CFLAGS += -DWFD_CONCURRENCY endif ifeq ($(strip $(AUDIO_FEATURE_ENABLED_MULTIPLE_TUNNEL)), true) LOCAL_CFLAGS += -DMULTIPLE_OFFLOAD_ENABLED endif include $(BUILD_SHARED_LIBRARY) Loading
policy_hal/AudioPolicyManager.cpp +13 −0 Original line number Diff line number Diff line Loading @@ -1324,6 +1324,18 @@ audio_io_handle_t AudioPolicyManager::getOutput(AudioSystem::stream_type stream, if (profile != NULL) { AudioOutputDescriptor *outputDesc = NULL; #ifdef MULTIPLE_OFFLOAD_ENABLED bool multiOffloadEnabled = false; char value[PROPERTY_VALUE_MAX] = {0}; property_get("audio.offload.multiple.enabled", value, NULL); if (atoi(value) || !strncmp("true", value, 4)) multiOffloadEnabled = true; // if multiple concurrent offload decode is supported // do no check for reuse and also don't close previous output if its offload // previous output will be closed during track destruction if (multiOffloadEnabled) goto get_output__new_output_desc; #endif for (size_t i = 0; i < mOutputs.size(); i++) { AudioOutputDescriptor *desc = mOutputs.valueAt(i); if (!desc->isDuplicated() && (profile == desc->mProfile)) { Loading @@ -1342,6 +1354,7 @@ audio_io_handle_t AudioPolicyManager::getOutput(AudioSystem::stream_type stream, if (outputDesc != NULL) { closeOutput(outputDesc->mId); } get_output__new_output_desc: outputDesc = new AudioOutputDescriptor(profile); outputDesc->mDevice = device; outputDesc->mSamplingRate = samplingRate; Loading