Home
last modified time | relevance | path

Searched refs:hapticUri (Results 1 – 20 of 20) sorted by relevance

/ohos5.0/foundation/multimedia/player_framework/frameworks/native/system_sound_manager/system_tone_player/
H A Dsystem_tone_player_impl.cpp56 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 Dsystem_tone_player_impl.h72 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 Dringtone_player_impl.cpp84 string hapticUri = audioUri; in GetNewHapticUriForAudioUri() local
91 hapticUri.rfind(AUDIO_FORMAT_STR) == hapticUri.length() - AUDIO_FORMAT_STR.length()) { in GetNewHapticUriForAudioUri()
92hapticUri.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()
118hapticUri.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 Dringtone_player_impl.h64 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 Dsystem_sound_vibrator.cpp70 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 Dsystem_sound_vibrator.h32 static int32_t StartVibratorForSystemTone(const std::string &hapticUri);
/ohos5.0/foundation/multimedia/player_framework/test/unittest/audio_haptic_test/
H A Daudio_haptic_unit_test.cpp100 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 Daudio_haptic_vibrator_impl.cpp110 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 Daudio_haptic_manager_impl.cpp106 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 Daudio_haptic_vibrator_impl.h51 int32_t OpenHapticFile(const std::string &hapticUri);
H A Daudio_haptic_manager_impl.h44 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 Djs-apis-audioHaptic.md63 registerSource(audioUri: string, hapticUri: string): Promise&lt;number&gt;
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 Djs-apis-audioHaptic.md63 registerSource(audioUri: string, hapticUri: string): Promise&lt;number&gt;
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 Dusing-audiohaptic-for-playback.md27 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 Daudio_haptic_manager.h32 virtual int32_t RegisterSource(const std::string &audioUri, const std::string &hapticUri) = 0;
H A Daudio_haptic_player.h66 std::string hapticUri = ""; member
/ohos5.0/docs/en/application-dev/media/audio/
H A Dusing-audiohaptic-for-playback.md27 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 Daudio_haptic_manager_napi.h90 std::string hapticUri; member
/ohos5.0/foundation/multimedia/player_framework/frameworks/js/audio_haptic/src/
H A Daudio_haptic_manager_napi.cpp249 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 DSamples.md1779 * 使用audioHapticManager.registerSource(audioUri, hapticUri)接口注册音频和振动资源的Uri,返回注册资源的source id。