/ohos5.0/foundation/multimedia/player_framework/frameworks/native/system_sound_manager/system_tone_player/ |
H A D | system_tone_player_impl.cpp | 56 hapticUri.replace(0, hapticUri.rfind("/"), GENTLE_HAPTIC_PATH); in FormateHapticUri() 59 return hapticUri; in FormateHapticUri() 71 std::string hapticUri = ""; in FindHapticUriByAudioUri() local 76 return hapticUri; in FindHapticUriByAudioUri() 80 isSupported = !hapticUri.empty() && IsFileExisting(hapticUri); in FindHapticUriByAudioUri() 81 return hapticUri; in FindHapticUriByAudioUri() 230 string hapticUri = audioUri; in GetNewHapticUriForAudioUri() local 240 return hapticUri; in GetNewHapticUriForAudioUri() 252 if (hapticUri.empty()) { in GetNewHapticUriForAudioUri() 265 if (!hapticUri.empty()) { in GetNewHapticUriForAudioUri() [all …]
|
H A D | system_tone_player_impl.h | 72 int32_t RegisterSource(const std::string &audioUri, const std::string &hapticUri);
|
/ohos5.0/foundation/multimedia/player_framework/frameworks/native/system_sound_manager/ringtone_player/ |
H A D | ringtone_player_impl.cpp | 84 string hapticUri = audioUri; in GetNewHapticUriForAudioUri() local 91 hapticUri.rfind(AUDIO_FORMAT_STR) == hapticUri.length() - AUDIO_FORMAT_STR.length()) { in GetNewHapticUriForAudioUri() 92 …hapticUri.replace(hapticUri.rfind(AUDIO_FORMAT_STR), AUDIO_FORMAT_STR.length(), HAPTIC_FORMAT_STR); in GetNewHapticUriForAudioUri() 94 return hapticUri; in GetNewHapticUriForAudioUri() 103 if (hapticUri.empty()) { in GetNewHapticUriForAudioUri() 108 return hapticUri; in GetNewHapticUriForAudioUri() 113 std::string hapticUri = ""; in GetHapticUriForAudioUri() local 117 hapticUri = audioUri; in GetHapticUriForAudioUri() 118 …hapticUri.replace(hapticUri.rfind(AUDIO_FORMAT_STR), AUDIO_FORMAT_STR.length(), HAPTIC_FORMAT_STR); in GetHapticUriForAudioUri() 121 if (hapticUri == "" || !IsFileExisting(hapticUri)) { in GetHapticUriForAudioUri() [all …]
|
H A D | ringtone_player_impl.h | 64 int32_t RegisterSource(const std::string &audioUri, const std::string &hapticUri);
|
/ohos5.0/foundation/multimedia/player_framework/frameworks/native/system_sound_manager/system_sound_vibrator/ |
H A D | system_sound_vibrator.cpp | 70 int32_t SystemSoundVibrator::StartVibratorForSystemTone(const std::string &hapticUri) in StartVibratorForSystemTone() argument 72 MEDIA_LOGI("Start vibrator with hapticUri %{public}s", hapticUri.c_str()); in StartVibratorForSystemTone() 79 int32_t fd = ExtractFd(hapticUri); in StartVibratorForSystemTone() 83 CHECK_AND_RETURN_RET_LOG((strlen(hapticUri.c_str()) < PATH_MAX) && in StartVibratorForSystemTone() 84 …(realpath(hapticUri.c_str(), realPathRes) != nullptr), MSERR_OPEN_FILE_FAILED, "Invalid file path … in StartVibratorForSystemTone()
|
H A D | system_sound_vibrator.h | 32 static int32_t StartVibratorForSystemTone(const std::string &hapticUri);
|
/ohos5.0/foundation/multimedia/player_framework/test/unittest/audio_haptic_test/ |
H A D | audio_haptic_unit_test.cpp | 100 std::string hapticUri = HAPTIC_TEST_URI; variable 134 std::string hapticUri = HAPTIC_TEST_URI; variable 184 std::string hapticUri = HAPTIC_TEST_URI; variable 205 std::string hapticUri = HAPTIC_TEST_URI; variable 281 std::string hapticUri = HAPTIC_TEST_URI; variable 307 std::string hapticUri = HAPTIC_TEST_URI; variable 333 std::string hapticUri = HAPTIC_TEST_URI; variable 359 std::string hapticUri = HAPTIC_TEST_URI; variable 385 std::string hapticUri = HAPTIC_TEST_URI; variable 404 std::string hapticUri = HAPTIC_TEST_URI; variable [all …]
|
/ohos5.0/foundation/multimedia/player_framework/frameworks/native/audio_haptic/ |
H A D | audio_haptic_vibrator_impl.cpp | 110 int32_t AudioHapticVibratorImpl::OpenHapticFile(const std::string &hapticUri) in OpenHapticFile() argument 114 int32_t oldFd = ExtractFd(hapticUri); in OpenHapticFile() 118 MEDIA_LOGE("OpenHapticFile: dup failed, file path: %{public}s", hapticUri.c_str()); in OpenHapticFile() 125 if (!PathToRealPath(hapticUri, absFilePath)) { in OpenHapticFile() 126 MEDIA_LOGE("file is not real path, file path: %{private}s", hapticUri.c_str()); in OpenHapticFile() 131 errno, hapticUri.c_str()); in OpenHapticFile() 135 newFd = open(hapticUri.c_str(), O_RDONLY); in OpenHapticFile() 138 … MEDIA_LOGE("OpenHapticFile: open file failed, file path: %{public}s", hapticUri.c_str()); in OpenHapticFile() 166 hapticSource.hapticUri.c_str(), hapticSource.effectId.c_str(), streamUsage); in PreLoad() 181 if (hapticSource.hapticUri == "") { in PreLoad() [all …]
|
H A D | audio_haptic_manager_impl.cpp | 106 if (!info->hapticSource_.hapticUri.empty()) { in ~AudioHapticManagerImpl() 107 int32_t fd = ExtractFd(info->hapticSource_.hapticUri); in ~AudioHapticManagerImpl() 143 …t AudioHapticManagerImpl::RegisterSource(const std::string &audioUri, const std::string &hapticUri) in RegisterSource() argument 156 std::string hapticUriStr = DupFdFromUri(hapticUri); in RegisterSource() 184 if (!info->hapticSource_.hapticUri.empty()) { in UnregisterSource() 185 int32_t fd = ExtractFd(info->hapticSource_.hapticUri); in UnregisterSource()
|
H A D | audio_haptic_vibrator_impl.h | 51 int32_t OpenHapticFile(const std::string &hapticUri);
|
H A D | audio_haptic_manager_impl.h | 44 int32_t RegisterSource(const std::string &audioUri, const std::string &hapticUri) override;
|
/ohos5.0/docs/zh-cn/application-dev/reference/apis-audio-kit/ |
H A D | js-apis-audioHaptic.md | 63 registerSource(audioUri: string, hapticUri: string): Promise<number> 96 let hapticUri = 'data/hapticTest.json'; // 需更改为目标振动资源的Uri 99 audioHapticManagerInstance.registerSource(audioUri, hapticUri).then((value: number) => { 135 let hapticUri = 'data/hapticTest.json'; // 需更改为目标振动资源的Uri 138 audioHapticManagerInstance.registerSource(audioUri, hapticUri).then((value: number) => { 182 let hapticUri = 'data/hapticTest.json'; // 需更改为目标振动资源的Uri 185 audioHapticManagerInstance.registerSource(audioUri, hapticUri).then((value: number) => { 228 let hapticUri = 'data/hapticTest.json'; // 需更改为目标振动资源的Uri 231 audioHapticManagerInstance.registerSource(audioUri, hapticUri).then((value: number) => { 286 let hapticUri = 'data/hapticTest.json'; // 需更改为目标振动资源的Uri [all …]
|
/ohos5.0/docs/en/application-dev/reference/apis-audio-kit/ |
H A D | js-apis-audioHaptic.md | 63 registerSource(audioUri: string, hapticUri: string): Promise<number> 96 let hapticUri = 'data/hapticTest.json'; // Change it to the URI of the target haptic source. 99 audioHapticManagerInstance.registerSource(audioUri, hapticUri).then((value: number) => { 135 let hapticUri = 'data/hapticTest.json'; // Change it to the URI of the target haptic source. 138 audioHapticManagerInstance.registerSource(audioUri, hapticUri).then((value: number) => { 182 let hapticUri = 'data/hapticTest.json'; // Change it to the URI of the target haptic source. 185 audioHapticManagerInstance.registerSource(audioUri, hapticUri).then((value: number) => { 228 let hapticUri = 'data/hapticTest.json'; // Change it to the URI of the target haptic source. 231 audioHapticManagerInstance.registerSource(audioUri, hapticUri).then((value: number) => { 286 let hapticUri = 'data/hapticTest.json'; // Change it to the URI of the target haptic source. [all …]
|
/ohos5.0/docs/zh-cn/application-dev/media/audio/ |
H A D | using-audiohaptic-for-playback.md | 27 let hapticUri = 'data/hapticTest.json'; // 需更改为目标振动资源的Uri 30 audioHapticManagerInstance.registerSource(audioUri, hapticUri).then((value: number) => {
|
/ohos5.0/foundation/multimedia/player_framework/interfaces/inner_api/native/audio_haptic/include/ |
H A D | audio_haptic_manager.h | 32 virtual int32_t RegisterSource(const std::string &audioUri, const std::string &hapticUri) = 0;
|
H A D | audio_haptic_player.h | 66 std::string hapticUri = ""; member
|
/ohos5.0/docs/en/application-dev/media/audio/ |
H A D | using-audiohaptic-for-playback.md | 27 let hapticUri = 'data/hapticTest.json'; // Change it to the URI of the target haptic source. 30 audioHapticManagerInstance.registerSource(audioUri, hapticUri).then((value: number) => {
|
/ohos5.0/foundation/multimedia/player_framework/frameworks/js/audio_haptic/include/ |
H A D | audio_haptic_manager_napi.h | 90 std::string hapticUri; member
|
/ohos5.0/foundation/multimedia/player_framework/frameworks/js/audio_haptic/src/ |
H A D | audio_haptic_manager_napi.cpp | 249 asyncContext->hapticUri = std::string(buffer); in RegisterSource() 276 if (context->audioUri.empty() || context->hapticUri.empty()) { in AsyncRegisterSource() 280 RegisterSource(context->audioUri, context->hapticUri); in AsyncRegisterSource()
|
/ohos5.0/docs/zh-cn/application-dev/ |
H A D | Samples.md | 1779 * 使用audioHapticManager.registerSource(audioUri, hapticUri)接口注册音频和振动资源的Uri,返回注册资源的source id。
|