From 09617dee7815943b6ddb15e1edbe0d3236c59e78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E5=BF=97=E5=BA=86?= Date: Thu, 11 Sep 2025 21:16:19 +0800 Subject: [PATCH 1/9] =?UTF-8?q?proAudio=20=E6=97=A5=E5=BF=97=E6=95=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 蒋志庆 --- .../manager/src/hpae_capturer_manager.cpp | 29 +++++---- .../src/hpae_inner_capturer_manager.cpp | 6 +- .../audio_engine/manager/src/hpae_manager.cpp | 42 ++++++------- .../src/hpae_offload_renderer_manager.cpp | 8 +-- .../manager/src/hpae_policy_manager.cpp | 4 +- .../node/src/hpae_capture_effect_node.cpp | 8 +-- .../audio_engine/node/src/hpae_gain_node.cpp | 8 +-- .../node/src/hpae_loudness_gain_node.cpp | 4 +- .../node/src/hpae_node_common.cpp | 12 ++-- .../node/src/hpae_offload_sinkoutput_node.cpp | 33 +++++------ .../node/src/hpae_output_cluster.cpp | 15 ++--- .../node/src/hpae_process_cluster.cpp | 22 +++---- .../node/src/hpae_remote_output_cluster.cpp | 21 +++---- .../node/src/hpae_remote_sink_output_node.cpp | 22 +++---- .../node/src/hpae_render_effect_node.cpp | 34 +++++------ .../node/src/hpae_resample_node.cpp | 2 +- .../node/src/hpae_sink_input_node.cpp | 10 ++-- .../node/src/hpae_sink_output_node.cpp | 19 +++--- .../node/src/hpae_source_input_cluster.cpp | 2 +- .../node/src/hpae_source_input_node.cpp | 2 +- .../node/src/hpae_source_output_node.cpp | 2 +- .../node/src/hpae_source_process_cluster.cpp | 4 +- .../proresampler/audio_proresampler.cpp | 24 ++++---- .../audio_engine/utils/hpae_no_lock_queue.cpp | 6 +- .../server/src/hpae_capturer_stream_impl.cpp | 12 ++-- .../server/src/hpae_renderer_stream_impl.cpp | 59 +++++++++---------- 26 files changed, 185 insertions(+), 225 deletions(-) diff --git a/services/audio_engine/manager/src/hpae_capturer_manager.cpp b/services/audio_engine/manager/src/hpae_capturer_manager.cpp index a5e864eaed..f4f6d84e8b 100644 --- a/services/audio_engine/manager/src/hpae_capturer_manager.cpp +++ b/services/audio_engine/manager/src/hpae_capturer_manager.cpp @@ -76,7 +76,9 @@ int32_t HpaeCapturerManager::CaptureEffectCreate(const HpaeProcessorType &proces int32_t HpaeCapturerManager::CreateOutputSession(const HpaeStreamInfo &streamInfo) { - AUDIO_INFO_LOG("Create output node:%{public}d", streamInfo.sessionId); + AUDIO_INFO_LOG("CreateStream sessionId %{public}u deviceName %{public}s", + streamInfo.sessionId, + sourceInfo_.deviceName.c_str()); HpaeNodeInfo nodeInfo; nodeInfo.channels = streamInfo.channels; nodeInfo.format = streamInfo.format; @@ -195,7 +197,7 @@ void HpaeCapturerManager::SetSessionState(uint32_t sessionId, HpaeSessionState c int32_t HpaeCapturerManager::CreateStream(const HpaeStreamInfo &streamInfo) { if (!IsInit()) { - AUDIO_ERR_LOG("HpaeCapturerManager is not init"); + AUDIO_ERR_LOG("not init"); return ERR_INVALID_OPERATION; } int32_t checkRet = CheckSourceAndStreamInfo(streamInfo, sourceInfo_); @@ -203,9 +205,6 @@ int32_t HpaeCapturerManager::CreateStream(const HpaeStreamInfo &streamInfo) return checkRet; } auto request = [this, streamInfo]() { - AUDIO_INFO_LOG("CreateStream sessionId %{public}u deviceName %{public}s", - streamInfo.sessionId, - sourceInfo_.deviceName.c_str()); CreateOutputSession(streamInfo); SetSessionState(streamInfo.sessionId, HPAE_SESSION_PREPARED); }; @@ -216,7 +215,7 @@ int32_t HpaeCapturerManager::CreateStream(const HpaeStreamInfo &streamInfo) int32_t HpaeCapturerManager::DestroyStream(uint32_t sessionId) { if (!IsInit()) { - AUDIO_ERR_LOG("HpaeCapturerManager is not init"); + AUDIO_ERR_LOG("not init"); return ERR_INVALID_OPERATION; } auto request = [this, sessionId]() { @@ -370,7 +369,7 @@ int32_t HpaeCapturerManager::Pause(uint32_t sessionId) int32_t HpaeCapturerManager::Flush(uint32_t sessionId) { if (!IsInit()) { - AUDIO_ERR_LOG("HpaeCapturerManager is not init"); + AUDIO_ERR_LOG("not init"); return ERR_INVALID_OPERATION; } auto request = [this, sessionId]() { @@ -386,7 +385,7 @@ int32_t HpaeCapturerManager::Flush(uint32_t sessionId) int32_t HpaeCapturerManager::Drain(uint32_t sessionId) { if (!IsInit()) { - AUDIO_ERR_LOG("HpaeCapturerManager is not init"); + AUDIO_ERR_LOG("not init"); return ERR_INVALID_OPERATION; } auto request = [this, sessionId]() { @@ -641,11 +640,11 @@ int32_t HpaeCapturerManager::ReloadCaptureManager(const HpaeSourceInfo &sourceIn sourceInfo_ = sourceInfo; int32_t ret = InitCapturerManager(); if (ret != SUCCESS) { - AUDIO_INFO_LOG("re-Init HpaeCapturerManager failed"); + AUDIO_INFO_LOG("re-Init failed"); TriggerCallback(isReload ? RELOAD_AUDIO_SINK_RESULT : INIT_DEVICE_RESULT, sourceInfo_.deviceName, ret); return; } - AUDIO_INFO_LOG("re-Init HpaeCapturerManager success"); + AUDIO_INFO_LOG("re-Init success"); HpaePolicyManager::GetInstance().SetInputDevice(captureId_, static_cast(sourceInfo_.deviceType)); // connect for (const auto &moveInfo : moveInfos) { @@ -714,9 +713,9 @@ int32_t HpaeCapturerManager::Init(bool isReload) auto request = [this, isReload] { int32_t ret = InitCapturerManager(); TriggerCallback(isReload ? RELOAD_AUDIO_SINK_RESULT : INIT_DEVICE_RESULT, sourceInfo_.deviceName, ret); - CHECK_AND_RETURN_LOG(ret == SUCCESS, "Init HpaeCapturerManager failed"); + CHECK_AND_RETURN_LOG(ret == SUCCESS, "Init failed"); TriggerCallback(INIT_SOURCE_RESULT, sourceInfo_.sourceType); - AUDIO_INFO_LOG("Init HpaeCapturerManager success"); + AUDIO_INFO_LOG("Init success"); CheckIfAnyStreamRunning(); HpaePolicyManager::GetInstance().SetInputDevice(captureId_, static_cast(sourceInfo_.deviceType)); @@ -728,7 +727,7 @@ int32_t HpaeCapturerManager::Init(bool isReload) int32_t HpaeCapturerManager::DeInit(bool isMoveDefault) { - AUDIO_INFO_LOG("DeInit device:%{public}s", sourceInfo_.deviceName.c_str()); + AUDIO_INFO_LOG("device:%{public}s", sourceInfo_.deviceName.c_str()); if (hpaeSignalProcessThread_ != nullptr) { hpaeSignalProcessThread_->DeactivateThread(); hpaeSignalProcessThread_ = nullptr; @@ -825,7 +824,7 @@ bool HpaeCapturerManager::IsRunning(void) void HpaeCapturerManager::SendRequest(Request &&request, const std::string &funcName, bool isInit) { if (!isInit && !IsInit()) { - AUDIO_INFO_LOG("HpaeCapturerManager not init, %{public}s excute failed", funcName.c_str()); + AUDIO_INFO_LOG("not init, %{public}s excute failed", funcName.c_str()); HpaeMessageQueueMonitor::ReportMessageQueueException(HPAE_CAPTURE_MANAGER_TYPE, funcName, "HpaeCapturerManager not init"); return; @@ -996,7 +995,7 @@ std::string HpaeCapturerManager::GetThreadName() int32_t HpaeCapturerManager::DumpSourceInfo() { - CHECK_AND_RETURN_RET_LOG(IsInit(), ERR_ILLEGAL_STATE, "HpaeCapturerManager not init"); + CHECK_AND_RETURN_RET_LOG(IsInit(), ERR_ILLEGAL_STATE, "not init"); SendRequest([this]() { AUDIO_INFO_LOG("DumpSourceInfo deviceName %{public}s", sourceInfo_.deviceName.c_str()); UploadDumpSourceInfo(sourceInfo_.deviceName); diff --git a/services/audio_engine/manager/src/hpae_inner_capturer_manager.cpp b/services/audio_engine/manager/src/hpae_inner_capturer_manager.cpp index 01fbfd9c2f..35ed8cbb2c 100644 --- a/services/audio_engine/manager/src/hpae_inner_capturer_manager.cpp +++ b/services/audio_engine/manager/src/hpae_inner_capturer_manager.cpp @@ -35,7 +35,7 @@ HpaeInnerCapturerManager::HpaeInnerCapturerManager(HpaeSinkInfo &sinkInfo) HpaeInnerCapturerManager::~HpaeInnerCapturerManager() { - AUDIO_INFO_LOG("destructor inner capturer sink."); + AUDIO_INFO_LOG("destructor"); if (isInit_.load()) { DeInit(); } @@ -178,7 +178,7 @@ int32_t HpaeInnerCapturerManager::MoveStream(uint32_t sessionId, const std::stri int32_t HpaeInnerCapturerManager::CreateStream(const HpaeStreamInfo &streamInfo) { if (!IsInit()) { - AUDIO_INFO_LOG("CreateStream not init"); + AUDIO_INFO_LOG("not init"); return ERR_INVALID_OPERATION; } int32_t checkRet = CheckStreamInfo(streamInfo, sinkInfo_); @@ -867,7 +867,7 @@ void HpaeInnerCapturerManager::SetSessionStateForCapturer(uint32_t sessionId, Hp void HpaeInnerCapturerManager::SendRequestInner(Request &&request, const std::string &funcName, bool isInit) { if (!isInit && !IsInit()) { - AUDIO_INFO_LOG("HpaeInnerCapturerManager not init, %{public}s excute failed", funcName.c_str()); + AUDIO_INFO_LOG("not init, %{public}s excute failed", funcName.c_str()); HpaeMessageQueueMonitor::ReportMessageQueueException(HPAE_INNER_CAPTURE_MANAGER_TYPE, funcName, "HpaeInnerCapturerManager not init"); return; diff --git a/services/audio_engine/manager/src/hpae_manager.cpp b/services/audio_engine/manager/src/hpae_manager.cpp index 074f0f8350..9f88e53c5f 100644 --- a/services/audio_engine/manager/src/hpae_manager.cpp +++ b/services/audio_engine/manager/src/hpae_manager.cpp @@ -155,7 +155,7 @@ bool HpaeManager::SetSinkMute(const std::string &sinkName, bool isMute, bool isS { auto request = [this, sinkName, isMute, isSync]() { // todo for device change - AUDIO_INFO_LOG("HpaeManager::SetSinkMute sinkName: %{public}s isMute: %{public}d, isSync: %{public}d", + AUDIO_INFO_LOG("SetSinkMute sinkName: %{public}s isMute: %{public}d, isSync: %{public}d", sinkName.c_str(), isMute, isSync); @@ -196,7 +196,6 @@ int32_t HpaeManager::GetAllSinks() auto request = [this]() { std::vector sinks; // todo for device change - AUDIO_INFO_LOG("HpaeManager::GetAllSinks end"); if (auto serviceCallback = serviceCallback_.lock()) { serviceCallback->OnGetAllSinksCb(SUCCESS, sinks); } @@ -215,7 +214,7 @@ int32_t HpaeManager::DeInit() } hpaeNoLockQueue_.HandleRequests(); // todo suspend isInit_.store(false); - AUDIO_INFO_LOG("HpaeManager::DeInit end"); + AUDIO_INFO_LOG("success"); return SUCCESS; } @@ -223,7 +222,7 @@ int32_t HpaeManager::RegisterSerivceCallback(const std::weak_ptrInit(); - AUDIO_INFO_LOG("HpaeManager::OpenAudioPort name: %{public}s end sinkIndex is %{public}u", + AUDIO_INFO_LOG("OpenAudioPort name: %{public}s end sinkIndex is %{public}u", audioModuleInfo.name.c_str(), sinkSourceIndex); return SUCCESS; @@ -683,7 +682,6 @@ int32_t HpaeManager::GetSourceInfoByIdx(const int32_t &sourceIdx, int32_t HpaeManager::SetDefaultSink(std::string name) { CHECK_AND_RETURN_RET_LOG(!name.empty(), ERROR_INVALID_PARAM, "invalid sink name"); - AUDIO_INFO_LOG("HpaeManager::SetDefaultSink name: %{public}s", name.c_str()); auto request = [this, name]() { AUDIO_INFO_LOG("SetDefaultSink name: %{public}s", name.c_str()); if (name == defaultSink_) { @@ -748,7 +746,6 @@ int32_t HpaeManager::SetDefaultSource(std::string name) int32_t HpaeManager::GetAllSinkInputs() { - AUDIO_INFO_LOG("GetAllSinkInputs"); auto request = [this]() { std::vector results; std::transform(sinkInputs_.begin(), sinkInputs_.end(), std::back_inserter(results), [](const auto &pair) { @@ -792,7 +789,6 @@ void HpaeManager::MoveToPreferSink(const std::string &name, std::shared_ptr results; std::transform(sourceOutputs_.begin(), sourceOutputs_.end(), std::back_inserter(results), [](const auto &pair) { @@ -979,7 +975,7 @@ void HpaeManager::Invoke(HpaeMsgCode cmdID, const std::any &args) SendRequest(request, __func__); return; }; - AUDIO_ERR_LOG("HpaeManager::Invoke cmdID %{public}d not found", (int32_t)cmdID); + AUDIO_ERR_LOG("cmdID %{public}d not found", (int32_t)cmdID); } void HpaeManager::InvokeSync(HpaeMsgCode cmdID, const std::any &args) @@ -989,7 +985,7 @@ void HpaeManager::InvokeSync(HpaeMsgCode cmdID, const std::any &args) it->second(args); return; }; - AUDIO_ERR_LOG("HpaeManager::InvokeSync cmdID %{public}d not found", (int32_t)cmdID); + AUDIO_ERR_LOG("cmdID %{public}d not found", (int32_t)cmdID); } template @@ -1190,11 +1186,7 @@ void HpaeManager::HandleUpdateStatus( { // log limit if (operation != OPERATION_UNDERFLOW) { - AUDIO_INFO_LOG("HpaeManager::HandleUpdateStatus sessionid:%{public}u " - "status:%{public}d operation:%{public}d", - sessionId, - status, - operation); + AUDIO_INFO_LOG("sessionid:%{public}u status:%{public}d operation:%{public}d", sessionId, status, operation); } if (operation == OPERATION_INVALID) { // maybe dosomething while move sink inputs @@ -1236,7 +1228,7 @@ void HpaeManager::UpdateStatus(const std::weak_ptr &callb void HpaeManager::HandleDumpSinkInfo(std::string deviceName, std::string dumpStr) { - AUDIO_INFO_LOG("HpaeManager::HandleDumpSinkInfo deviceName:%{public}s dumpStr:%{public}s", + AUDIO_INFO_LOG("deviceName:%{public}s dumpStr:%{public}s", deviceName.c_str(), dumpStr.c_str()); if (auto ptr = dumpCallback_.lock()) { @@ -1246,7 +1238,7 @@ void HpaeManager::HandleDumpSinkInfo(std::string deviceName, std::string dumpStr void HpaeManager::HandleDumpSourceInfo(std::string deviceName, std::string dumpStr) { - AUDIO_INFO_LOG("HpaeManager::HandleDumpSourceInfo deviceName:%{public}s dumpStr:%{public}s", + AUDIO_INFO_LOG("deviceName:%{public}s dumpStr:%{public}s", deviceName.c_str(), dumpStr.c_str()); if (auto ptr = dumpCallback_.lock()) { @@ -1347,7 +1339,7 @@ void HpaeManager::DequeuePendingTransition(uint32_t sessionId) while (it != pendingTransitionsTracker_.end()) { if (it->sessionId == sessionId) { it = pendingTransitionsTracker_.erase(it); - AUDIO_INFO_LOG("DequeuePendingTransition sessionid:%{public}u", sessionId); + AUDIO_INFO_LOG("sessionid:%{public}u", sessionId); break; } else { ++it; @@ -1550,7 +1542,7 @@ int32_t HpaeManager::Start(HpaeStreamClassType streamClassType, uint32_t session CHECK_AND_RETURN_LOG(ShouldNotSkipProcess(streamClassType, sessionId), "Start session: %{public}u failed, session already released", sessionId); AUDIO_INFO_LOG( - "HpaeManager::Start sessionId: %{public}u streamClassType:%{public}d", sessionId, streamClassType); + "Start sessionId: %{public}u streamClassType:%{public}d", sessionId, streamClassType); if (SetMovingStreamState(streamClassType, sessionId, HPAE_SESSION_RUNNING, HPAE_SESSION_RUNNING, OPERATION_STARTED)) { return; @@ -1595,7 +1587,7 @@ int32_t HpaeManager::StartWithSyncId(HpaeStreamClassType streamClassType, uint32 CHECK_AND_RETURN_LOG(ShouldNotSkipProcess(streamClassType, sessionId), "StartWithSyncId session: %{public}u failed, session already released", sessionId); AUDIO_INFO_LOG( - "HpaeManager::StartWithSyncId sessionId: %{public}u streamClassType:%{public}d syncId: %{public}d", + "StartWithSyncId sessionId: %{public}u streamClassType:%{public}d syncId: %{public}d", sessionId, streamClassType, syncId); if (SetMovingStreamState(streamClassType, sessionId, HPAE_SESSION_RUNNING, HPAE_SESSION_RUNNING, OPERATION_STARTED)) { @@ -1626,7 +1618,7 @@ int32_t HpaeManager::Pause(HpaeStreamClassType streamClassType, uint32_t session CHECK_AND_RETURN_LOG(ShouldNotSkipProcess(streamClassType, sessionId), "Pause session: %{public}u failed, session already released", sessionId); AUDIO_INFO_LOG( - "HpaeManager::Pause sessionId: %{public}u streamClassType:%{public}d", sessionId, streamClassType); + "Pause sessionId: %{public}u streamClassType:%{public}d", sessionId, streamClassType); if (SetMovingStreamState(streamClassType, sessionId, HPAE_SESSION_PAUSED, HPAE_SESSION_PAUSING, OPERATION_PAUSED)) { return; @@ -1669,7 +1661,7 @@ int32_t HpaeManager::Flush(HpaeStreamClassType streamClassType, uint32_t session CHECK_AND_RETURN_LOG(ShouldNotSkipProcess(streamClassType, sessionId), "Flush session: %{public}u failed, session already released", sessionId); AUDIO_INFO_LOG( - "HpaeManager::Flush sessionId: %{public}u streamClassType:%{public}d", sessionId, streamClassType); + "Flush sessionId: %{public}u streamClassType:%{public}d", sessionId, streamClassType); if (SetMovingStreamState(streamClassType, sessionId, HPAE_SESSION_INVALID, HPAE_SESSION_INVALID, OPERATION_FLUSHED)) { return; @@ -1712,7 +1704,7 @@ int32_t HpaeManager::Drain(HpaeStreamClassType streamClassType, uint32_t session CHECK_AND_RETURN_LOG(ShouldNotSkipProcess(streamClassType, sessionId), "Drain session: %{public}u failed, session already released", sessionId); AUDIO_INFO_LOG( - "HpaeManager::Drain sessionId: %{public}u streamClassType:%{public}d", sessionId, streamClassType); + "Drain sessionId: %{public}u streamClassType:%{public}d", sessionId, streamClassType); if (SetMovingStreamState(streamClassType, sessionId, HPAE_SESSION_INVALID, HPAE_SESSION_INVALID, OPERATION_DRAINED)) { return; @@ -1753,7 +1745,7 @@ int32_t HpaeManager::Stop(HpaeStreamClassType streamClassType, uint32_t sessionI CHECK_AND_RETURN_LOG(ShouldNotSkipProcess(streamClassType, sessionId), "Stop session: %{public}u failed, session already released", sessionId); AUDIO_INFO_LOG( - "HpaeManager::Stop sessionId: %{public}u streamClassType:%{public}d", sessionId, streamClassType); + "Stop sessionId: %{public}u streamClassType:%{public}d", sessionId, streamClassType); if (SetMovingStreamState(streamClassType, sessionId, HPAE_SESSION_STOPPED, HPAE_SESSION_STOPPING, OPERATION_STOPPED)) { return; diff --git a/services/audio_engine/manager/src/hpae_offload_renderer_manager.cpp b/services/audio_engine/manager/src/hpae_offload_renderer_manager.cpp index eb78f3f874..825ed3d1ca 100644 --- a/services/audio_engine/manager/src/hpae_offload_renderer_manager.cpp +++ b/services/audio_engine/manager/src/hpae_offload_renderer_manager.cpp @@ -37,7 +37,7 @@ HpaeOffloadRendererManager::HpaeOffloadRendererManager(HpaeSinkInfo &sinkInfo) HpaeOffloadRendererManager::~HpaeOffloadRendererManager() { - AUDIO_INFO_LOG("destructor offload renderer"); + AUDIO_INFO_LOG("destructor"); if (isInit_.load()) { DeInit(); } @@ -426,7 +426,7 @@ int32_t HpaeOffloadRendererManager::Init(bool isReload) int32_t HpaeOffloadRendererManager::InitSinkInner(bool isReload) { - AUDIO_INFO_LOG("HpaeOffloadRendererManager::init"); + AUDIO_INFO_LOG("init"); HpaeNodeInfo nodeInfo; int32_t checkRet = CheckFramelen(sinkInfo_); if (checkRet != SUCCESS) { @@ -446,7 +446,7 @@ int32_t HpaeOffloadRendererManager::InitSinkInner(bool isReload) sinkOutputNode_ = std::make_unique(nodeInfo); sinkOutputNode_->SetTimeoutStopThd(sinkInfo_.suspendTime); // if failed, RenderSinkInit will failed either, so no need to deal ret - AUDIO_INFO_LOG("HpaeOffloadRendererManager::GetRenderSinkInstance"); + AUDIO_INFO_LOG("GetRenderSinkInstance"); sinkOutputNode_->GetRenderSinkInstance(sinkInfo_.deviceClass, sinkInfo_.deviceNetId); IAudioSinkAttr attr; attr.adapterName = sinkInfo_.adapterName.c_str(); @@ -462,7 +462,7 @@ int32_t HpaeOffloadRendererManager::InitSinkInner(bool isReload) int32_t ret = sinkOutputNode_->RenderSinkInit(attr); isInit_.store(true); TriggerCallback(isReload ? RELOAD_AUDIO_SINK_RESULT : INIT_DEVICE_RESULT, sinkInfo_.deviceName, ret); - AUDIO_INFO_LOG("HpaeOffloadRendererManager::inited"); + AUDIO_INFO_LOG("inited"); return SUCCESS; } diff --git a/services/audio_engine/manager/src/hpae_policy_manager.cpp b/services/audio_engine/manager/src/hpae_policy_manager.cpp index 5dea3d0a21..5c1f314cc5 100644 --- a/services/audio_engine/manager/src/hpae_policy_manager.cpp +++ b/services/audio_engine/manager/src/hpae_policy_manager.cpp @@ -37,12 +37,12 @@ HpaePolicyManager &HpaePolicyManager::GetInstance() HpaePolicyManager::HpaePolicyManager() { - AUDIO_DEBUG_LOG("Hpae policy manager created"); + AUDIO_DEBUG_LOG("created"); } HpaePolicyManager::~HpaePolicyManager() { - AUDIO_WARNING_LOG("Hpae policy manager destroyed"); + AUDIO_WARNING_LOG("destroyed"); } void HpaePolicyManager::InitAudioEffectChainManager(const std::vector &effectChains, diff --git a/services/audio_engine/node/src/hpae_capture_effect_node.cpp b/services/audio_engine/node/src/hpae_capture_effect_node.cpp index c2095c5767..52c358cfea 100644 --- a/services/audio_engine/node/src/hpae_capture_effect_node.cpp +++ b/services/audio_engine/node/src/hpae_capture_effect_node.cpp @@ -38,7 +38,7 @@ HpaeCaptureEffectNode::HpaeCaptureEffectNode(HpaeNodeInfo &nodeInfo) auto item = audioEnhanceSupportedSceneTypes.find(nodeInfo.effectInfo.enhanceScene); if (item != audioEnhanceSupportedSceneTypes.end()) { sceneType_ = item->second; - AUDIO_INFO_LOG("HpaeCaptureEffectNode created scenetype: [%{public}s]", sceneType_.c_str()); + AUDIO_INFO_LOG("created scenetype: [%{public}s]", sceneType_.c_str()); } else { AUDIO_ERR_LOG("scenetype: %{public}u not supported", nodeInfo.effectInfo.enhanceScene); } @@ -65,7 +65,7 @@ HpaePcmBuffer *HpaeCaptureEffectNode::SignalProcess(const std::vectorGetOutputPort(nodeInfo)), - "HpaeCaptureEffectNode[%{public}u] has disconnected with preNode", GetNodeId()); + "%{public}u has disconnected with preNode", GetNodeId()); inputStream_.DisConnect(preNode->GetOutputPort(nodeInfo, true)); #ifdef ENABLE_HIDUMP_DFX if (auto callback = GetNodeStatusCallback().lock()) { @@ -177,7 +177,7 @@ int32_t HpaeCaptureEffectNode::CaptureEffectCreate(uint64_t sceneKeyCode, Captur enhanceAttr.ecChannels = attr.ecChannels; enhanceAttr.micRefChannels = attr.micRefChannels; int32_t ret = audioEnhanceChainManager->CreateAudioEnhanceChainDynamic(sceneKeyCode, enhanceAttr); - CHECK_AND_RETURN_RET_LOG(ret == SUCCESS, ERROR, "CreateAudioEnhanceChainDynamic failed, ret:%{public}d", ret); + CHECK_AND_RETURN_RET_LOG(ret == SUCCESS, ERROR, "failed, ret:%{public}d", ret); AudioBufferConfig micConfig = {}; AudioBufferConfig ecConfig = {}; diff --git a/services/audio_engine/node/src/hpae_gain_node.cpp b/services/audio_engine/node/src/hpae_gain_node.cpp index 67d0ee68e6..ad87b606d4 100644 --- a/services/audio_engine/node/src/hpae_gain_node.cpp +++ b/services/audio_engine/node/src/hpae_gain_node.cpp @@ -51,9 +51,9 @@ HpaeGainNode::HpaeGainNode(HpaeNodeInfo &nodeInfo) : HpaeNode(nodeInfo), HpaePlu } audioVolume->SetHistoryVolume(GetSessionId(), curSystemGain); audioVolume->Monitor(GetSessionId(), true); - AUDIO_INFO_LOG("HpaeGainNode curSystemGain:%{public}f streamType :%{public}d", curSystemGain, GetStreamType()); + AUDIO_INFO_LOG("curSystemGain:%{public}f streamType :%{public}d", curSystemGain, GetStreamType()); AUDIO_INFO_LOG( - "HpaeGainNode SessionId:%{public}u deviceClass :%{public}s", GetSessionId(), GetDeviceClass().c_str()); + "SessionId:%{public}u deviceClass :%{public}s", GetSessionId(), GetDeviceClass().c_str()); #ifdef ENABLE_HIDUMP_DFX SetNodeName("hpaeGainNode"); #endif @@ -70,7 +70,7 @@ HpaeGainNode::~HpaeGainNode() HpaePcmBuffer *HpaeGainNode::SignalProcess(const std::vector &inputs) { if (inputs.empty()) { - AUDIO_WARNING_LOG("HpaeGainNode inputs size is empty, SessionId:%{public}d", GetSessionId()); + AUDIO_WARNING_LOG("inputs size is empty, SessionId:%{public}d", GetSessionId()); return nullptr; } auto rate = "rate[" + std::to_string(inputs[0]->GetSampleRate()) + "]_"; @@ -78,7 +78,7 @@ HpaePcmBuffer *HpaeGainNode::SignalProcess(const std::vector &i auto len = "len[" + std::to_string(inputs[0]->GetFrameLen()) + "]"; Trace trace("[" + std::to_string(GetSessionId()) + "]HpaeGainNode::SignalProcess " + rate + ch + len); if (fadeOutState_ == FadeOutState::DONE_FADEOUT) { - AUDIO_INFO_LOG("HpaeGainNode: fadeout done, set session %{public}d silence", GetSessionId()); + AUDIO_INFO_LOG("fadeout done, set session %{public}d silence", GetSessionId()); SilenceData(inputs[0]); } float *inputData = (float *)inputs[0]->GetPcmDataBuffer(); diff --git a/services/audio_engine/node/src/hpae_loudness_gain_node.cpp b/services/audio_engine/node/src/hpae_loudness_gain_node.cpp index fb83462a72..ddcc6b0634 100644 --- a/services/audio_engine/node/src/hpae_loudness_gain_node.cpp +++ b/services/audio_engine/node/src/hpae_loudness_gain_node.cpp @@ -52,7 +52,7 @@ HpaeLoudnessGainNode::HpaeLoudnessGainNode(HpaeNodeInfo &nodeInfo) : HpaeNode(no pcmBufferInfo_(nodeInfo.channels, nodeInfo.frameLen, nodeInfo.samplingRate, nodeInfo.channelLayout), loudnessGainOutput_(pcmBufferInfo_) { - AUDIO_INFO_LOG("HpaeLoudnessGainNode created"); + AUDIO_INFO_LOG("created"); dlHandle_ = dlopen(LOUDNESSGAIN_PATH.c_str(), 1); if (!dlHandle_) { AUDIO_ERR_LOG(" dlopen lib %{public}s Fail", LOUDNESSGAIN_PATH.c_str()); @@ -161,7 +161,7 @@ void HpaeLoudnessGainNode::CheckUpdateInfo(HpaePcmBuffer *input) int32_t HpaeLoudnessGainNode::ReleaseHandle(float loudnessGain) { - AUDIO_INFO_LOG("Releasing handle..."); + AUDIO_INFO_LOG("Releasing..."); CHECK_AND_RETURN_RET_LOG(handle_, ERROR, "no handle."); int32_t ret = audioEffectLibHandle_->releaseEffect(handle_); CHECK_AND_RETURN_RET_LOG(ret == 0, ERROR, "handle releasing failed."); diff --git a/services/audio_engine/node/src/hpae_node_common.cpp b/services/audio_engine/node/src/hpae_node_common.cpp index 76381858b6..5b457429df 100644 --- a/services/audio_engine/node/src/hpae_node_common.cpp +++ b/services/audio_engine/node/src/hpae_node_common.cpp @@ -425,27 +425,27 @@ bool CheckSourceInfoIsDifferent(const HpaeSourceInfo &info, const HpaeSourceInfo void PrintAudioModuleInfo(const AudioModuleInfo &audioModuleInfo) { - AUDIO_INFO_LOG("rate: %{public}s ch: %{public}s buffersize: %{public}s ", + AUDIO_INFO_LOG("rate: %{public}s ch: %{public}s buffersize: %{public}s", audioModuleInfo.rate.c_str(), audioModuleInfo.channels.c_str(), audioModuleInfo.bufferSize.c_str()); - AUDIO_INFO_LOG("format: %{public}s name: %{public}s lib: %{public}s ", + AUDIO_INFO_LOG("format: %{public}s name: %{public}s lib: %{public}s", audioModuleInfo.format.c_str(), audioModuleInfo.name.c_str(), audioModuleInfo.lib.c_str()); - AUDIO_INFO_LOG("deviceType: %{public}s className: %{public}s adapterName: %{public}s ", + AUDIO_INFO_LOG("deviceType: %{public}s className: %{public}s adapterName: %{public}s", audioModuleInfo.deviceType.c_str(), audioModuleInfo.className.c_str(), audioModuleInfo.adapterName.c_str()); - AUDIO_INFO_LOG("OpenMicSpeaker: %{public}s networkId: %{public}s fileName: %{public}s ", + AUDIO_INFO_LOG("OpenMicSpeaker: %{public}s networkId: %{public}s fileName: %{public}s", audioModuleInfo.OpenMicSpeaker.c_str(), audioModuleInfo.networkId.c_str(), audioModuleInfo.fileName.c_str()); - AUDIO_INFO_LOG("fixedLatency: %{public}s sinkLatency: %{public}s renderInIdleState: %{public}s ", + AUDIO_INFO_LOG("fixedLatency: %{public}s sinkLatency: %{public}s renderInIdleState: %{public}s", audioModuleInfo.fixedLatency.c_str(), audioModuleInfo.sinkLatency.c_str(), audioModuleInfo.renderInIdleState.c_str()); - AUDIO_INFO_LOG("sceneName: %{public}s sourceType: %{public}s offloadEnable: %{public}s ", + AUDIO_INFO_LOG("sceneName: %{public}s sourceType: %{public}s offloadEnable: %{public}s", audioModuleInfo.sceneName.c_str(), audioModuleInfo.sourceType.c_str(), audioModuleInfo.offloadEnable.c_str()); diff --git a/services/audio_engine/node/src/hpae_offload_sinkoutput_node.cpp b/services/audio_engine/node/src/hpae_offload_sinkoutput_node.cpp index c6e3eac6da..6859c031ea 100644 --- a/services/audio_engine/node/src/hpae_offload_sinkoutput_node.cpp +++ b/services/audio_engine/node/src/hpae_offload_sinkoutput_node.cpp @@ -211,7 +211,7 @@ int32_t HpaeOffloadSinkOutputNode::RenderSinkInit(IAudioSinkAttr &attr) #ifdef ENABLE_HOOK_PCM timer.Stop(); int64_t interval = timer.Elapsed(); - AUDIO_INFO_LOG("HpaeOffloadSinkOutputNode: name %{public}s, RenderSinkInit Elapsed: %{public}" PRId64 " ms", + AUDIO_INFO_LOG("name %{public}s, RenderSinkInit Elapsed: %{public}" PRId64 " ms", sinkOutAttr_.adapterName.c_str(), interval); #endif return ret; @@ -232,7 +232,7 @@ int32_t HpaeOffloadSinkOutputNode::RenderSinkDeInit(void) #ifdef ENABLE_HOOK_PCM timer.Stop(); int64_t interval = timer.Elapsed(); - AUDIO_INFO_LOG("HpaeOffloadSinkOutputNode: name %{public}s, RenderSinkDeInit Elapsed: %{public}" PRId64 " ms", + AUDIO_INFO_LOG("name %{public}s, RenderSinkDeInit Elapsed: %{public}" PRId64 " ms", sinkOutAttr_.adapterName.c_str(), interval); #endif return SUCCESS; @@ -253,7 +253,7 @@ int32_t HpaeOffloadSinkOutputNode::RenderSinkFlush(void) #ifdef ENABLE_HOOK_PCM timer.Stop(); int64_t interval = timer.Elapsed(); - AUDIO_INFO_LOG("HpaeOffloadSinkOutputNode: name %{public}s, RenderSinkFlush Elapsed: %{public}" PRId64 " ms", + AUDIO_INFO_LOG("name %{public}s, RenderSinkFlush Elapsed: %{public}" PRId64 " ms", sinkOutAttr_.adapterName.c_str(), interval); #endif return ret; @@ -279,7 +279,7 @@ int32_t HpaeOffloadSinkOutputNode::RenderSinkStart(void) #ifdef ENABLE_HOOK_PCM timer.Stop(); int64_t interval = timer.Elapsed(); - AUDIO_INFO_LOG("HpaeOffloadSinkOutputNode: name %{public}s, RenderSinkStart Elapsed: %{public}" PRId64 " ms", + AUDIO_INFO_LOG("name %{public}s, RenderSinkStart Elapsed: %{public}" PRId64 " ms", sinkOutAttr_.adapterName.c_str(), interval); #endif SetSinkState(STREAM_MANAGER_RUNNING); @@ -304,7 +304,7 @@ int32_t HpaeOffloadSinkOutputNode::RenderSinkStop(void) #ifdef ENABLE_HOOK_PCM timer.Stop(); int64_t interval = timer.Elapsed(); - AUDIO_INFO_LOG("HpaeOffloadSinkOutputNode: name %{public}s, RenderSinkStop Elapsed: %{public}" PRId64 " ms", + AUDIO_INFO_LOG("name %{public}s, RenderSinkStop Elapsed: %{public}" PRId64 " ms", sinkOutAttr_.adapterName.c_str(), interval); #endif return SUCCESS; @@ -362,13 +362,13 @@ void HpaeOffloadSinkOutputNode::SetPolicyState(int32_t state) { if (setPolicyStateTask_.flag) { if (state == hdiPolicyState_) { - AUDIO_INFO_LOG("HpaeOffloadSinkOutputNode: unset policy state task"); + AUDIO_INFO_LOG("unset policy state task"); setPolicyStateTask_.flag = false; } return; } if (hdiPolicyState_ != state && state == OFFLOAD_INACTIVE_BACKGROUND) { - AUDIO_INFO_LOG("HpaeOffloadSinkOutputNode: set policy state task"); + AUDIO_INFO_LOG("set policy state task"); setPolicyStateTask_.flag = true; setPolicyStateTask_.time = std::chrono::high_resolution_clock::now(); setPolicyStateTask_.state = OFFLOAD_INACTIVE_BACKGROUND; @@ -388,14 +388,13 @@ int32_t HpaeOffloadSinkOutputNode::SetTimeoutStopThd(uint32_t timeoutThdMs) if (frameLenMs_ != 0) { timeoutThdFrames_ = timeoutThdMs / frameLenMs_; } - AUDIO_INFO_LOG( - "SetTimeoutStopThd: timeoutThdFrames_:%{public}u, timeoutThdMs :%{public}u", timeoutThdFrames_, timeoutThdMs); + AUDIO_INFO_LOG("timeoutThdFrames_:%{public}u, timeoutThdMs :%{public}u", timeoutThdFrames_, timeoutThdMs); return SUCCESS; } int32_t HpaeOffloadSinkOutputNode::SetOffloadRenderCallbackType(int32_t type) { - AUDIO_INFO_LOG("SetOffloadRenderCallbackType type:%{public}d", type); + AUDIO_INFO_LOG("type:%{public}d", type); OffloadCallback(static_cast(type)); return SUCCESS; } @@ -424,7 +423,7 @@ void HpaeOffloadSinkOutputNode::SetBufferSizeWhileRenderFrame() auto now = std::chrono::high_resolution_clock::now(); if (std::chrono::duration_cast(now - setPolicyStateTask_.time).count() >= POLICY_STATE_DELAY_IN_SEC) { - AUDIO_INFO_LOG("HpaeOffloadSinkOutputNode: excute set policy state task"); + AUDIO_INFO_LOG("excute set policy state task"); setPolicyStateTask_.flag = false; hdiPolicyState_ = setPolicyStateTask_.state; SetBufferSize(); @@ -434,7 +433,7 @@ void HpaeOffloadSinkOutputNode::SetBufferSizeWhileRenderFrame() // first start need to set buffer size 5 times if (setHdiBufferSizeNum_ > 0) { setHdiBufferSizeNum_--; - AUDIO_INFO_LOG("HpaeOffloadSinkOutputNode: set policy state cause first render"); + AUDIO_INFO_LOG("set policy state cause first render"); SetBufferSize(); } } @@ -464,17 +463,17 @@ int32_t HpaeOffloadSinkOutputNode::ProcessRenderFrame() timer.Start(); intervalTimer_.Stop(); int64_t interval = intervalTimer_.Elapsed(); - AUDIO_DEBUG_LOG("HpaeOffloadSinkOutputNode: name %{public}s, RenderFrame interval: %{public}" PRId64 " ms", + AUDIO_DEBUG_LOG("name %{public}s, RenderFrame interval: %{public}" PRId64 " ms", sinkOutAttr_.adapterName.c_str(), interval); #endif auto now = std::chrono::high_resolution_clock::now(); auto ret = audioRendererSink_->RenderFrame(*renderFrameData, renderFrameData_.size(), writeLen); if (ret == SUCCESS && writeLen == 0 && !firstWriteHdi_) { - AUDIO_INFO_LOG("HpaeOffloadSinkOutputNode: offload renderFrame full"); + AUDIO_INFO_LOG("offload renderFrame full"); return OFFLOAD_FULL; } if (!(ret == SUCCESS && writeLen == renderFrameData_.size())) { - AUDIO_ERR_LOG("HpaeOffloadSinkOutputNode: offload renderFrame failed, errCode is %{public}d", ret); + AUDIO_ERR_LOG("offload renderFrame failed, errCode is %{public}d", ret); return OFFLOAD_WRITE_FAILED; } // calc written data length @@ -499,7 +498,7 @@ int32_t HpaeOffloadSinkOutputNode::ProcessRenderFrame() } timer.Stop(); int64_t elapsed = timer.Elapsed(); - AUDIO_DEBUG_LOG("HpaeOffloadSinkOutputNode :name %{public}s, RenderFrame elapsed time: %{public}" PRId64 " ms", + AUDIO_DEBUG_LOG("name %{public}s, RenderFrame elapsed time: %{public}" PRId64 " ms", sinkOutAttr_.adapterName.c_str(), elapsed); intervalTimer_.Start(); #endif @@ -543,7 +542,7 @@ void HpaeOffloadSinkOutputNode::OffloadSetHdiVolume() float volumeEnd = AudioVolume::GetInstance()->GetVolume(GetSessionId(), volumeType, volumeDeviceClass, &volumes); float volumeBeg = AudioVolume::GetInstance()->GetHistoryVolume(GetSessionId()); if (fabs(volumeBeg - volumeEnd) > EPSILON) { - AUDIO_INFO_LOG("HpaeOffloadSinkOutputNode::sessionID:%{public}u, volumeBeg:%{public}f, volumeEnd:%{public}f", + AUDIO_INFO_LOG("sessionID:%{public}u, volumeBeg:%{public}f, volumeEnd:%{public}f", GetSessionId(), volumeBeg, volumeEnd); AudioVolume::GetInstance()->SetHistoryVolume(GetSessionId(), volumeEnd); AudioVolume::GetInstance()->Monitor(GetSessionId(), true); diff --git a/services/audio_engine/node/src/hpae_output_cluster.cpp b/services/audio_engine/node/src/hpae_output_cluster.cpp index 776cb9bd3b..3655e6114b 100644 --- a/services/audio_engine/node/src/hpae_output_cluster.cpp +++ b/services/audio_engine/node/src/hpae_output_cluster.cpp @@ -35,12 +35,11 @@ HpaeOutputCluster::HpaeOutputCluster(HpaeNodeInfo &nodeInfo) SetNodeName("HpaeOutputCluster"); #endif if (mixerNode_->SetupAudioLimiter() != SUCCESS) { - AUDIO_INFO_LOG("HpaeOutputCluster mixerNode SetupAudioLimiter failed!"); + AUDIO_INFO_LOG("mixerNode SetupAudioLimiter failed!"); } hpaeSinkOutputNode_->Connect(mixerNode_); frameLenMs_ = nodeInfo.frameLen * MILLISECOND_PER_SECOND / nodeInfo.samplingRate; - AUDIO_INFO_LOG( - "HpaeOutputCluster frameLenMs_:%{public}u ms, timeoutThdFrames_:%{public}u", frameLenMs_, timeoutThdFrames_); + AUDIO_INFO_LOG("frameLenMs_:%{public}u ms, timeoutThdFrames_:%{public}u", frameLenMs_, timeoutThdFrames_); } HpaeOutputCluster::~HpaeOutputCluster() @@ -76,7 +75,7 @@ void HpaeOutputCluster::DoProcess() if (timeoutStopCount_ > timeoutThdFramesForDevice_) { int32_t ret = hpaeSinkOutputNode_->RenderSinkStop(); timeoutStopCount_ = 0; - AUDIO_INFO_LOG("HpaeOutputCluster timeout RenderSinkStop ret :%{public}d", ret); + AUDIO_INFO_LOG("timeout RenderSinkStop ret :%{public}d", ret); } } @@ -106,8 +105,7 @@ void HpaeOutputCluster::Connect(const std::shared_ptrGetSharedInstance()->GetNodeInfo(); HpaeNodeInfo &curNodeInfo = GetNodeInfo(); HpaeProcessorType sceneType = preNodeInfo.sceneType; - AUDIO_INFO_LOG("HpaeOutputCluster input sceneType is %{public}u, " - "input:[%{public}u_%{public}u], output:[%{public}u_%{public}u], " + AUDIO_INFO_LOG("input sceneType is %{public}u, input:[%{public}u_%{public}u], output:[%{public}u_%{public}u], " "preNode name %{public}s, curNode name %{public}s, " "mixer id %{public}u, SinkOut id %{public}u", preNodeInfo.sceneType, preNodeInfo.samplingRate, preNodeInfo.channels, @@ -130,7 +128,7 @@ void HpaeOutputCluster::DisConnect(const std::shared_ptrGetSharedInstance()->GetNodeInfo(); HpaeProcessorType sceneType = preNodeInfo.sceneType; - AUDIO_INFO_LOG("HpaeOutputCluster input sceneType is %{public}u", preNodeInfo.sceneType); + AUDIO_INFO_LOG("input sceneType is %{public}u", preNodeInfo.sceneType); if (SafeGetMap(sceneConverterMap_, sceneType)) { sceneConverterMap_[sceneType]->DisConnect(preNode); mixerNode_->DisConnect(sceneConverterMap_[sceneType]); @@ -217,8 +215,7 @@ int32_t HpaeOutputCluster::SetTimeoutStopThd(uint32_t timeoutThdMs) timeoutThdFrames_ = timeoutThdMs / frameLenMs_; } timeoutThdFramesForDevice_ = timeoutThdFrames_; - AUDIO_INFO_LOG( - "SetTimeoutStopThd: timeoutThdFrames_:%{public}u, timeoutThdMs :%{public}u", timeoutThdFrames_, timeoutThdMs); + AUDIO_INFO_LOG("timeoutThdFrames_:%{public}u, timeoutThdMs :%{public}u", timeoutThdFrames_, timeoutThdMs); return SUCCESS; } diff --git a/services/audio_engine/node/src/hpae_process_cluster.cpp b/services/audio_engine/node/src/hpae_process_cluster.cpp index 2f7fdb202a..4b40ce1d93 100644 --- a/services/audio_engine/node/src/hpae_process_cluster.cpp +++ b/services/audio_engine/node/src/hpae_process_cluster.cpp @@ -63,7 +63,7 @@ HpaeProcessCluster::HpaeProcessCluster(HpaeNodeInfo nodeInfo, HpaeSinkInfo &sink HpaeProcessCluster::~HpaeProcessCluster() { - AUDIO_INFO_LOG("process cluster destroyed, processor scene type is %{public}d", GetSceneType()); + AUDIO_INFO_LOG("destroyed, scene type is %{public}d", GetSceneType()); Reset(); #ifdef ENABLE_HIDUMP_DFX AUDIO_INFO_LOG("NodeId: %{public}u NodeName: %{public}s destructed.", @@ -104,14 +104,10 @@ bool HpaeProcessCluster::ResetAll() std::shared_ptr HpaeProcessCluster::GetSharedInstance() { if (renderEffectNode_ != nullptr) { - AUDIO_INFO_LOG("HpaeProcessCluster, GetSharedInstance renderEffectNode_ name %{public}s id: %{public}u ", - renderEffectNode_->GetNodeName().c_str(), - renderEffectNode_->GetNodeId()); + AUDIO_INFO_LOG("renderEffectNode_id: %{public}u", renderEffectNode_->GetNodeId()); return renderEffectNode_; } - AUDIO_INFO_LOG("HpaeProcessCluster, GetSharedInstance mixerNode_ name %{public}s id: %{public}u ", - mixerNode_->GetNodeName().c_str(), - mixerNode_->GetNodeId()); + AUDIO_INFO_LOG("mixerNode_ id: %{public}u", mixerNode_->GetNodeId()); return mixerNode_; } @@ -184,9 +180,9 @@ void HpaeProcessCluster::Connect(const std::shared_ptrGetNodeInfo(); uint32_t sessionId = preNodeInfo.sessionId; - AUDIO_INFO_LOG("HpaeProcessCluster sessionId is %{public}u, streamType is %{public}d, sceneType is %{public}d, " - "HpaeProcessCluster rate is %{public}u, ch is %{public}u, " - "HpaeProcessCluster preNodeId %{public}u, preNodeName is %{public}s", + AUDIO_INFO_LOG("HsessionId is %{public}u, streamType is %{public}d, sceneType is %{public}d, " + "rate is %{public}u, ch is %{public}u, " + "preNodeId %{public}u, preNodeName is %{public}s", preNodeInfo.sessionId, preNodeInfo.streamType, preNodeInfo.sceneType, preNodeInfo.customSampleRate == 0 ? preNodeInfo.samplingRate : preNodeInfo.customSampleRate, preNodeInfo.channels, preNodeInfo.nodeId, preNodeInfo.nodeName.c_str()); @@ -211,7 +207,7 @@ void HpaeProcessCluster::DisConnect(const std::shared_ptrGetNodeInfo().sessionId; AUDIO_INFO_LOG( - "Process DisConnect sessionId is %{public}u, streamType is %{public}d, sceneType is %{public}d", + "sessionId is %{public}u, streamType is %{public}d, sceneType is %{public}d", sessionId, preNode->GetNodeInfo().streamType, preNode->GetNodeInfo().sceneType); if (SafeGetMap(idConverterMap_, sessionId)) { idConverterMap_[sessionId]->DisConnect(preNode); @@ -221,7 +217,7 @@ void HpaeProcessCluster::DisConnect(const std::shared_ptrGetPreOutNum()); + AUDIO_INFO_LOG("Exist converterNode preOutNum is %{public}zu", mixerNode_->GetPreOutNum()); } if (mixerNode_->GetPreOutNum() == 0) { mixerNode_->EnableProcess(false); @@ -242,7 +238,7 @@ void HpaeProcessCluster::InitEffectBuffer(const uint32_t sessionId) { CHECK_AND_RETURN_LOG(renderEffectNode_ != nullptr, "renderEffectNode is nullptr"); renderEffectNode_->InitEffectBuffer(sessionId); - AUDIO_INFO_LOG("begin InitEffectBuffer sessionId: %{public}u", sessionId); + AUDIO_INFO_LOG("begin sessionId: %{public}u", sessionId); } int32_t HpaeProcessCluster::GetNodeInputFormatInfo(uint32_t sessionId, AudioBasicFormat &basicFormat) diff --git a/services/audio_engine/node/src/hpae_remote_output_cluster.cpp b/services/audio_engine/node/src/hpae_remote_output_cluster.cpp index be2b094d95..f65c3922ab 100644 --- a/services/audio_engine/node/src/hpae_remote_output_cluster.cpp +++ b/services/audio_engine/node/src/hpae_remote_output_cluster.cpp @@ -32,8 +32,7 @@ HpaeRemoteOutputCluster::HpaeRemoteOutputCluster(HpaeNodeInfo &nodeInfo, HpaeSin : HpaeNode(nodeInfo), hpaeSinkOutputNode_(std::make_shared(nodeInfo, sinkInfo)) { frameLenMs_ = nodeInfo.frameLen * MILLISECOND_PER_SECOND / nodeInfo.samplingRate; - AUDIO_INFO_LOG("HpaeRemoteOutputCluster frameLenMs_:%{public}u ms," - "timeoutThdFrames_:%{public}u", frameLenMs_, timeoutThdFrames_); + AUDIO_INFO_LOG("frameLenMs_:%{public}u ms, timeoutThdFrames_:%{public}u", frameLenMs_, timeoutThdFrames_); #ifdef ENABLE_HIDUMP_DFX SetNodeName("HpaeRemoteOutputCluster"); #endif @@ -69,7 +68,7 @@ void HpaeRemoteOutputCluster::DoProcess() } if (hpaeSinkOutputNode_->GetPreOutNum() == 0) { int32_t ret = hpaeSinkOutputNode_->RenderSinkStop(); - AUDIO_INFO_LOG("HpaeRemoteOutputCluster timeout RenderSinkStop ret :%{public}d", ret); + AUDIO_INFO_LOG("timeout RenderSinkStop ret :%{public}d", ret); } } @@ -100,12 +99,9 @@ void HpaeRemoteOutputCluster::Connect(const std::shared_ptrGetSharedInstance()->GetNodeInfo(); HpaeNodeInfo nodeInfo = GetNodeInfo(); HpaeProcessorType sceneType = preNodeInfo.sceneType; - AUDIO_INFO_LOG("HpaeRemoteOutputCluster input sceneType is %{public}u", sceneType); - AUDIO_INFO_LOG("HpaeRemoteOutputCluster input rate is %{public}u, ch is %{public}u", - preNodeInfo.samplingRate, preNodeInfo.channels); - AUDIO_INFO_LOG(" HpaeRemoteOutputCluster output rate is %{public}u, ch is %{public}u", - nodeInfo.samplingRate, nodeInfo.channels); - AUDIO_INFO_LOG(" HpaeRemoteOutputCluster preNode name %{public}s, curNode name is %{public}s", + AUDIO_INFO_LOG("input sceneType is %{public}u input rate is %{public}u, ch is %{public}u" + "output rate is %{public}u, ch is %{public}u preNode name %{public}s, curNode name is %{public}s", + sceneType, preNodeInfo.samplingRate, preNodeInfo.channels, nodeInfo.samplingRate, nodeInfo.channels preNodeInfo.nodeName.c_str(), nodeInfo.nodeName.c_str()); nodeInfo.sceneType = sceneType; nodeInfo.streamType = preNodeInfo.streamType; @@ -135,7 +131,7 @@ void HpaeRemoteOutputCluster::UpdateStreamInfo(const std::shared_ptrGetNodeInfo(); tmpNodeInfo.streamType = preNodeInfo.streamType; sceneConverterMap_[sceneType]->SetNodeInfo(tmpNodeInfo); - AUDIO_INFO_LOG("update stream info %{public}d type %{public}d", + AUDIO_INFO_LOG("%{public}d type %{public}d", sceneMixerMap_[sceneType]->GetNodeInfo().nodeId, sceneMixerMap_[sceneType]->GetNodeInfo().streamType); } @@ -144,7 +140,7 @@ void HpaeRemoteOutputCluster::DisConnect(const std::shared_ptrGetSharedInstance()->GetNodeInfo(); HpaeProcessorType sceneType = preNodeInfo.sceneType; - AUDIO_INFO_LOG("HpaeRemoteOutputCluster input sceneType is %{public}u", preNodeInfo.sceneType); + AUDIO_INFO_LOG("input sceneType is %{public}u", preNodeInfo.sceneType); if (SafeGetMap(sceneConverterMap_, sceneType)) { sceneConverterMap_[sceneType]->DisConnect(preNode); sceneMixerMap_[sceneType]->DisConnect(sceneConverterMap_[sceneType]); @@ -223,8 +219,7 @@ int32_t HpaeRemoteOutputCluster::SetTimeoutStopThd(uint32_t timeoutThdMs) if (frameLenMs_ != 0) { timeoutThdFrames_ = timeoutThdMs / frameLenMs_; } - AUDIO_INFO_LOG( - "SetTimeoutStopThd: timeoutThdFrames_:%{public}u, timeoutThdMs :%{public}u", timeoutThdFrames_, timeoutThdMs); + AUDIO_INFO_LOG("timeoutThdFrames_:%{public}u, timeoutThdMs :%{public}u", timeoutThdFrames_, timeoutThdMs); return SUCCESS; } diff --git a/services/audio_engine/node/src/hpae_remote_sink_output_node.cpp b/services/audio_engine/node/src/hpae_remote_sink_output_node.cpp index 8c6f8be7cd..a950df767d 100644 --- a/services/audio_engine/node/src/hpae_remote_sink_output_node.cpp +++ b/services/audio_engine/node/src/hpae_remote_sink_output_node.cpp @@ -45,7 +45,7 @@ HpaeRemoteSinkOutputNode::HpaeRemoteSinkOutputNode(HpaeNodeInfo &nodeInfo, HpaeS outputCommunicationPcmDumper_ = std::make_unique("HpaeRemoteSinkOutputNode_Out_Communication_bit_" + std::to_string(GetBitWidth()) + "_ch_" + std::to_string(GetChannelCount()) + "_rate_" + std::to_string(GetSampleRate()) + ".pcm"); - AUDIO_INFO_LOG("HpaeRemoteSinkOutputNode name is %{public}s", sinkOutAttr_.adapterName.c_str()); + AUDIO_INFO_LOG("name is %{public}s", sinkOutAttr_.adapterName.c_str()); #endif #ifdef ENABLE_HIDUMP_DFX SetNodeName("hpaeRemoteSinkOutputNode"); @@ -147,7 +147,7 @@ void HpaeRemoteSinkOutputNode::DoProcess() auto ret = audioRendererSink_->SplitRenderFrame(*renderFrameData, renderFrameData_.size(), writeLen, std::to_string(static_cast(splitStreamType)).c_str()); if (ret != SUCCESS || writeLen != renderFrameData_.size()) { - AUDIO_ERR_LOG("HpaeRemoteSinkOutputNode: RenderFrame failed, SplitStreamType %{public}d", splitStreamType); + AUDIO_ERR_LOG("RenderFrame failed, SplitStreamType %{public}d", splitStreamType); } } HandleRemoteTiming(); // used to control remote RenderFrame tempo. @@ -245,11 +245,8 @@ int32_t HpaeRemoteSinkOutputNode::RenderSinkInit(IAudioSinkAttr &attr) #ifdef ENABLE_HOOK_PCM timer.Stop(); int64_t interval = timer.Elapsed(); - AUDIO_INFO_LOG("HpaeRemoteSinkOutputNode: name %{public}s, RenderSinkInit Elapsed: %{public}" PRId64 - " ms ret: %{public}d", - sinkOutAttr_.adapterName.c_str(), - interval, - ret); + AUDIO_INFO_LOG("name %{public}s, RenderSinkInit Elapsed: %{public}" PRId64 " ms ret: %{public}d", + sinkOutAttr_.adapterName.c_str(), interval, ret); std::string adapterName = sinkOutAttr_.adapterName; outputMediaPcmDumper_ = std::make_unique( "HpaeRemoteSinkOutputNode_Media_" + adapterName + "_bit_" + std::to_string(GetBitWidth()) + "_ch_" + @@ -280,9 +277,7 @@ int32_t HpaeRemoteSinkOutputNode::RenderSinkDeInit(void) #ifdef ENABLE_HOOK_PCM timer.Stop(); int64_t interval = timer.Elapsed(); - AUDIO_INFO_LOG("HpaeRemoteSinkOutputNode: name %{public}s, RenderSinkDeInit Elapsed: %{public}" PRId64 " ms", - sinkOutAttr_.adapterName.c_str(), - interval); + AUDIO_INFO_LOG("name %{public}s, Elapsed: %{public}" PRId64 " ms", sinkOutAttr_.adapterName.c_str(), interval); #endif return SUCCESS; } @@ -344,9 +339,7 @@ int32_t HpaeRemoteSinkOutputNode::RenderSinkStart(void) #ifdef ENABLE_HOOK_PCM timer.Stop(); int64_t interval = timer.Elapsed(); - AUDIO_INFO_LOG("HpaeRemoteSinkOutputNode: name %{public}s, RenderSinkStart Elapsed: %{public}" PRId64 " ms", - sinkOutAttr_.adapterName.c_str(), - interval); + AUDIO_INFO_LOG("name %{public}s, Elapsed: %{public}" PRId64 " ms", sinkOutAttr_.adapterName.c_str(), interval); #endif SetSinkState(STREAM_MANAGER_RUNNING); remoteTimePoint_ = std::chrono::high_resolution_clock::now(); @@ -371,8 +364,7 @@ int32_t HpaeRemoteSinkOutputNode::RenderSinkStop(void) #ifdef ENABLE_HOOK_PCM timer.Stop(); int64_t interval = timer.Elapsed(); - AUDIO_INFO_LOG("HpaeRemoteSinkOutputNode: name %{public}s, RenderSinkStop Elapsed: %{public}" PRId64 " ms", - sinkOutAttr_.adapterName.c_str(), interval); + AUDIO_INFO_LOG("name %{public}s, Elapsed: %{public}" PRId64 " ms", sinkOutAttr_.adapterName.c_str(), interval); #endif return SUCCESS; } diff --git a/services/audio_engine/node/src/hpae_render_effect_node.cpp b/services/audio_engine/node/src/hpae_render_effect_node.cpp index 45b144f9d9..72367bfc55 100644 --- a/services/audio_engine/node/src/hpae_render_effect_node.cpp +++ b/services/audio_engine/node/src/hpae_render_effect_node.cpp @@ -60,7 +60,7 @@ HpaeRenderEffectNode::HpaeRenderEffectNode(HpaeNodeInfo &nodeInfo) : HpaeNode(no collaborativeOutput_ = std::make_unique(pcmBufferInfo); } } - AUDIO_INFO_LOG("render effect node created, scene type: %{public}s", sceneType_.c_str()); + AUDIO_INFO_LOG("created, scene type: %{public}s", sceneType_.c_str()); #ifdef ENABLE_HOOK_PCM if (sceneType_ == "SCENE_COLLABORATIVE") { directPcmDumper_ = std::make_unique( @@ -132,7 +132,7 @@ HpaePcmBuffer *HpaeRenderEffectNode::SignalProcess(const std::vectorGetSampleRate()) + "]_"; @@ -187,46 +187,46 @@ int32_t HpaeRenderEffectNode::SplitCollaborativeData() int32_t HpaeRenderEffectNode::AudioRendererCreate(HpaeNodeInfo &nodeInfo) { - AUDIO_INFO_LOG("notify audio effect when audio renderer create in"); + AUDIO_INFO_LOG("in"); int32_t ret = CreateAudioEffectChain(nodeInfo); if (ret != 0) { - AUDIO_WARNING_LOG("create audio effect chain failed, ret: %{public}d", ret); + AUDIO_WARNING_LOG("failed, ret: %{public}d", ret); } - AUDIO_INFO_LOG("notify audio effect when audio renderer create out"); + AUDIO_INFO_LOG("out"); return SUCCESS; } int32_t HpaeRenderEffectNode::AudioRendererStart(HpaeNodeInfo &nodeInfo) { - AUDIO_INFO_LOG("notify audio effect when audio renderer start in"); + AUDIO_INFO_LOG("in"); ModifyAudioEffectChainInfo(nodeInfo, ADD_AUDIO_EFFECT_CHAIN_INFO); - AUDIO_INFO_LOG("notify audio effect when audio renderer start out"); + AUDIO_INFO_LOG("out"); return SUCCESS; } int32_t HpaeRenderEffectNode::AudioRendererStop(HpaeNodeInfo &nodeInfo) { - AUDIO_INFO_LOG("notify audio effect when audio renderer stop in"); + AUDIO_INFO_LOG("in"); ModifyAudioEffectChainInfo(nodeInfo, REMOVE_AUDIO_EFFECT_CHAIN_INFO); - AUDIO_INFO_LOG("notify audio effect when audio renderer stop out"); + AUDIO_INFO_LOG("out"); return SUCCESS; } int32_t HpaeRenderEffectNode::AudioRendererRelease(HpaeNodeInfo &nodeInfo) { - AUDIO_INFO_LOG("notify audio effect when audio renderer release in"); + AUDIO_INFO_LOG("in"); int32_t ret = ReleaseAudioEffectChain(nodeInfo); if (ret != 0) { - AUDIO_WARNING_LOG("release audio effect chain failed, ret: %{public}d", ret); + AUDIO_WARNING_LOG("failed, ret: %{public}d", ret); } ModifyAudioEffectChainInfo(nodeInfo, REMOVE_AUDIO_EFFECT_CHAIN_INFO); - AUDIO_INFO_LOG("notify audio effect when audio renderer release out"); + AUDIO_INFO_LOG("out"); return SUCCESS; } int32_t HpaeRenderEffectNode::CreateAudioEffectChain(HpaeNodeInfo &nodeInfo) { - AUDIO_INFO_LOG("Create Audio Effect Chain In, sessionID is %{public}u, sceneType is %{public}d", + AUDIO_INFO_LOG("sessionID is %{public}u, sceneType is %{public}d", nodeInfo.sessionId, nodeInfo.effectInfo.effectScene); // todo: deal with remote case // todo: if boot music, do not create audio effect @@ -249,14 +249,14 @@ int32_t HpaeRenderEffectNode::CreateAudioEffectChain(HpaeNodeInfo &nodeInfo) } int32_t ret = audioEffectChainManager->CreateAudioEffectChainDynamic(sceneType); CHECK_AND_RETURN_RET_LOG(ret == SUCCESS, ERROR, "create effect chain fail"); - AUDIO_INFO_LOG("Create Audio Effect Chain Success, sessionID is %{public}u, sceneType is %{public}d", + AUDIO_INFO_LOG("Success, sessionID is %{public}u, sceneType is %{public}d", nodeInfo.sessionId, nodeInfo.effectInfo.effectScene); return SUCCESS; } int32_t HpaeRenderEffectNode::ReleaseAudioEffectChain(HpaeNodeInfo &nodeInfo) { - AUDIO_INFO_LOG("Release Audio Effect Chain In, sessionID is %{public}u, sceneType is %{public}d", + AUDIO_INFO_LOG("sessionID is %{public}u, sceneType is %{public}d", nodeInfo.sessionId, nodeInfo.effectInfo.effectScene); // todo: deal with remote case // todo: if boot music, do not release audio effect @@ -279,7 +279,7 @@ int32_t HpaeRenderEffectNode::ReleaseAudioEffectChain(HpaeNodeInfo &nodeInfo) } int32_t ret = audioEffectChainManager->ReleaseAudioEffectChainDynamic(sceneType); CHECK_AND_RETURN_RET_LOG(ret == SUCCESS, ERROR, "release effect chain fail"); - AUDIO_INFO_LOG("Release Audio Effect Chain Success, sessionID is %{public}u, sceneType is %{public}d", + AUDIO_INFO_LOG("Success, sessionID is %{public}u, sceneType is %{public}d", nodeInfo.sessionId, nodeInfo.effectInfo.effectScene); return SUCCESS; } @@ -428,7 +428,7 @@ void HpaeRenderEffectNode::InitEffectBufferFromDisConnect() AudioEffectChainManager *audioEffectChainManager = AudioEffectChainManager::GetInstance(); CHECK_AND_RETURN_LOG(audioEffectChainManager != nullptr, "null audioEffectChainManager"); audioEffectChainManager->InitAudioEffectChainDynamic(sceneType_); - AUDIO_INFO_LOG("begin InitEffectBuffer from DisConnect, sceneType:%{public}s", sceneType_.c_str()); + AUDIO_INFO_LOG("sceneType:%{public}s", sceneType_.c_str()); } } // namespace HPAE } // namespace AudioStandard diff --git a/services/audio_engine/node/src/hpae_resample_node.cpp b/services/audio_engine/node/src/hpae_resample_node.cpp index 067c5b8ec6..4036a79cb9 100644 --- a/services/audio_engine/node/src/hpae_resample_node.cpp +++ b/services/audio_engine/node/src/hpae_resample_node.cpp @@ -89,7 +89,7 @@ HpaePcmBuffer *HpaeResampleNode::SignalProcess(const std::vector(pcmInfo); - AUDIO_INFO_LOG("HpaeSinkInputNode::historybuffer created"); + AUDIO_INFO_LOG("historybuffer created"); } else { historyBuffer_ = nullptr; } @@ -86,7 +86,7 @@ void HpaeSinkInputNode::CheckAndDestroyHistoryBuffer() // historyBuffer_ has no data, check if historyFrameCount is 0 and destroy it if (nodeInfo.historyFrameCount == 0) { if (historyBuffer_) { - AUDIO_INFO_LOG("HpaeSinkInputNode::historyBuffer_ useless, destroy it"); + AUDIO_INFO_LOG("historyBuffer_ useless, destroy it"); } historyBuffer_ = nullptr; } else if (historyBuffer_ == nullptr) { // this case need to create historyBuffer_ @@ -95,7 +95,7 @@ void HpaeSinkInputNode::CheckAndDestroyHistoryBuffer() nodeInfo.customSampleRate, nodeInfo.channelLayout, nodeInfo.historyFrameCount}; pcmInfo.isMultiFrames = true; historyBuffer_ = std::make_unique(pcmInfo); - AUDIO_INFO_LOG("HpaeSinkInputNode::historybuffer created"); + AUDIO_INFO_LOG("historybuffer created"); } } @@ -267,7 +267,7 @@ void HpaeSinkInputNode::RewindHistoryBuffer(uint64_t rewindTime, uint64_t hdiFra { CHECK_AND_RETURN_LOG(historyBuffer_, "historyBuffer_ is nullptr"); hdiFramePosition_.store(hdiFramePosition); - AUDIO_INFO_LOG("HpaeSinkInputNode::rewind %{public}zu frames", ConvertUsToFrameCount(rewindTime, GetNodeInfo())); + AUDIO_INFO_LOG("rewind %{public}zu frames", ConvertUsToFrameCount(rewindTime, GetNodeInfo())); historyBuffer_->RewindBuffer(ConvertUsToFrameCount(rewindTime, GetNodeInfo())); OnStreamInfoChange(false); } diff --git a/services/audio_engine/node/src/hpae_sink_output_node.cpp b/services/audio_engine/node/src/hpae_sink_output_node.cpp index ec62eee05e..f4d69ef01b 100644 --- a/services/audio_engine/node/src/hpae_sink_output_node.cpp +++ b/services/audio_engine/node/src/hpae_sink_output_node.cpp @@ -41,7 +41,7 @@ HpaeSinkOutputNode::HpaeSinkOutputNode(HpaeNodeInfo &nodeInfo) renderFrameData_(nodeInfo.frameLen * nodeInfo.channels * GetSizeFromFormat(nodeInfo.format)), interleveData_(nodeInfo.frameLen * nodeInfo.channels) { - AUDIO_INFO_LOG("HpaeSinkOutputNode name is %{public}s", sinkOutAttr_.adapterName.c_str()); + AUDIO_INFO_LOG("name is %{public}s", sinkOutAttr_.adapterName.c_str()); #ifdef ENABLE_HIDUMP_DFX SetNodeName("hpaeSinkOutputNode"); if (auto callback = GetNodeStatusCallback().lock()) { @@ -98,7 +98,7 @@ void HpaeSinkOutputNode::DoProcess() renderFrameTimes_ += MS_PER_FRAME; auto ret = audioRendererSink_->RenderFrame(*renderFrameData, renderFrameData_.size(), writeLen); if (ret != SUCCESS || writeLen != renderFrameData_.size()) { - AUDIO_ERR_LOG("HpaeSinkOutputNode: RenderFrame failed"); + AUDIO_ERR_LOG("RenderFrame failed"); if (GetDeviceClass() != "remote") { periodTimer_.Stop(); uint64_t usedTimeUs = static_cast(periodTimer_.Elapsed()); @@ -110,7 +110,7 @@ void HpaeSinkOutputNode::DoProcess() #ifdef ENABLE_HOOK_PCM timer.Stop(); int64_t elapsed = timer.Elapsed(); - AUDIO_DEBUG_LOG("HpaeSinkOutputNode :name %{public}s, RenderFrame elapsed time: %{public}" PRId64 " ms", + AUDIO_DEBUG_LOG("name %{public}s, RenderFrame elapsed time: %{public}" PRId64 " ms", sinkOutAttr_.adapterName.c_str(), elapsed); intervalTimer_.Start(); @@ -214,11 +214,8 @@ int32_t HpaeSinkOutputNode::RenderSinkInit(IAudioSinkAttr &attr) #ifdef ENABLE_HOOK_PCM timer.Stop(); int64_t interval = timer.Elapsed(); - AUDIO_INFO_LOG("HpaeSinkOutputNode: name %{public}s, RenderSinkInit Elapsed: %{public}" PRId64 - " ms ret: %{public}d", - sinkOutAttr_.adapterName.c_str(), - interval, - ret); + AUDIO_INFO_LOG("name %{public}s, RenderSinkInit Elapsed: %{public}" PRId64 " ms ret: %{public}d", + sinkOutAttr_.adapterName.c_str(), interval, ret); std::string adapterName = sinkOutAttr_.adapterName; #endif return ret; @@ -238,7 +235,7 @@ int32_t HpaeSinkOutputNode::RenderSinkDeInit(void) #ifdef ENABLE_HOOK_PCM timer.Stop(); int64_t interval = timer.Elapsed(); - AUDIO_INFO_LOG("HpaeSinkOutputNode: name %{public}s, RenderSinkDeInit Elapsed: %{public}" PRId64 " ms", + AUDIO_INFO_LOG("name %{public}s, RenderSinkDeInit Elapsed: %{public}" PRId64 " ms", sinkOutAttr_.adapterName.c_str(), interval); #endif @@ -288,7 +285,7 @@ int32_t HpaeSinkOutputNode::RenderSinkStart(void) #ifdef ENABLE_HOOK_PCM timer.Stop(); int64_t interval = timer.Elapsed(); - AUDIO_INFO_LOG("HpaeSinkOutputNode: name %{public}s, RenderSinkStart Elapsed: %{public}" PRId64 " ms", + AUDIO_INFO_LOG("name %{public}s, RenderSinkStart Elapsed: %{public}" PRId64 " ms", sinkOutAttr_.adapterName.c_str(), interval); #endif @@ -322,7 +319,7 @@ int32_t HpaeSinkOutputNode::RenderSinkStop(void) #ifdef ENABLE_HOOK_PCM timer.Stop(); int64_t interval = timer.Elapsed(); - AUDIO_INFO_LOG("HpaeSinkOutputNode: name %{public}s, RenderSinkStop Elapsed: %{public}" PRId64 " ms", + AUDIO_INFO_LOG("name %{public}s, RenderSinkStop Elapsed: %{public}" PRId64 " ms", sinkOutAttr_.adapterName.c_str(), interval); #endif return SUCCESS; diff --git a/services/audio_engine/node/src/hpae_source_input_cluster.cpp b/services/audio_engine/node/src/hpae_source_input_cluster.cpp index a623538adf..f33fb08737 100644 --- a/services/audio_engine/node/src/hpae_source_input_cluster.cpp +++ b/services/audio_engine/node/src/hpae_source_input_cluster.cpp @@ -124,7 +124,7 @@ OutputPort *HpaeSourceInputCluster::GetOutputPort(HpaeNodeInfo } CHECK_AND_RETURN_RET_LOG(SafeGetMap(fmtConverterNodeMap_, preNodeKey), sourceInputNode_->GetOutputPort(nodeInfo), - "HpaeSourceProcessCluster not find the preNodeKey = %{public}s", preNodeKey.c_str()); + "not find the preNodeKey = %{public}s", preNodeKey.c_str()); if (isDisConnect && fmtConverterNodeMap_[preNodeKey]->GetOutputPortNum() <= 1) { AUDIO_INFO_LOG("disconnect fmtConverterNode between preNode[%{public}s] and sourceInputNode[%{public}s]", preNodeKey.c_str(), inputNodeKey.c_str()); diff --git a/services/audio_engine/node/src/hpae_source_input_node.cpp b/services/audio_engine/node/src/hpae_source_input_node.cpp index 5b355bd6e8..9a89993891 100644 --- a/services/audio_engine/node/src/hpae_source_input_node.cpp +++ b/services/audio_engine/node/src/hpae_source_input_node.cpp @@ -471,7 +471,7 @@ int32_t HpaeSourceInputNode::CapturerSourceStop(void) Trace trace("HpaeSourceInputNode::CapturerSourceStop"); SetSourceState(STREAM_MANAGER_SUSPENDED); if (audioCapturerSource_->Stop() != SUCCESS) { - AUDIO_ERR_LOG("CapturerSourceStop error, sourceInputNode[%{public}u]", sourceInputNodeType_); + AUDIO_ERR_LOG("error, sourceInputNode[%{public}u]", sourceInputNodeType_); } return SUCCESS; } diff --git a/services/audio_engine/node/src/hpae_source_output_node.cpp b/services/audio_engine/node/src/hpae_source_output_node.cpp index e1348d7404..df09ef3bcd 100644 --- a/services/audio_engine/node/src/hpae_source_output_node.cpp +++ b/services/audio_engine/node/src/hpae_source_output_node.cpp @@ -173,7 +173,7 @@ void HpaeSourceOutputNode::DisConnectWithInfo(const std::shared_ptrGetOutputPort(nodeInfo)), - "HpaeSourceOutputNode[%{public}u] has disconnected with preNode", GetSessionId()); + "%{public}u has disconnected with preNode", GetSessionId()); inputStream_.DisConnect(preNode->GetOutputPort(nodeInfo, true)); #ifdef ENABLE_HIDUMP_DFX if (auto callback = GetNodeStatusCallback().lock()) { diff --git a/services/audio_engine/node/src/hpae_source_process_cluster.cpp b/services/audio_engine/node/src/hpae_source_process_cluster.cpp index fa06e9ecb0..25e27def89 100644 --- a/services/audio_engine/node/src/hpae_source_process_cluster.cpp +++ b/services/audio_engine/node/src/hpae_source_process_cluster.cpp @@ -31,7 +31,7 @@ HpaeSourceProcessCluster::HpaeSourceProcessCluster(HpaeNodeInfo& nodeInfo) #ifdef ENABLE_HIDUMP_DFX SetNodeName("HpaeSourceProcessCluster"); #endif - AUDIO_INFO_LOG("Create scene ProcessCluster, sceneType = %{public}u", nodeInfo.sceneType); + AUDIO_INFO_LOG("sceneType = %{public}u", nodeInfo.sceneType); } HpaeSourceProcessCluster::~HpaeSourceProcessCluster() @@ -106,7 +106,7 @@ OutputPort *HpaeSourceProcessCluster::GetOutputPort(HpaeNodeInf } CHECK_AND_RETURN_RET_LOG(SafeGetMap(fmtConverterNodeMap_, sourceOutputNodeKey), captureEffectNode_->GetOutputPort(), - "HpaeSourceProcessCluster not find the sourceOutputNodeKey = %{public}s", sourceOutputNodeKey.c_str()); + "not find the sourceOutputNodeKey = %{public}s", sourceOutputNodeKey.c_str()); if (isDisConnect && fmtConverterNodeMap_[sourceOutputNodeKey]->GetOutputPortNum() <= 1) { // disconnect fmtConverterNode->upEffectNode AUDIO_INFO_LOG("disconnect fmtConverterNode between effectnode[[%{public}s] and sourceoutputnode[%{public}s]", diff --git a/services/audio_engine/plugin/resample/proresampler/audio_proresampler.cpp b/services/audio_engine/plugin/resample/proresampler/audio_proresampler.cpp index e523bc0e78..bc4a4bb09d 100644 --- a/services/audio_engine/plugin/resample/proresampler/audio_proresampler.cpp +++ b/services/audio_engine/plugin/resample/proresampler/audio_proresampler.cpp @@ -40,12 +40,12 @@ ProResampler::ProResampler(uint32_t inRate, uint32_t outRate, uint32_t channels, { if (inRate_ == SAMPLE_RATE_11025) { // for 11025, process input 40ms per time and output 20ms per time buf11025_.reserve(expectedOutFrameLen_ * channels_ * BUFFER_EXPAND_SIZE_2 + ADD_SIZE); - AUDIO_INFO_LOG("Proresampler input 11025hz, output resample rate %{public}d, buf11025_ size %{public}d", + AUDIO_INFO_LOG("input 11025hz, output resample rate %{public}d, buf11025_ size %{public}d", outRate_, expectedOutFrameLen_ * channels_ * BUFFER_EXPAND_SIZE_2 + ADD_SIZE); expectedInFrameLen_ = inRate_ * FRAME_LEN_20MS * BUFFER_EXPAND_SIZE_2 / MS_PER_SECOND; } else if (inRate_ % CUSTOM_SAMPLE_RATE_MULTIPLES != 0) { // not multiples of 50 bufFor100ms_.reserve(expectedOutFrameLen_ * channels_ * BUFFER_EXPAND_SIZE_5 + ADD_SIZE); - AUDIO_INFO_LOG("Proresampler input %{public}u, output resample rate %{public}d, bufFor100ms_ size %{public}d", + AUDIO_INFO_LOG("input %{public}u, output resample rate %{public}d, bufFor100ms_ size %{public}d", inRate_, outRate_, expectedOutFrameLen_ * channels_ * BUFFER_EXPAND_SIZE_5 + ADD_SIZE); expectedInFrameLen_ = inRate_ * FRAME_LEN_20MS * BUFFER_EXPAND_SIZE_5 / MS_PER_SECOND; } else { @@ -53,11 +53,11 @@ ProResampler::ProResampler(uint32_t inRate, uint32_t outRate, uint32_t channels, } int32_t errRet; state_ = SingleStagePolyphaseResamplerInit(channels_, inRate_, outRate_, quality_, &errRet); - CHECK_AND_RETURN_LOG(state_, "Proresampler: Init failed! failed with error %{public}s.", + CHECK_AND_RETURN_LOG(state_, "Init failed! failed with error %{public}s.", ErrCodeToString(errRet).c_str()); SingleStagePolyphaseResamplerSkipHalfTaps(state_); - AUDIO_INFO_LOG("Proresampler: Init success inRate: %{public}d, outRate: %{public}d, channels: %{public}d, " + AUDIO_INFO_LOG("Init success inRate: %{public}d, outRate: %{public}d, channels: %{public}d, " "quality: %{public}d.", inRate_, outRate_, channels_, quality_); } @@ -65,7 +65,7 @@ int32_t ProResampler::Process(const float *inBuffer, uint32_t inFrameSize, float uint32_t outFrameSize) { CHECK_AND_RETURN_RET_LOG(state_ != nullptr, RESAMPLER_ERR_ALLOC_FAILED, - "ProResampler Process: resampler is %{public}s", ErrCodeToString(RESAMPLER_ERR_ALLOC_FAILED).c_str()); + "resampler is %{public}s", ErrCodeToString(RESAMPLER_ERR_ALLOC_FAILED).c_str()); if (inRate_ == SAMPLE_RATE_11025) { return Process11025SampleRate(inBuffer, inFrameSize, outBuffer, outFrameSize); } else if (inRate_ % CUSTOM_SAMPLE_RATE_MULTIPLES != 0) { @@ -82,7 +82,7 @@ int32_t ProResampler::ProcessOtherSampleRate(const float *inBuffer, uint32_t inF std::vector tmpOutBuf(expectedOutFrameSize * channels_, 0.0f); int32_t ret = SingleStagePolyphaseResamplerProcess(state_, inBuffer, &inFrameSize, tmpOutBuf.data(), &outFrameSize); - CHECK_AND_RETURN_RET_LOG(ret == EOK, ret, "ProResampler process failed with error %{public}s", + CHECK_AND_RETURN_RET_LOG(ret == EOK, ret, "process failed with error %{public}s", ErrCodeToString(ret).c_str()); uint32_t fillSize = expectedOutFrameSize - outFrameSize > 0 ? expectedOutFrameSize - outFrameSize : 0; @@ -204,11 +204,10 @@ int32_t ProResampler::UpdateRates(uint32_t inRate, uint32_t outRate) } else if (inRate_ % CUSTOM_SAMPLE_RATE_MULTIPLES != 0) { expectedInFrameLen_ = inRate_ * FRAME_LEN_20MS * BUFFER_EXPAND_SIZE_5 / MS_PER_SECOND; } - CHECK_AND_RETURN_RET_LOG(state_ != nullptr, RESAMPLER_ERR_ALLOC_FAILED, "ProResampler: resampler is null"); + CHECK_AND_RETURN_RET_LOG(state_ != nullptr, RESAMPLER_ERR_ALLOC_FAILED, "resampler is null"); int32_t ret = SingleStagePolyphaseResamplerSetRate(state_, inRate_, outRate_); - CHECK_AND_RETURN_RET_LOG(ret == RESAMPLER_ERR_SUCCESS, ret, - "ProResampler update rate failed with error code %{public}s", ErrCodeToString(ret).c_str()); + CHECK_AND_RETURN_RET_LOG(ret == RESAMPLER_ERR_SUCCESS, ret, "error code %{public}s", ErrCodeToString(ret).c_str()); return ret; } @@ -222,10 +221,9 @@ int32_t ProResampler::UpdateChannels(uint32_t channels) int32_t errRet = RESAMPLER_ERR_SUCCESS; state_ = SingleStagePolyphaseResamplerInit(channels_, inRate_, outRate_, quality_, &errRet); CHECK_AND_RETURN_RET_LOG(state_ && (errRet == RESAMPLER_ERR_SUCCESS), errRet, - "Proresampler: update work channels failed with error %{public}s.", ErrCodeToString(errRet).c_str()); + "error code %{public}s", ErrCodeToString(errRet).c_str()); - AUDIO_INFO_LOG("Proresampler: update work channel success old channels: %{public}d, new channels: %{public}d", - oldChannels, channels_); + AUDIO_INFO_LOG("success old channels: %{public}d, new channels: %{public}d", oldChannels, channels_); return SingleStagePolyphaseResamplerSkipHalfTaps(state_); } @@ -258,7 +256,7 @@ ProResampler &ProResampler::operator=(ProResampler &&other) noexcept void ProResampler::Reset() { - CHECK_AND_RETURN_LOG(state_ != nullptr, "ProResampler: resampler is null"); + CHECK_AND_RETURN_LOG(state_ != nullptr, "resampler is null"); SingleStagePolyphaseResamplerResetMem(state_); SingleStagePolyphaseResamplerSkipHalfTaps(state_); } diff --git a/services/audio_engine/utils/hpae_no_lock_queue.cpp b/services/audio_engine/utils/hpae_no_lock_queue.cpp index 23f8df3890..5889e95a2b 100644 --- a/services/audio_engine/utils/hpae_no_lock_queue.cpp +++ b/services/audio_engine/utils/hpae_no_lock_queue.cpp @@ -27,7 +27,7 @@ constexpr uint64_t SHIFT_32_OFFSET = 32; HpaeNoLockQueue::HpaeNoLockQueue(size_t maxRequestCount) { if (maxRequestCount > MAX_REQUEST_COUNT) { - AUDIO_WARNING_LOG("[HpaeNoLockQueue] maxRequestCount %{public}zu is beyound Max Count", maxRequestCount); + AUDIO_WARNING_LOG("maxRequestCount %{public}zu is beyound Max Count", maxRequestCount); maxRequestCount = MAX_REQUEST_COUNT; } InitQueue(maxRequestCount); @@ -35,7 +35,7 @@ HpaeNoLockQueue::HpaeNoLockQueue(size_t maxRequestCount) HpaeNoLockQueue::~HpaeNoLockQueue() { - AUDIO_INFO_LOG("HpaeNoLockQueue destroyed"); + AUDIO_INFO_LOG(" destroyed"); } void HpaeNoLockQueue::InitQueue(size_t maxRequestCount) { @@ -49,7 +49,7 @@ void HpaeNoLockQueue::InitQueue(size_t maxRequestCount) } requestQueue_[maxRequestCount - 1].nextRequestIndex = INVALID_REQUEST_ID; requestHeadIndex_ = INVALID_REQUEST_ID; - AUDIO_INFO_LOG("Init Queue size is %{public}zu", maxRequestCount); + AUDIO_INFO_LOG("size is %{public}zu", maxRequestCount); } void HpaeNoLockQueue::PushRequest(Request &&request) { diff --git a/services/audio_service/server/src/hpae_capturer_stream_impl.cpp b/services/audio_service/server/src/hpae_capturer_stream_impl.cpp index 92cf34fc58..46fd580699 100644 --- a/services/audio_service/server/src/hpae_capturer_stream_impl.cpp +++ b/services/audio_service/server/src/hpae_capturer_stream_impl.cpp @@ -87,7 +87,7 @@ int32_t HpaeCapturerStreamImpl::Start() { AUDIO_INFO_LOG("[%{public}u] Enter", streamIndex_); int32_t ret = IHpaeManager::GetHpaeManager().Start(HPAE_STREAM_CLASS_TYPE_RECORD, processConfig_.originalSessionId); - CHECK_AND_RETURN_RET_LOG(ret == 0, ERR_INVALID_PARAM, "Start failed!"); + CHECK_AND_RETURN_RET_LOG(ret == 0, ERR_INVALID_PARAM, "ErrorCode: %{public}d", ret); state_ = RUNNING; return SUCCESS; } @@ -96,7 +96,7 @@ int32_t HpaeCapturerStreamImpl::Pause(bool isStandby) { AUDIO_INFO_LOG("[%{public}u] Enter", streamIndex_); int32_t ret = IHpaeManager::GetHpaeManager().Pause(HPAE_STREAM_CLASS_TYPE_RECORD, processConfig_.originalSessionId); - CHECK_AND_RETURN_RET_LOG(ret == SUCCESS, ERR_INVALID_PARAM, "Pause error!"); + CHECK_AND_RETURN_RET_LOG(ret == SUCCESS, ERR_INVALID_PARAM, "ErrorCode: %{public}d", ret); return SUCCESS; } @@ -125,7 +125,7 @@ int32_t HpaeCapturerStreamImpl::Flush() { AUDIO_INFO_LOG("[%{public}u] Enter", streamIndex_); int32_t ret = IHpaeManager::GetHpaeManager().Flush(HPAE_STREAM_CLASS_TYPE_RECORD, processConfig_.originalSessionId); - CHECK_AND_RETURN_RET_LOG(ret == SUCCESS, ERR_INVALID_PARAM, "Flush error!"); + CHECK_AND_RETURN_RET_LOG(ret == SUCCESS, ERR_INVALID_PARAM, "ErrorCode: %{public}d", ret); return SUCCESS; } @@ -133,7 +133,7 @@ int32_t HpaeCapturerStreamImpl::Stop() { AUDIO_INFO_LOG("[%{public}u] Enter", streamIndex_); int32_t ret = IHpaeManager::GetHpaeManager().Stop(HPAE_STREAM_CLASS_TYPE_RECORD, processConfig_.originalSessionId); - CHECK_AND_RETURN_RET_LOG(ret == SUCCESS, ERR_INVALID_PARAM, "Stop failed"); + CHECK_AND_RETURN_RET_LOG(ret == SUCCESS, ERR_INVALID_PARAM, "ErrorCode: %{public}d", ret); state_ = STOPPING; return SUCCESS; } @@ -141,13 +141,13 @@ int32_t HpaeCapturerStreamImpl::Stop() int32_t HpaeCapturerStreamImpl::Release() { if (state_ == RUNNING) { - AUDIO_ERR_LOG("%{public}u Release state_ is RUNNING", processConfig_.originalSessionId); + AUDIO_ERR_LOG("%{public}u state_ is RUNNING", processConfig_.originalSessionId); IHpaeManager::GetHpaeManager().Stop(HPAE_STREAM_CLASS_TYPE_RECORD, processConfig_.originalSessionId); } AUDIO_INFO_LOG("[%{public}u] Enter", streamIndex_); int32_t ret = IHpaeManager::GetHpaeManager().Release(HPAE_STREAM_CLASS_TYPE_RECORD, processConfig_.originalSessionId); - CHECK_AND_RETURN_RET_LOG(ret == SUCCESS, ERR_INVALID_PARAM, "Release is error"); + CHECK_AND_RETURN_RET_LOG(ret == SUCCESS, ERR_INVALID_PARAM, "ErrorCode: %{public}d", ret); state_ = RELEASED; // to do check closeaudioport if (processConfig_.capturerInfo.sourceType == SOURCE_TYPE_WAKEUP) { diff --git a/services/audio_service/server/src/hpae_renderer_stream_impl.cpp b/services/audio_service/server/src/hpae_renderer_stream_impl.cpp index 70bc7b8911..b9114d8dd1 100644 --- a/services/audio_service/server/src/hpae_renderer_stream_impl.cpp +++ b/services/audio_service/server/src/hpae_renderer_stream_impl.cpp @@ -122,17 +122,12 @@ int32_t HpaeRendererStreamImpl::InitParams(const std::string &deviceName) streamInfo.deviceName = deviceName; streamInfo.isMoveAble = isMoveAble_; streamInfo.privacyType = processConfig_.privacyType; - AUDIO_INFO_LOG("InitParams channels %{public}u end", streamInfo.channels); - AUDIO_INFO_LOG("InitParams channelLayout %{public}" PRIu64 " end", streamInfo.channelLayout); - AUDIO_INFO_LOG("InitParams samplingRate %{public}u end", streamInfo.customSampleRate == 0 ? - streamInfo.samplingRate : streamInfo.customSampleRate); - AUDIO_INFO_LOG("InitParams format %{public}u end", streamInfo.format); - AUDIO_INFO_LOG("InitParams frameLen %{public}zu end", streamInfo.frameLen); - AUDIO_INFO_LOG("InitParams streamType %{public}u end", streamInfo.streamType); - AUDIO_INFO_LOG("InitParams sessionId %{public}u end", streamInfo.sessionId); - AUDIO_INFO_LOG("InitParams streamClassType %{public}u end", streamInfo.streamClassType); - AUDIO_INFO_LOG("InitParams sourceType %{public}d end", streamInfo.sourceType); - AUDIO_INFO_LOG("InitParams fadeType %{public}d end", streamInfo.fadeType); + AUDIO_INFO_LOG("channels %{public}u channelLayout %{public}" PRIu64 " samplingRate %{public}u format %{public}u " + "frameLen %{public}zu streamType %{public}u sessionId %{public}u streamClassType %{public}u " + "sourceType %{public}d fadeType %{public}d", streamInfo.channels, streamInfo.channelLayout, + streamInfo.customSampleRate == 0 ? streamInfo.samplingRate : streamInfo.customSampleRate, streamInfo.format, + streamInfo.frameLen, streamInfo.streamType, streamInfo.sessionId, streamInfo.streamClassType, + streamInfo.sourceType, streamInfo.fadeType); auto &hpaeManager = IHpaeManager::GetHpaeManager(); int32_t ret = hpaeManager.CreateStream(streamInfo); CHECK_AND_RETURN_RET_LOG(ret == SUCCESS, ERR_INVALID_PARAM, "CreateStream is error"); @@ -166,7 +161,7 @@ int32_t HpaeRendererStreamImpl::StartWithSyncId(const int32_t &syncId) int32_t ret = IHpaeManager::GetHpaeManager().StartWithSyncId(HPAE_STREAM_CLASS_TYPE_PLAY, processConfig_.originalSessionId, syncId); if (ret != 0) { - AUDIO_ERR_LOG("StartWithSyncId is error!"); + AUDIO_ERR_LOG("error!"); return ERR_INVALID_PARAM; } return SUCCESS; @@ -177,7 +172,7 @@ int32_t HpaeRendererStreamImpl::Pause(bool isStandby) AUDIO_INFO_LOG("[%{public}u] Enter", streamIndex_); int32_t ret = IHpaeManager::GetHpaeManager().Pause(HPAE_STREAM_CLASS_TYPE_PLAY, processConfig_.originalSessionId); if (ret != 0) { - AUDIO_ERR_LOG("Pause is error!"); + AUDIO_ERR_LOG("error!"); return ERR_INVALID_PARAM; } return SUCCESS; @@ -188,7 +183,7 @@ int32_t HpaeRendererStreamImpl::Flush() AUDIO_INFO_LOG("[%{public}u] Enter", streamIndex_); int32_t ret = IHpaeManager::GetHpaeManager().Flush(HPAE_STREAM_CLASS_TYPE_PLAY, processConfig_.originalSessionId); if (ret != 0) { - AUDIO_ERR_LOG("Flush is error"); + AUDIO_ERR_LOG("ErrorCode: %{public}d", ret); return ERR_INVALID_PARAM; } return SUCCESS; @@ -199,7 +194,7 @@ int32_t HpaeRendererStreamImpl::Drain(bool stopFlag) AUDIO_INFO_LOG("[%{public}u] Enter %{public}d", streamIndex_, stopFlag); int32_t ret = IHpaeManager::GetHpaeManager().Drain(HPAE_STREAM_CLASS_TYPE_PLAY, processConfig_.originalSessionId); if (ret != 0) { - AUDIO_ERR_LOG("Drain is error"); + AUDIO_ERR_LOG("ErrorCode: %{public}d", ret); return ERR_INVALID_PARAM; } return SUCCESS; @@ -210,7 +205,7 @@ int32_t HpaeRendererStreamImpl::Stop() AUDIO_INFO_LOG("[%{public}u] Enter", streamIndex_); int32_t ret = IHpaeManager::GetHpaeManager().Stop(HPAE_STREAM_CLASS_TYPE_PLAY, processConfig_.originalSessionId); if (ret != 0) { - AUDIO_ERR_LOG("Stop is error!"); + AUDIO_ERR_LOG("ErrorCode: %{public}d", ret); return ERR_INVALID_PARAM; } state_ = STOPPING; @@ -229,7 +224,7 @@ int32_t HpaeRendererStreamImpl::Release() std::string tempStringSessionId = std::to_string(streamIndex_); IHpaeManager::GetHpaeManager().DeleteStreamVolumeToEffect(tempStringSessionId); if (ret != 0) { - AUDIO_ERR_LOG("Release is error"); + AUDIO_ERR_LOG("ErrorCode: %{public}d", ret); return ERR_INVALID_PARAM; } state_ = RELEASED; @@ -297,7 +292,7 @@ int32_t HpaeRendererStreamImpl::GetRemoteOffloadSpeedPosition(uint64_t &framePos uint64_t frames = framesUS * processConfig_.streamInfo.samplingRate / AUDIO_US_PER_S; framePosition = lastHdiFramePosition_ + frames; timestamp = static_cast(timeNSec + timeSec * AUDIO_NS_PER_SECOND); - AUDIO_DEBUG_LOG("HpaeRendererStreamImpl::GetSpeedPosition frame: %{public}" PRIu64, framePosition); + AUDIO_DEBUG_LOG("frame: %{public}" PRIu64, framePosition); return SUCCESS; } @@ -329,8 +324,8 @@ int32_t HpaeRendererStreamImpl::GetCurrentPosition(uint64_t &framePosition, uint framePosition = framePosition_; uint64_t mutePaddingFrames = mutePaddingFrames_.load(); framePosition = (framePosition > mutePaddingFrames) ? (framePosition - mutePaddingFrames) : 0; - AUDIO_DEBUG_LOG("HpaeRendererStreamImpl::GetCurrentPosition Latency info: framePosition: %{public}" PRIu64 - ", latency %{public}" PRIu64, framePosition, latency); + AUDIO_DEBUG_LOG("Latency info: framePosition: %{public}" PRIu64 ", latency %{public}" PRIu64, + framePosition, latency); return SUCCESS; } @@ -377,10 +372,10 @@ int32_t HpaeRendererStreamImpl::SetRate(int32_t rate) int32_t HpaeRendererStreamImpl::SetAudioEffectMode(int32_t effectMode) { - AUDIO_INFO_LOG("SetAudioEffectMode: %{public}d", effectMode); + AUDIO_INFO_LOG("effectMode: %{public}d", effectMode); int32_t ret = IHpaeManager::GetHpaeManager().SetAudioEffectMode(processConfig_.originalSessionId, effectMode); if (ret != 0) { - AUDIO_ERR_LOG("SetAudioEffectMode is error"); + AUDIO_ERR_LOG("ErrorCode: %{public}d", ret); return ERR_INVALID_PARAM; } effectMode_ = effectMode; @@ -395,7 +390,7 @@ int32_t HpaeRendererStreamImpl::GetAudioEffectMode(int32_t &effectMode) int32_t HpaeRendererStreamImpl::SetPrivacyType(int32_t privacyType) { - AUDIO_DEBUG_LOG("SetInnerCapturerState: %{public}d", privacyType); + AUDIO_DEBUG_LOG("privacyType: %{public}d", privacyType); privacyType_ = privacyType; return SUCCESS; } @@ -510,7 +505,7 @@ int32_t HpaeRendererStreamImpl::EnqueueBuffer(const BufferDesc &bufferDesc) size_t writableSize = result.size; if (targetSize > writableSize) { - AUDIO_ERR_LOG("Enqueue buffer overflow, targetSize: %{public}zu, writableSize: %{public}zu", + AUDIO_ERR_LOG("overflow, targetSize: %{public}zu, writableSize: %{public}zu", targetSize, writableSize); } @@ -518,7 +513,7 @@ int32_t HpaeRendererStreamImpl::EnqueueBuffer(const BufferDesc &bufferDesc) BufferWrap bufferWrap = {bufferDesc.buffer, writeSize}; result = ringBuffer_->Enqueue(bufferWrap); if (result.ret != OPERATION_SUCCESS) { - AUDIO_ERR_LOG("Enqueue buffer failed, ret:%{public}d size:%{public}zu", result.ret, result.size); + AUDIO_ERR_LOG("failed, ret:%{public}d size:%{public}zu", result.ret, result.size); return ERROR; } DumpFileUtil::WriteDumpFile(dumpEnqueueIn_, bufferDesc.buffer, writeSize); @@ -579,7 +574,7 @@ int32_t HpaeRendererStreamImpl::OffloadSetVolume(float volume) int32_t HpaeRendererStreamImpl::SetOffloadDataCallbackState(int32_t state) { - AUDIO_INFO_LOG("SetOffloadDataCallbackState state: %{public}d", state); + AUDIO_INFO_LOG("state: %{public}d", state); if (!offloadEnable_) { return ERR_OPERATION_FAILED; } @@ -638,7 +633,7 @@ int32_t HpaeRendererStreamImpl::SetOffloadMode(int32_t state, bool isAppBack) "SetOffloadPolicy failed, errcode is %{public}d", ret); offloadStatePolicy_.store(statePolicy); #else - AUDIO_INFO_LOG("SetStreamOffloadMode not available, FEATURE_POWER_MANAGER no define"); + AUDIO_INFO_LOG("not available, FEATURE_POWER_MANAGER no define"); #endif return SUCCESS; } @@ -687,16 +682,16 @@ void HpaeRendererStreamImpl::BlockStream() noexcept int32_t HpaeRendererStreamImpl::SetClientVolume(float clientVolume) { - AUDIO_PRERELEASE_LOGI("set client volume success"); if (clientVolume < MIN_FLOAT_VOLUME || clientVolume > MAX_FLOAT_VOLUME) { - AUDIO_ERR_LOG("SetClientVolume with invalid clientVolume %{public}f", clientVolume); + AUDIO_ERR_LOG("invalid clientVolume %{public}f", clientVolume); return ERR_INVALID_PARAM; } + AUDIO_PRERELEASE_LOGI("clientVolume %{public}f", clientVolume); int32_t ret = IHpaeManager::GetHpaeManager().SetClientVolume(processConfig_.originalSessionId, clientVolume); std::string tempStringSessionId = std::to_string(processConfig_.originalSessionId); IHpaeManager::GetHpaeManager().AddStreamVolumeToEffect(tempStringSessionId, clientVolume); if (ret != 0) { - AUDIO_ERR_LOG("SetClientVolume is error"); + AUDIO_ERR_LOG("ErrorCode: %{public}d", ret); return ERR_INVALID_PARAM; } clientVolume_ = clientVolume; @@ -705,9 +700,9 @@ int32_t HpaeRendererStreamImpl::SetClientVolume(float clientVolume) int32_t HpaeRendererStreamImpl::SetLoudnessGain(float loudnessGain) { - AUDIO_INFO_LOG("set loudnessGain: %{public}f", loudnessGain); + AUDIO_INFO_LOG("loudnessGain: %{public}f", loudnessGain); int32_t ret = IHpaeManager::GetHpaeManager().SetLoudnessGain(processConfig_.originalSessionId, loudnessGain); - CHECK_AND_RETURN_RET_LOG(ret == 0, ERR_INVALID_PARAM, "SetLoudnessGain is error"); + CHECK_AND_RETURN_RET_LOG(ret == 0, ERR_INVALID_PARAM, "error"); return SUCCESS; } -- Gitee From f18565bba17aaf085a397380fa6438bfdec6877c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E5=BF=97=E5=BA=86?= Date: Fri, 12 Sep 2025 09:19:38 +0800 Subject: [PATCH 2/9] bugfix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 蒋志庆 --- .../server/src/hpae_renderer_stream_impl.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/services/audio_service/server/src/hpae_renderer_stream_impl.cpp b/services/audio_service/server/src/hpae_renderer_stream_impl.cpp index b9114d8dd1..610f284b4e 100644 --- a/services/audio_service/server/src/hpae_renderer_stream_impl.cpp +++ b/services/audio_service/server/src/hpae_renderer_stream_impl.cpp @@ -85,7 +85,7 @@ HpaeRendererStreamImpl::HpaeRendererStreamImpl(AudioProcessConfig processConfig, } HpaeRendererStreamImpl::~HpaeRendererStreamImpl() { - AUDIO_INFO_LOG("~HpaeRendererStreamImpl [%{public}u]", streamIndex_); + AUDIO_INFO_LOG("index: %{public}u", streamIndex_); if (dumpEnqueueIn_ != nullptr) { DumpFileUtil::CloseDumpFile(&dumpEnqueueIn_); } @@ -148,7 +148,7 @@ int32_t HpaeRendererStreamImpl::Start() std::string tempStringSessionId = std::to_string(streamIndex_); IHpaeManager::GetHpaeManager().AddStreamVolumeToEffect(tempStringSessionId, clientVolume_); if (ret != 0) { - AUDIO_ERR_LOG("Start is error!"); + AUDIO_ERR_LOG("ErrorCode: %{public}d", ret); return ERR_INVALID_PARAM; } return SUCCESS; @@ -161,7 +161,7 @@ int32_t HpaeRendererStreamImpl::StartWithSyncId(const int32_t &syncId) int32_t ret = IHpaeManager::GetHpaeManager().StartWithSyncId(HPAE_STREAM_CLASS_TYPE_PLAY, processConfig_.originalSessionId, syncId); if (ret != 0) { - AUDIO_ERR_LOG("error!"); + AUDIO_ERR_LOG("ErrorCode: %{public}d", ret); return ERR_INVALID_PARAM; } return SUCCESS; @@ -172,7 +172,7 @@ int32_t HpaeRendererStreamImpl::Pause(bool isStandby) AUDIO_INFO_LOG("[%{public}u] Enter", streamIndex_); int32_t ret = IHpaeManager::GetHpaeManager().Pause(HPAE_STREAM_CLASS_TYPE_PLAY, processConfig_.originalSessionId); if (ret != 0) { - AUDIO_ERR_LOG("error!"); + AUDIO_ERR_LOG("ErrorCode: %{public}d", ret); return ERR_INVALID_PARAM; } return SUCCESS; @@ -702,7 +702,7 @@ int32_t HpaeRendererStreamImpl::SetLoudnessGain(float loudnessGain) { AUDIO_INFO_LOG("loudnessGain: %{public}f", loudnessGain); int32_t ret = IHpaeManager::GetHpaeManager().SetLoudnessGain(processConfig_.originalSessionId, loudnessGain); - CHECK_AND_RETURN_RET_LOG(ret == 0, ERR_INVALID_PARAM, "error"); + CHECK_AND_RETURN_RET_LOG(ret == 0, ERR_INVALID_PARAM, "ErrorCode: %{public}d", ret); return SUCCESS; } -- Gitee From 175f49f9b735f64c16f4098d525de073b0e69fcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E5=BF=97=E5=BA=86?= Date: Fri, 12 Sep 2025 09:31:20 +0800 Subject: [PATCH 3/9] bugfix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 蒋志庆 --- .../src/pro_audio_service_adapter_impl.cpp | 20 ++++++------------- .../server/src/hpae_renderer_stream_impl.cpp | 2 +- .../server/src/pro_audio_stream_manager.cpp | 6 +++--- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/frameworks/native/audioadapter/src/pro_audio_service_adapter_impl.cpp b/frameworks/native/audioadapter/src/pro_audio_service_adapter_impl.cpp index 76c53c3a78..e4a90020af 100644 --- a/frameworks/native/audioadapter/src/pro_audio_service_adapter_impl.cpp +++ b/frameworks/native/audioadapter/src/pro_audio_service_adapter_impl.cpp @@ -48,7 +48,7 @@ ProAudioServiceAdapterImpl::ProAudioServiceAdapterImpl(unique_ptr ProAudioServiceAdapterImpl::GetAllSinks() AUDIO_ERR_LOG("Timeout"); sinks_.clear(); } - AUDIO_INFO_LOG("Leave"); return sinks_; } @@ -305,7 +300,6 @@ int32_t ProAudioServiceAdapterImpl::SetSourceOutputMute(int32_t uid, bool setMut AUDIO_ERR_LOG("Timeout"); return ERROR; } - AUDIO_INFO_LOG("Leave"); return SourceOutputMuteStreamSet_; } @@ -327,13 +321,12 @@ std::vector ProAudioServiceAdapterImpl::GetAllSinkInputs() AUDIO_ERR_LOG("Timeout"); sinkInputs_.clear(); } - AUDIO_INFO_LOG("Leave"); return sinkInputs_; } std::vector ProAudioServiceAdapterImpl::GetAllSourceOutputs() { - AUDIO_INFO_LOG("GetAllSourceOutputs"); + AUDIO_INFO_LOG("Enter"); AudioXCollie audioXCollie("ProAudioServiceAdapterImpl::GetAllSourceOutputs", HPAE_SERVICE_IMPL_TIMEOUT, [](void *) { AUDIO_ERR_LOG("[xcollie] Timeout"); @@ -349,7 +342,6 @@ std::vector ProAudioServiceAdapterImpl::GetAllSourceOutputs() AUDIO_ERR_LOG("Timeout"); sourceOutputs_.clear(); } - AUDIO_INFO_LOG("Leave"); return sourceOutputs_; } @@ -360,7 +352,7 @@ void ProAudioServiceAdapterImpl::Disconnect() int32_t ProAudioServiceAdapterImpl::GetAudioEffectProperty(AudioEffectPropertyArrayV3 &propertyArray) { - AUDIO_INFO_LOG("GetAudioEffectProperty"); + AUDIO_INFO_LOG("Enter"); lock_guard lock(lock_); isFinishGetAudioEffectPropertyV3_ = false; IHpaeManager::GetHpaeManager().GetAudioEffectProperty(propertyArray); @@ -376,7 +368,7 @@ int32_t ProAudioServiceAdapterImpl::GetAudioEffectProperty(AudioEffectPropertyAr int32_t ProAudioServiceAdapterImpl::GetAudioEffectProperty(AudioEffectPropertyArray &propertyArray) { - AUDIO_INFO_LOG("GetAudioEffectProperty"); + AUDIO_INFO_LOG("Enter"); lock_guard lock(lock_); isFinishGetAudioEffectProperty_ = false; IHpaeManager::GetHpaeManager().GetAudioEffectProperty(propertyArray); @@ -393,7 +385,7 @@ int32_t ProAudioServiceAdapterImpl::GetAudioEffectProperty(AudioEffectPropertyAr int32_t ProAudioServiceAdapterImpl::GetAudioEnhanceProperty(AudioEffectPropertyArrayV3 &propertyArray, DeviceType deviceType) { - AUDIO_INFO_LOG("GetAudioEnhancePropertyV3"); + AUDIO_INFO_LOG("Enter"); lock_guard lock(lock_); isFinishGetAudioEnhancePropertyV3_ = false; IHpaeManager::GetHpaeManager().GetAudioEnhanceProperty(propertyArray); @@ -410,7 +402,7 @@ int32_t ProAudioServiceAdapterImpl::GetAudioEnhanceProperty(AudioEffectPropertyA int32_t ProAudioServiceAdapterImpl::GetAudioEnhanceProperty(AudioEnhancePropertyArray &propertyArray, DeviceType deviceType) { - AUDIO_INFO_LOG("GetAudioEnhanceProperty"); + AUDIO_INFO_LOG("Enter"); lock_guard lock(lock_); isFinishGetAudioEnhanceProperty_ = false; IHpaeManager::GetHpaeManager().GetAudioEnhanceProperty(propertyArray); diff --git a/services/audio_service/server/src/hpae_renderer_stream_impl.cpp b/services/audio_service/server/src/hpae_renderer_stream_impl.cpp index 610f284b4e..45ad1504af 100644 --- a/services/audio_service/server/src/hpae_renderer_stream_impl.cpp +++ b/services/audio_service/server/src/hpae_renderer_stream_impl.cpp @@ -85,7 +85,7 @@ HpaeRendererStreamImpl::HpaeRendererStreamImpl(AudioProcessConfig processConfig, } HpaeRendererStreamImpl::~HpaeRendererStreamImpl() { - AUDIO_INFO_LOG("index: %{public}u", streamIndex_); + AUDIO_INFO_LOG("destructor %{public}u", streamIndex_); if (dumpEnqueueIn_ != nullptr) { DumpFileUtil::CloseDumpFile(&dumpEnqueueIn_); } diff --git a/services/audio_service/server/src/pro_audio_stream_manager.cpp b/services/audio_service/server/src/pro_audio_stream_manager.cpp index 7fc09b7481..431e6f554e 100644 --- a/services/audio_service/server/src/pro_audio_stream_manager.cpp +++ b/services/audio_service/server/src/pro_audio_stream_manager.cpp @@ -205,19 +205,19 @@ std::shared_ptr ProAudioStreamManager::CreateRendererStream(Aud int32_t ProAudioStreamManager::CreateCapturer(AudioProcessConfig processConfig, std::shared_ptr &stream) { - AUDIO_ERR_LOG("Unsupported operation: CreateCapturer!"); + AUDIO_ERR_LOG("Unsupported operation"); return SUCCESS; } int32_t ProAudioStreamManager::ReleaseCapturer(uint32_t streamIndex) { - AUDIO_ERR_LOG("Unsupported operation: ReleaseCapturer!"); + AUDIO_ERR_LOG("Unsupported operation"); return SUCCESS; } int32_t ProAudioStreamManager::AddUnprocessStream(int32_t appUid) { - AUDIO_ERR_LOG("Unsupported operation: AddUnprocessStream!"); + AUDIO_ERR_LOG("Unsupported operation"); return SUCCESS; } -- Gitee From a8c859c5466e48092c85570190d3e3f67ac4c87f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E5=BF=97=E5=BA=86?= Date: Fri, 12 Sep 2025 09:53:06 +0800 Subject: [PATCH 4/9] bugfix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 蒋志庆 --- services/audio_engine/node/src/hpae_process_cluster.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/audio_engine/node/src/hpae_process_cluster.cpp b/services/audio_engine/node/src/hpae_process_cluster.cpp index 4b40ce1d93..315c425ea4 100644 --- a/services/audio_engine/node/src/hpae_process_cluster.cpp +++ b/services/audio_engine/node/src/hpae_process_cluster.cpp @@ -180,7 +180,7 @@ void HpaeProcessCluster::Connect(const std::shared_ptrGetNodeInfo(); uint32_t sessionId = preNodeInfo.sessionId; - AUDIO_INFO_LOG("HsessionId is %{public}u, streamType is %{public}d, sceneType is %{public}d, " + AUDIO_INFO_LOG("sessionId is %{public}u, streamType is %{public}d, sceneType is %{public}d, " "rate is %{public}u, ch is %{public}u, " "preNodeId %{public}u, preNodeName is %{public}s", preNodeInfo.sessionId, preNodeInfo.streamType, preNodeInfo.sceneType, -- Gitee From 01144edbecf8a26143c05d7a8c2d566036dc8171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E5=BF=97=E5=BA=86?= Date: Fri, 12 Sep 2025 09:53:18 +0800 Subject: [PATCH 5/9] bugfix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 蒋志庆 --- services/audio_engine/node/src/hpae_process_cluster.cpp | 4 ++-- services/audio_engine/node/src/hpae_source_input_node.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/audio_engine/node/src/hpae_process_cluster.cpp b/services/audio_engine/node/src/hpae_process_cluster.cpp index 315c425ea4..0216045e5b 100644 --- a/services/audio_engine/node/src/hpae_process_cluster.cpp +++ b/services/audio_engine/node/src/hpae_process_cluster.cpp @@ -230,7 +230,7 @@ void HpaeProcessCluster::DisConnectMixerNode() if (renderEffectNode_) { renderEffectNode_->DisConnect(mixerNode_); renderEffectNode_->InitEffectBufferFromDisConnect(); - AUDIO_INFO_LOG("Process DisConnect mixerNode_"); + AUDIO_INFO_LOG("DisConnect mixerNode_"); } } @@ -238,7 +238,7 @@ void HpaeProcessCluster::InitEffectBuffer(const uint32_t sessionId) { CHECK_AND_RETURN_LOG(renderEffectNode_ != nullptr, "renderEffectNode is nullptr"); renderEffectNode_->InitEffectBuffer(sessionId); - AUDIO_INFO_LOG("begin sessionId: %{public}u", sessionId); + AUDIO_INFO_LOG("init sessionId: %{public}u", sessionId); } int32_t HpaeProcessCluster::GetNodeInputFormatInfo(uint32_t sessionId, AudioBasicFormat &basicFormat) diff --git a/services/audio_engine/node/src/hpae_source_input_node.cpp b/services/audio_engine/node/src/hpae_source_input_node.cpp index 9a89993891..ade9e68510 100644 --- a/services/audio_engine/node/src/hpae_source_input_node.cpp +++ b/services/audio_engine/node/src/hpae_source_input_node.cpp @@ -471,7 +471,7 @@ int32_t HpaeSourceInputNode::CapturerSourceStop(void) Trace trace("HpaeSourceInputNode::CapturerSourceStop"); SetSourceState(STREAM_MANAGER_SUSPENDED); if (audioCapturerSource_->Stop() != SUCCESS) { - AUDIO_ERR_LOG("error, sourceInputNode[%{public}u]", sourceInputNodeType_); + AUDIO_ERR_LOG("stop error, sourceInputNode[%{public}u]", sourceInputNodeType_); } return SUCCESS; } -- Gitee From 35d96c3c62082e0480a5124a532158a52deb89a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E5=BF=97=E5=BA=86?= Date: Fri, 12 Sep 2025 10:00:36 +0800 Subject: [PATCH 6/9] bugfix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 蒋志庆 --- services/audio_engine/manager/src/hpae_capturer_manager.cpp | 3 +-- services/audio_engine/node/src/hpae_remote_output_cluster.cpp | 4 ++-- .../audio_service/server/src/hpae_renderer_stream_impl.cpp | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/services/audio_engine/manager/src/hpae_capturer_manager.cpp b/services/audio_engine/manager/src/hpae_capturer_manager.cpp index f4f6d84e8b..dfe3ae46f9 100644 --- a/services/audio_engine/manager/src/hpae_capturer_manager.cpp +++ b/services/audio_engine/manager/src/hpae_capturer_manager.cpp @@ -77,8 +77,7 @@ int32_t HpaeCapturerManager::CaptureEffectCreate(const HpaeProcessorType &proces int32_t HpaeCapturerManager::CreateOutputSession(const HpaeStreamInfo &streamInfo) { AUDIO_INFO_LOG("CreateStream sessionId %{public}u deviceName %{public}s", - streamInfo.sessionId, - sourceInfo_.deviceName.c_str()); + streamInfo.sessionId, sourceInfo_.deviceName.c_str()); HpaeNodeInfo nodeInfo; nodeInfo.channels = streamInfo.channels; nodeInfo.format = streamInfo.format; diff --git a/services/audio_engine/node/src/hpae_remote_output_cluster.cpp b/services/audio_engine/node/src/hpae_remote_output_cluster.cpp index f65c3922ab..316dd1b825 100644 --- a/services/audio_engine/node/src/hpae_remote_output_cluster.cpp +++ b/services/audio_engine/node/src/hpae_remote_output_cluster.cpp @@ -100,8 +100,8 @@ void HpaeRemoteOutputCluster::Connect(const std::shared_ptr Date: Fri, 12 Sep 2025 10:02:26 +0800 Subject: [PATCH 7/9] bugfix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 蒋志庆 --- services/audio_engine/node/src/hpae_process_cluster.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/audio_engine/node/src/hpae_process_cluster.cpp b/services/audio_engine/node/src/hpae_process_cluster.cpp index 0216045e5b..4b3bb6ce2c 100644 --- a/services/audio_engine/node/src/hpae_process_cluster.cpp +++ b/services/audio_engine/node/src/hpae_process_cluster.cpp @@ -206,8 +206,7 @@ void HpaeProcessCluster::Connect(const std::shared_ptr> &preNode) { uint32_t sessionId = preNode->GetNodeInfo().sessionId; - AUDIO_INFO_LOG( - "sessionId is %{public}u, streamType is %{public}d, sceneType is %{public}d", + AUDIO_INFO_LOG("sessionId is %{public}u, streamType is %{public}d, sceneType is %{public}d", sessionId, preNode->GetNodeInfo().streamType, preNode->GetNodeInfo().sceneType); if (SafeGetMap(idConverterMap_, sessionId)) { idConverterMap_[sessionId]->DisConnect(preNode); -- Gitee From 3882afe4bbe70a5dcd96e83e066480e91a36f18c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E5=BF=97=E5=BA=86?= Date: Fri, 12 Sep 2025 14:40:34 +0800 Subject: [PATCH 8/9] bugfix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 蒋志庆 --- services/audio_engine/node/src/hpae_offload_sinkoutput_node.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/services/audio_engine/node/src/hpae_offload_sinkoutput_node.cpp b/services/audio_engine/node/src/hpae_offload_sinkoutput_node.cpp index 6859c031ea..86fc9140fb 100644 --- a/services/audio_engine/node/src/hpae_offload_sinkoutput_node.cpp +++ b/services/audio_engine/node/src/hpae_offload_sinkoutput_node.cpp @@ -469,7 +469,6 @@ int32_t HpaeOffloadSinkOutputNode::ProcessRenderFrame() auto now = std::chrono::high_resolution_clock::now(); auto ret = audioRendererSink_->RenderFrame(*renderFrameData, renderFrameData_.size(), writeLen); if (ret == SUCCESS && writeLen == 0 && !firstWriteHdi_) { - AUDIO_INFO_LOG("offload renderFrame full"); return OFFLOAD_FULL; } if (!(ret == SUCCESS && writeLen == renderFrameData_.size())) { -- Gitee From 55e5422801c4dce268022e8a1a345a6763817c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=92=8B=E5=BF=97=E5=BA=86?= Date: Fri, 12 Sep 2025 15:18:09 +0800 Subject: [PATCH 9/9] bugfix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 蒋志庆 --- services/audio_service/server/src/hpae_renderer_stream_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/audio_service/server/src/hpae_renderer_stream_impl.cpp b/services/audio_service/server/src/hpae_renderer_stream_impl.cpp index 87a45689ae..0d8c72f2ee 100644 --- a/services/audio_service/server/src/hpae_renderer_stream_impl.cpp +++ b/services/audio_service/server/src/hpae_renderer_stream_impl.cpp @@ -291,7 +291,7 @@ int32_t HpaeRendererStreamImpl::GetRemoteOffloadSpeedPosition(uint64_t &framePos uint64_t frames = framesUS * processConfig_.streamInfo.samplingRate / AUDIO_US_PER_S; framePosition = lastHdiFramePosition_ + frames; - timestamp = static_cast(timeNSec + timeSec * AUDIO_NS_PER_SECOND); + timestamp = static_cast(ClockTime::GetCurNano()); AUDIO_DEBUG_LOG("frame: %{public}" PRIu64, framePosition); return SUCCESS; } -- Gitee