From 77702ab5233a05403029141d38584feadf326f7e Mon Sep 17 00:00:00 2001 From: liyaoyao777 Date: Tue, 27 Aug 2024 11:30:45 +0800 Subject: [PATCH] Rectify namespace irregularities Signed-off-by: liyaoyao777 --- .../intensity_processor/include/intensity_processor.h | 4 ++-- .../intensity_processor/src/intensity_processor.cpp | 6 +++--- vibration_convert/core/algorithm/onset/include/onset.h | 4 ++-- vibration_convert/core/algorithm/onset/src/onset.cpp | 6 +++--- .../core/algorithm/peak_finder/include/peak_finder.h | 4 ++-- .../core/algorithm/peak_finder/src/peak_finder.cpp | 6 +++--- vibration_convert/core/native/include/audio_parsing.h | 4 ++-- .../core/native/include/generate_vibration_json_file.h | 4 ++-- .../core/native/include/vibration_convert_core.h | 4 ++-- vibration_convert/core/native/src/audio_parsing.cpp | 6 +++--- .../core/native/src/generate_vibration_json_file.cpp | 4 ++-- .../core/native/src/vibration_convert_core.cpp | 6 +++--- 12 files changed, 29 insertions(+), 29 deletions(-) diff --git a/vibration_convert/core/algorithm/intensity_processor/include/intensity_processor.h b/vibration_convert/core/algorithm/intensity_processor/include/intensity_processor.h index 3ca73839..1c80979e 100644 --- a/vibration_convert/core/algorithm/intensity_processor/include/intensity_processor.h +++ b/vibration_convert/core/algorithm/intensity_processor/include/intensity_processor.h @@ -86,6 +86,6 @@ public: */ std::vector VolumeInDB(const std::vector &data, int32_t hopLength); }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // INTENSITY_PROCESSOR_H \ No newline at end of file diff --git a/vibration_convert/core/algorithm/intensity_processor/src/intensity_processor.cpp b/vibration_convert/core/algorithm/intensity_processor/src/intensity_processor.cpp index 6bcf8f86..3f457c7b 100644 --- a/vibration_convert/core/algorithm/intensity_processor/src/intensity_processor.cpp +++ b/vibration_convert/core/algorithm/intensity_processor/src/intensity_processor.cpp @@ -26,7 +26,7 @@ namespace OHOS { namespace Sensors { namespace { constexpr double VOLUME_DB_COEF { 10.0 }; -} // namespace +} // namespace std::vector IntensityProcessor::GetRMS(const std::vector &data, int32_t hopLength, bool centerFlag) { @@ -131,5 +131,5 @@ std::vector IntensityProcessor::VolumeInDB(const std::vector &da } return db; } -} // namespace Sensors -} // namespace OHOS \ No newline at end of file +} // namespace Sensors +} // namespace OHOS \ No newline at end of file diff --git a/vibration_convert/core/algorithm/onset/include/onset.h b/vibration_convert/core/algorithm/onset/include/onset.h index e4ad6ad1..6d0d1aee 100644 --- a/vibration_convert/core/algorithm/onset/include/onset.h +++ b/vibration_convert/core/algorithm/onset/include/onset.h @@ -76,6 +76,6 @@ private: bool htkFlag_ { false }; OnsetInfo onsetInfo_; }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // ONSET_H \ No newline at end of file diff --git a/vibration_convert/core/algorithm/onset/src/onset.cpp b/vibration_convert/core/algorithm/onset/src/onset.cpp index 1d6d07a5..16028363 100644 --- a/vibration_convert/core/algorithm/onset/src/onset.cpp +++ b/vibration_convert/core/algorithm/onset/src/onset.cpp @@ -40,7 +40,7 @@ constexpr uint32_t SEMITONE_NUM_COEFFS = 13; constexpr double ONSET_PEAK_THRESHOLD_RATIO = 0.4; constexpr double MIN_FREQ = 0.0; constexpr double MAX_FREQ = SAMPLE_RATE / 2.0; -} // namespace +} // namespace std::vector Onset::MatrixDot(size_t matrixAcols, const std::vector &matrixA, size_t matrixBcols, const std::vector &matrixB) @@ -261,5 +261,5 @@ int32_t Onset::CheckOnset(const std::vector &data, int32_t nFft, int32_t onsetInfo = onsetInfo_; return Sensors::SUCCESS; } -} // namespace Sensors -} // namespace OHOS \ No newline at end of file +} // namespace Sensors +} // namespace OHOS \ No newline at end of file diff --git a/vibration_convert/core/algorithm/peak_finder/include/peak_finder.h b/vibration_convert/core/algorithm/peak_finder/include/peak_finder.h index 2a317384..c3bf9dc4 100644 --- a/vibration_convert/core/algorithm/peak_finder/include/peak_finder.h +++ b/vibration_convert/core/algorithm/peak_finder/include/peak_finder.h @@ -190,6 +190,6 @@ private: std::vector voiceSegmentFlag_; int32_t hopLength_ { 1024 }; }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // PEAK_FINDER_H \ No newline at end of file diff --git a/vibration_convert/core/algorithm/peak_finder/src/peak_finder.cpp b/vibration_convert/core/algorithm/peak_finder/src/peak_finder.cpp index efa75d0a..a33a004e 100644 --- a/vibration_convert/core/algorithm/peak_finder/src/peak_finder.cpp +++ b/vibration_convert/core/algorithm/peak_finder/src/peak_finder.cpp @@ -46,7 +46,7 @@ constexpr int32_t HUNDRED_POINT_DESCENT_HEIGHT { 100 }; constexpr double DROP_HIGHT { 1.0 }; constexpr int32_t AMPLITUDE_ENVELOPE_HOP_LENGTH { 256 }; constexpr double DROP_HIGHT_THRESHOLD { 0.3 }; // 30% -} // namespace +} // namespace std::vector PeakFinder::ExtractValues(const std::vector &envelope, const std::vector &idxs) { @@ -790,5 +790,5 @@ int32_t PeakFinder::EstimateDesentEnergy(const std::vector &data, double dutyCycle = totalEnergy / virtualWholeEnergy; return Sensors::SUCCESS; } -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS diff --git a/vibration_convert/core/native/include/audio_parsing.h b/vibration_convert/core/native/include/audio_parsing.h index 094ce211..fb837bfc 100644 --- a/vibration_convert/core/native/include/audio_parsing.h +++ b/vibration_convert/core/native/include/audio_parsing.h @@ -46,6 +46,6 @@ private: AudioData audioData_; AttributeChunk attributeChunk_; }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // AUDIO_PARSING_H \ No newline at end of file diff --git a/vibration_convert/core/native/include/generate_vibration_json_file.h b/vibration_convert/core/native/include/generate_vibration_json_file.h index a9a60427..57d4e744 100644 --- a/vibration_convert/core/native/include/generate_vibration_json_file.h +++ b/vibration_convert/core/native/include/generate_vibration_json_file.h @@ -33,6 +33,6 @@ public: template int32_t DebugJsonFile(const std::string &pathName, const std::vector &srcDatas); }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // GENERATE_VIBRATION_JSON_FILE_H \ No newline at end of file diff --git a/vibration_convert/core/native/include/vibration_convert_core.h b/vibration_convert/core/native/include/vibration_convert_core.h index 2acbd671..11238f62 100644 --- a/vibration_convert/core/native/include/vibration_convert_core.h +++ b/vibration_convert/core/native/include/vibration_convert_core.h @@ -205,6 +205,6 @@ private: Onset onset_; int32_t onsetMinSkip_ { 0 }; }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // VIBRATION_CONVERT_CORE_H \ No newline at end of file diff --git a/vibration_convert/core/native/src/audio_parsing.cpp b/vibration_convert/core/native/src/audio_parsing.cpp index 1abf1d8b..4da33cb1 100644 --- a/vibration_convert/core/native/src/audio_parsing.cpp +++ b/vibration_convert/core/native/src/audio_parsing.cpp @@ -42,7 +42,7 @@ constexpr int32_t AUDIO_DATA_MAX_NUMBER = 100000; constexpr int64_t LSEEK_FAIL = -1; constexpr int32_t TIME_MS = 1000; constexpr int32_t BITS_PER_BYTE = 8; -} // namespace +} // namespace AudioParsing::AudioParsing(const RawFileDescriptor &rawFd) { @@ -210,5 +210,5 @@ void AudioParsing::PrintAttributeChunk() SEN_HILOGD("dataID:%{public}.4s", attributeChunk_.dataID); SEN_HILOGD("dataSize:%{public}u", attributeChunk_.dataSize); } -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS diff --git a/vibration_convert/core/native/src/generate_vibration_json_file.cpp b/vibration_convert/core/native/src/generate_vibration_json_file.cpp index 3dcc64e8..467290df 100644 --- a/vibration_convert/core/native/src/generate_vibration_json_file.cpp +++ b/vibration_convert/core/native/src/generate_vibration_json_file.cpp @@ -93,5 +93,5 @@ int32_t GenerateVibrationJsonFile::DebugJsonFile(const std::string &pathName, co ofs.close(); return Sensors::SUCCESS; } -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS diff --git a/vibration_convert/core/native/src/vibration_convert_core.cpp b/vibration_convert/core/native/src/vibration_convert_core.cpp index 89d3a0e2..aca84d95 100644 --- a/vibration_convert/core/native/src/vibration_convert_core.cpp +++ b/vibration_convert/core/native/src/vibration_convert_core.cpp @@ -64,7 +64,7 @@ constexpr double AMPLITUDE_DB_MAX { 1.0 }; constexpr int32_t ADSR_BOUNDARY_STATUS_NONE { 0 }; constexpr int32_t ADSR_BOUNDARY_STATUS_ONE { 1 }; constexpr int32_t ADSR_BOUNDARY_STATUS_BOTH { 2 }; -} // namespace +} // namespace int32_t VibrationConvertCore::GetAudioData() { @@ -1196,5 +1196,5 @@ void VibrationConvertCore::AddContinuousEventData(const ContinuousEvent &continu { continuousEvents_.push_back(continuousEvent); } -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS -- Gitee