From 8ccb5949fbd62b3ed98976c89a1b2635eb3e9b97 Mon Sep 17 00:00:00 2001 From: qiuguohua Date: Mon, 18 Nov 2024 15:46:09 +0800 Subject: [PATCH] Fixing CI errors --- native/cocos/audio/android/AudioMixerController.cpp | 6 ++++-- native/cocos/audio/android/AudioMixerController.h | 1 - platforms/native/engine/jsb-videoplayer-openharmony.js | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/native/cocos/audio/android/AudioMixerController.cpp b/native/cocos/audio/android/AudioMixerController.cpp index 8307aa682be..5d8190b47bd 100644 --- a/native/cocos/audio/android/AudioMixerController.cpp +++ b/native/cocos/audio/android/AudioMixerController.cpp @@ -202,6 +202,7 @@ void AudioMixerController::mixOneFrame() { Track::State state; // set up the tracks. + // NOLINTNEXTLINE(readability-use-anyofallof) for (auto &&track : _activeTracks) { state = track->getState(); @@ -287,7 +288,7 @@ void AudioMixerController::mixOneFrame() { auto mixEnd = clockNow(); float mixInterval = intervalInMS(mixStart, mixEnd); - ALOGV_IF(mixInterval > 1.0f, "Mix a frame waste: %fms", mixInterval); + ALOGV_IF(mixInterval > 1.0f, "Mix a frame waste: %Fms", mixInterval); _isMixingFrame = false; } @@ -309,8 +310,9 @@ void AudioMixerController::resume() { bool AudioMixerController::hasPlayingTacks() { std::lock_guard lk(_activeTracksMutex); - if (_activeTracks.empty()) + if (_activeTracks.empty()) { return false; + } for (auto &&track : _activeTracks) { Track::State state = track->getState(); diff --git a/native/cocos/audio/android/AudioMixerController.h b/native/cocos/audio/android/AudioMixerController.h index 0ce36367fd0..b9690a92baf 100644 --- a/native/cocos/audio/android/AudioMixerController.h +++ b/native/cocos/audio/android/AudioMixerController.h @@ -74,7 +74,6 @@ class AudioMixerController { void destroy(); void initTrack(Track *track, ccstd::vector &tracksToRemove); -private: int _bufferSizeInFrames; int _sampleRate; int _channelCount; diff --git a/platforms/native/engine/jsb-videoplayer-openharmony.js b/platforms/native/engine/jsb-videoplayer-openharmony.js index 8a4b662cb82..4b31ea29cb8 100644 --- a/platforms/native/engine/jsb-videoplayer-openharmony.js +++ b/platforms/native/engine/jsb-videoplayer-openharmony.js @@ -236,7 +236,7 @@ if (cc.internal.VideoPlayer) { } onUpdate (args = 0) { - if(this.video) { + if (this.video) { this.video._currentTime = args; } } @@ -381,7 +381,7 @@ if (cc.internal.VideoPlayer) { stop () { if (this.video) { - this._ignorePause = true; + //this._ignorePause = true; this.video.seekTo(0); this._cachedCurrentTime = 0; this.video.stop();