From 219b0e8046afe9fd0878d50608f749490a81d4bb Mon Sep 17 00:00:00 2001 From: Avery King Date: Sun, 29 Jun 2025 07:40:09 -0700 Subject: [PATCH] Fix some trivial warnings Building still has a lot of warnings, and some of these errors happened to show up quite a bit. Fixing these warnings should help reduce that, although there are still plenty to fix. Signed-off-by: Avery King --- libraries/lib-audio-io/PlaybackSchedule.h | 2 +- libraries/lib-time-and-pitch/StaffPadTimeAndPitch.cpp | 4 ++-- libraries/lib-wave-track/WaveClip.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/lib-audio-io/PlaybackSchedule.h b/libraries/lib-audio-io/PlaybackSchedule.h index c19d2729b..96799800f 100644 --- a/libraries/lib-audio-io/PlaybackSchedule.h +++ b/libraries/lib-audio-io/PlaybackSchedule.h @@ -263,7 +263,7 @@ struct AUDIO_IO_API PlaybackSchedule { ///@brief Flag is set when used by at least consumer thread. ///Once node is not used by neither it's flag is cleared making it available ///for recycling. - std::atomic_flag active { ATOMIC_FLAG_INIT }; + std::atomic_flag active = ATOMIC_FLAG_INIT; ///@brief Number of samples advanced from the beginning of the current head. Accessed only by consumer thread. size_t offset { 0 }; diff --git a/libraries/lib-time-and-pitch/StaffPadTimeAndPitch.cpp b/libraries/lib-time-and-pitch/StaffPadTimeAndPitch.cpp index 6b1c77be6..94ff191a4 100644 --- a/libraries/lib-time-and-pitch/StaffPadTimeAndPitch.cpp +++ b/libraries/lib-time-and-pitch/StaffPadTimeAndPitch.cpp @@ -37,8 +37,8 @@ int GetFftSize(int sampleRate, bool formantPreservationOn) // If needed some time in the future, we can decouple analysis window and // FFT sizes by zero-padding, allowing for very fine-grained window duration // without compromising performance. - return 1 << (formantPreservationOn ? 11 : 12) + - (int)std::round(std::log2(sampleRate / 44100.)); + return 1 << ((formantPreservationOn ? 11 : 12) + + (int)std::round(std::log2(sampleRate / 44100.))); } std::unique_ptr CreateTimeAndPitch( diff --git a/libraries/lib-wave-track/WaveClip.h b/libraries/lib-wave-track/WaveClip.h index 8e8f263d4..92c366d99 100644 --- a/libraries/lib-wave-track/WaveClip.h +++ b/libraries/lib-wave-track/WaveClip.h @@ -343,7 +343,7 @@ public: void SetRate(int rate); void SetRawAudioTempo(double tempo); - PitchAndSpeedPreset GetPitchAndSpeedPreset() const; + PitchAndSpeedPreset GetPitchAndSpeedPreset() const override; //! Stretches from left to the absolute time (if in expected range) void StretchLeftTo(double to);