diff --git a/vibration_convert/core/native/test/unittest/data.h b/vibration_convert/core/native/test/unittest/data.h index 40960a2f9f1fc422e2dce0ea43a861c587314498..e44b7c0a72c57f20d6605b7030c319f8fb1dab58 100644 --- a/vibration_convert/core/native/test/unittest/data.h +++ b/vibration_convert/core/native/test/unittest/data.h @@ -38,6 +38,6 @@ std::vector AudioSrcDatas = { 0.00393714383244514, 0.0 }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // UT_TEST_DATA_H \ No newline at end of file diff --git a/vibration_convert/core/native/test/unittest/generate_json_test.cpp b/vibration_convert/core/native/test/unittest/generate_json_test.cpp index f0e430da9f6f95eea9173214b8b3e638209b10c5..67bdca0981a4f0b2471b9717654f9177f01b36e7 100644 --- a/vibration_convert/core/native/test/unittest/generate_json_test.cpp +++ b/vibration_convert/core/native/test/unittest/generate_json_test.cpp @@ -103,5 +103,5 @@ HWTEST_F(GenerateJsonFileTest, GenerateJsonFileTest_002, TestSize.Level1) int32_t ret = vibrationConvertCore.ConvertAudioToHaptic(audioSetting, data, vtEvents); EXPECT_EQ(ret, 0); } -} // 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/utils/include/audio_utils.h b/vibration_convert/core/utils/include/audio_utils.h index 57e3f681c4ad8e15530cf86bf7d387f3edc39e25..808cd8215f975ec5222fc250f830f7a3a8f1023d 100644 --- a/vibration_convert/core/utils/include/audio_utils.h +++ b/vibration_convert/core/utils/include/audio_utils.h @@ -34,7 +34,7 @@ namespace Sensors { namespace { constexpr double DB_TO_AMP_COEF { 0.05 }; constexpr double AMP_TO_DB_COEF { 20.0 }; -} // namespace +} // namespace /** *@brief Basic processing of audio, called by other modules. @@ -102,6 +102,6 @@ public: */ std::vector PadData(const std::vector &data, int32_t hopLength); }; -} // namespace Sensors -} // namespace OHOS -#endif \ No newline at end of file +} // namespace Sensors +} // namespace OHOS +#endif // AUDIO_UTILS_H \ No newline at end of file diff --git a/vibration_convert/core/utils/include/utils.h b/vibration_convert/core/utils/include/utils.h index 07689309dbbdb69263aa8f7964c13fa343b1778b..e51fa0562198c90700dbbebf7401e6103d75d2b9 100644 --- a/vibration_convert/core/utils/include/utils.h +++ b/vibration_convert/core/utils/include/utils.h @@ -47,7 +47,7 @@ constexpr double F_THREE = 3.0; constexpr double SAMPLE_IN_MS = 1000.0; constexpr double INTERSITY_BOUNDARY_POINT = 0.25; constexpr double INTERSITY_NUMBER_BOUNDARY_POINT = 0.75; -} // namespace +} // namespace enum WindowType { WND_TYPE_BARTLETT = 1, @@ -205,6 +205,6 @@ inline double ConvertHtkHz(double mels) } return freqs; } -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // CONVERSION_UTILS_H \ No newline at end of file diff --git a/vibration_convert/core/utils/src/audio_utils.cpp b/vibration_convert/core/utils/src/audio_utils.cpp index 4445058a03300a663af5d6f204150e574a20141c..890bed1fe6a659ad5b650cd354822fb602a85b07 100644 --- a/vibration_convert/core/utils/src/audio_utils.cpp +++ b/vibration_convert/core/utils/src/audio_utils.cpp @@ -39,7 +39,7 @@ constexpr double MTOF_ARRAY[MTOF_ARRAY_SIZE + 1] = { 3729.31, 3951.066406, 4186.009277, 4434.921875, 4698.63623, 4978.031738, 5274.041016, 5587.651855, 5919.910645, 6271.926758, 6644.875, 7040., 7458.620117, 7902.132812, 8372.018555, 8869.84375, 9397.272461, 9956.063477, 10548.082031, 11175.303711, 11839.821289, 12543.853516, 13289.75 }; -} // namespace +} // namespace double AudioUtils::ConvertMtof(int32_t midinote) { @@ -61,5 +61,5 @@ std::vector AudioUtils::PadData(const std::vector &data, int32_t paddingData.insert(paddingData.end(), hopLength / 2, 0); return paddingData; } -} // 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/utils/src/utils.cpp b/vibration_convert/core/utils/src/utils.cpp index dded5ba1424c0f3cedb649f70048fce2c2dcccfc..12d09759642e8ba5724efd9b4ef88c9cd89b72e7 100644 --- a/vibration_convert/core/utils/src/utils.cpp +++ b/vibration_convert/core/utils/src/utils.cpp @@ -37,7 +37,7 @@ namespace{ constexpr double PERCENTAGE_RANGE = 100.0; constexpr int32_t VOICE_MIN_INTENSITY_NORM = 25; constexpr size_t MAX_SIZE = 26460000; -} // namespace +} // namespace bool IsPowerOfTwo(uint32_t x) { @@ -259,5 +259,5 @@ std::vector ObtainAmplitudeEnvelop(const std::vector &data, size } return enery; } -} // 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/interfaces/js/include/vibrator_convert_js.h b/vibration_convert/interfaces/js/include/vibrator_convert_js.h index 5ee8b6ba9583731835f13f46b5c8b2f858dfa7ee..92f4429a7338d56acd5045f0611fae315670eedd 100644 --- a/vibration_convert/interfaces/js/include/vibrator_convert_js.h +++ b/vibration_convert/interfaces/js/include/vibrator_convert_js.h @@ -45,6 +45,6 @@ private: std::mutex mutex_; napi_ref contextRef_ { nullptr }; }; -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // VIBRATOR_CONVERT_JS_H \ No newline at end of file diff --git a/vibration_convert/interfaces/js/include/vibrator_convert_napi_utils.h b/vibration_convert/interfaces/js/include/vibrator_convert_napi_utils.h index 81129bc81b068cbef4dadc960c35f605323304f1..a847c903b04d5767af044748ec70e8285e547a82 100644 --- a/vibration_convert/interfaces/js/include/vibrator_convert_napi_utils.h +++ b/vibration_convert/interfaces/js/include/vibrator_convert_napi_utils.h @@ -82,6 +82,6 @@ napi_value GetAudioToHapticInfo(sptr asyncCallbackInfo); void EmitHapticAsyncCallbackWork(sptr async_callback_info); void EmitHapticPromiseWork(sptr asyncCallbackInfo); int64_t GetFileSize(int32_t fd); -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS #endif // VIBRATOR_CONVERT_NAPI_UTILS_H \ No newline at end of file diff --git a/vibration_convert/interfaces/js/src/vibrator_convert_js.cpp b/vibration_convert/interfaces/js/src/vibrator_convert_js.cpp index 617dec03aa0d9e5e34a7bc296f00716a9f975025..8dc769a8c2a6f812054d85f9ddeda458d1ceddee 100644 --- a/vibration_convert/interfaces/js/src/vibrator_convert_js.cpp +++ b/vibration_convert/interfaces/js/src/vibrator_convert_js.cpp @@ -30,7 +30,7 @@ namespace Sensors { namespace { const char* CONVERT = "convert"; const char* CONVERT_CLASS = "convert_class"; -} // namespace +} // namespace std::shared_ptr VibratorConvert::GetInterfaces() { @@ -295,5 +295,5 @@ napi_value VibratorConvert::ConvertAudioToHaptic(napi_env env, napi_callback_inf EmitHapticPromiseWork(asyncCallbackInfo); return promise; } -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS diff --git a/vibration_convert/interfaces/js/src/vibrator_convert_napi_utils.cpp b/vibration_convert/interfaces/js/src/vibrator_convert_napi_utils.cpp index 3aa211aedd585d8ec5769326fb1fb493d4a6f3f3..ad158a5caf05616b3cfea3836f127cbbdbd6febd 100644 --- a/vibration_convert/interfaces/js/src/vibrator_convert_napi_utils.cpp +++ b/vibration_convert/interfaces/js/src/vibrator_convert_napi_utils.cpp @@ -33,7 +33,7 @@ namespace Sensors { namespace { constexpr int32_t RESULT_LENGTH = 2; constexpr int64_t INVALID_FILE_SIZE = -1; -} // namespace +} // namespace AsyncCallbackInfo::~AsyncCallbackInfo() { @@ -385,5 +385,5 @@ void EmitHapticPromiseWork(sptr asyncCallbackInfo) asyncCallbackInfo->DecStrongRef(nullptr); } } -} // namespace Sensors -} // namespace OHOS +} // namespace Sensors +} // namespace OHOS