Skip to content

Commit

Permalink
Fixing CI errors
Browse files Browse the repository at this point in the history
  • Loading branch information
qiuguohua committed Nov 18, 2024
1 parent e3f27c7 commit 8ccb594
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 4 additions & 2 deletions native/cocos/audio/android/AudioMixerController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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);

Check failure on line 291 in native/cocos/audio/android/AudioMixerController.cpp

View workflow job for this annotation

GitHub Actions / ClangTidy Android

floating point literal has suffix 'f', which is not uppercase (readability-uppercase-literal-suffix)

_isMixingFrame = false;
}
Expand All @@ -309,8 +310,9 @@ void AudioMixerController::resume() {

bool AudioMixerController::hasPlayingTacks() {
std::lock_guard<std::mutex> lk(_activeTracksMutex);
if (_activeTracks.empty())
if (_activeTracks.empty()) {
return false;
}

for (auto &&track : _activeTracks) {

Check failure on line 317 in native/cocos/audio/android/AudioMixerController.cpp

View workflow job for this annotation

GitHub Actions / ClangTidy Android

replace loop by 'std::any_of()' (readability-use-anyofallof)
Track::State state = track->getState();
Expand Down
1 change: 0 additions & 1 deletion native/cocos/audio/android/AudioMixerController.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ class AudioMixerController {
void destroy();
void initTrack(Track *track, ccstd::vector<Track *> &tracksToRemove);

private:
int _bufferSizeInFrames;
int _sampleRate;
int _channelCount;
Expand Down
4 changes: 2 additions & 2 deletions platforms/native/engine/jsb-videoplayer-openharmony.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ if (cc.internal.VideoPlayer) {
}

onUpdate (args = 0) {
if(this.video) {
if (this.video) {
this.video._currentTime = args;
}
}
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 8ccb594

Please sign in to comment.