/ohos5.0/docs/en/application-dev/media/audio/ |
H A D | volume-management.md | 3 …volume and audio stream volume. The system volume and audio stream volume refer to the volume of a… 7 **AudioVolumeManager** is provided for system volume management. Before using this API, you must ca… 9 …volume information and listen for volume changes. It cannot be used to adjust the system volume. I… 20 You can set an event to listen for system volume changes. 27 console.info(`Volume level: ${volumeEvent.volume} `); 35 …volume is mainly conducted by using system APIs, which are available for the physical volume butto… 40 …volume. However, it can invoke the system volume panel for users to adjust the volume. When the us… 46 …ayer** and **AudioRenderer** classes can be used to set the audio stream volume. The code snippet … 49 let volume = 1.0; // Specified volume. The value range is [0.00-1.00]. The value 1 indicates the m… 50 avPlayer.setVolume(volume); [all …]
|
/ohos5.0/docs/en/application-dev/file-management/ |
H A D | manage-external-storage.md | 13 - Then, the StorageDaemon process checks the volume. The volume transits to the **CHECKING** state. 15 - If the check fails, the volume state changes to **UNMOUNTED**. 17 - For a volume in the **MOUNTED** state: 18 …volume state changes to **EJECTING** and COMMON_EVENT_VOLUME_EJECT is broadcast. After StorageDaem… 31 …l.event.data.VOLUME_REMOVED | **id**: ID of the volume.<br>**diskId**: ID of the disk to which the… 32 …ED | **id**: ID of the volume.<br>**diskId**: ID of the disk to which the volume belongs.<br>**vol… 33 …volume.<br>**diskId**: ID of the disk to which the volume belongs.<br>**volumeState**: state of th… 34 …ent.data.VOLUME_BAD_REMOVAL | **id**: ID of the volume.<br>**diskId**: ID of the disk to which the… 35 …CT | **id**: ID of the volume.<br>**diskId**: ID of the disk to which the volume belongs.<br>**vol… 49 - "usual.event.data.VOLUME_MOUNTED": The volume is mounted. [all …]
|
/ohos5.0/docs/en/application-dev/reference/apis-audio-kit/ |
H A D | ohos-multimedia-avvolumepanel.md | 3 …odule provides the capability of displaying the system volume panel for users to adjust the volume. 5 …volume. However, it can invoke the system volume panel for users to adjust the volume. When the us… 11 …e in use. Currently, DevEco Studio Previewer cannot display the actual volume or adjust the volume. 27 Volume panel, which can be used to display the volume adjustment panel in your application. 41 …volume. The value must be between the minimum volume and the maximum volume supported by the devic… 42 …r) | No| @Prop | Custom parameter of the volume panel. If this parameter is not passed in, the s… 48 |position | [Position](../apis-arkui/arkui-ts/ts-types.md#position) | No| Position of the volume pa… 56 Refer to the sample code below to develop a volume panel: 65 @State volume: number = 0; 71 volumeLevel: this.volume,
|
/ohos5.0/foundation/multimedia/audio_framework/services/audio_policy/client/src/ |
H A D | audio_client_tracker_callback_stub.cpp | 54 float volume = data.ReadFloat(); in OnRemoteRequest() local 55 SetLowPowerVolumeImpl(volume); in OnRemoteRequest() 59 float volume; in OnRemoteRequest() local 60 GetLowPowerVolumeImpl(volume); in OnRemoteRequest() 61 reply.WriteFloat(volume); in OnRemoteRequest() 65 float volume; in OnRemoteRequest() local 66 GetSingleStreamVolumeImpl(volume); in OnRemoteRequest() 67 reply.WriteFloat(volume); in OnRemoteRequest() 121 cb->SetLowPowerVolumeImpl(volume); in SetLowPowerVolumeImpl() 162 cb->GetLowPowerVolumeImpl(volume); in GetLowPowerVolumeImpl() [all …]
|
/ohos5.0/foundation/filemanagement/storage_service/services/storage_manager/volume/test/ |
H A D | notification_test.cpp | 50 std::shared_ptr<VolumeExternal> volume = make_shared<VolumeExternal>(vc); variable 52 notification->NotifyVolumeChange(VolumeState::REMOVED, volume); 74 std::shared_ptr<VolumeExternal> volume = make_shared<VolumeExternal>(vc); variable 76 notification->NotifyVolumeChange(VolumeState::UNMOUNTED, volume); 98 std::shared_ptr<VolumeExternal> volume = make_shared<VolumeExternal>(vc); variable 99 volume->SetFsUuid("uuid1"); 100 volume->SetPath("path1"); 102 notification->NotifyVolumeChange(VolumeState::MOUNTED, volume); 126 notification->NotifyVolumeChange(VolumeState::BAD_REMOVAL, volume); 150 notification->NotifyVolumeChange(VolumeState::EJECTING, volume); [all …]
|
/ohos5.0/foundation/multimedia/audio_framework/services/audio_service/common/src/ |
H A D | audio_common_converter.cpp | 33 float volume) in ConvertBufferTo32Bit() argument 48 *--dst = (int32_t)((*--src << AUDIO_SAMPLE_16BIT_LENGTH) * volume); in ConvertBufferTo32Bit() 59 volume; in ConvertBufferTo32Bit() 67 *--dst = (*--src * volume); in ConvertBufferTo32Bit() 74 *dst++ = *src++ * volume * AUDIO_SAMPLE_32BIT_VALUE; in ConvertBufferTo32Bit() 84 float volume) in ConvertBufferTo16Bit() argument 99 *--dst = (*--src * volume); in ConvertBufferTo16Bit() 116 *--dst = ((*--src >> AUDIO_SAMPLE_16BIT_LENGTH) * volume); in ConvertBufferTo16Bit() 124 *dst++ = *src++ * scale * volume; in ConvertBufferTo16Bit() 143 floatBuffer[i] = sampleValue * volume * (1.0f / AUDIO_SAMPLE_32BIT_VALUE); in ConvertBufferToFloat() [all …]
|
/ohos5.0/docs/zh-cn/third-party-cases/ |
H A D | set-volume-brightness-through-gesture.md | 16  48 Progress({value:this.volume,type:ProgressType.Ring}) 109 // 通过变量volume控制音量进度条的变化 110 Progress({value:this.volume,type:ProgressType.Ring}) 124 this.volume += 1 134 if (this.volume > 0 && this.fingerPosition > 200){ 136 this.volume -= 1 158 @State volume:number = 0 199 Progress({value:this.volume,type:ProgressType.Ring}) 222 this.volume += 1 [all …]
|
/ohos5.0/foundation/filemanagement/storage_service/services/storage_daemon/volume/test/ |
H A D | BUILD.gn | 42 "$ROOT_DIR/storage_daemon/volume/src/process.cpp", 43 "$ROOT_DIR/storage_daemon/volume/src/volume_info.cpp", 78 "$ROOT_DIR/storage_daemon/include/volume", 85 "$ROOT_DIR/storage_daemon/volume/src/process.cpp", 86 "$ROOT_DIR/storage_daemon/volume/src/volume_info.cpp", 87 "$ROOT_DIR/storage_daemon/volume/test/process_test.cpp", 128 "$ROOT_DIR/storage_daemon/volume/src/volume_info.cpp", 162 "$ROOT_DIR/storage_daemon/include/volume", 171 "$ROOT_DIR/storage_daemon/volume/src/process.cpp", 172 "$ROOT_DIR/storage_daemon/volume/src/volume_info.cpp", [all …]
|
/ohos5.0/docs/en/application-dev/reference/apis-core-file-kit/ |
H A D | js-apis-file-volumemanager-sys.md | 3 …for volume and disk management, including obtaining volume information, mounting or unmounting a v… 49 // Do something with the volume array. 126 | 13600005 | Incorrect volume state. | 171 | 13600005 | Incorrect volume state. | 219 | 13600005 | Incorrect volume state. | 264 | 13600005 | Incorrect volume state. | 298 | Promise<[Volume](#volume)> | Promise used to return the volume information obtained.| 369 Obtains information about a volume based on the volume ID. This API uses a promise to return the re… 486 | 13600005 | Incorrect volume state. | 532 | 13600005 | Incorrect volume state. | [all …]
|
/ohos5.0/foundation/multimedia/audio_framework/services/audio_policy/server/src/ |
H A D | audio_client_tracker_callback_proxy.cpp | 61 void AudioClientTrackerCallbackProxy::SetLowPowerVolumeImpl(float volume) in SetLowPowerVolumeImpl() argument 69 data.WriteFloat(static_cast<float>(volume)); in SetLowPowerVolumeImpl() 76 void AudioClientTrackerCallbackProxy::GetLowPowerVolumeImpl(float &volume) in GetLowPowerVolumeImpl() argument 89 volume = reply.ReadFloat(); in GetLowPowerVolumeImpl() 105 volume = reply.ReadFloat(); in GetSingleStreamVolumeImpl() 165 void ClientTrackerCallbackListener::SetLowPowerVolumeImpl(float volume) in SetLowPowerVolumeImpl() argument 168 listener_->SetLowPowerVolumeImpl(volume); in SetLowPowerVolumeImpl() 172 void ClientTrackerCallbackListener::GetLowPowerVolumeImpl(float &volume) in GetLowPowerVolumeImpl() argument 175 listener_->GetLowPowerVolumeImpl(volume); in GetLowPowerVolumeImpl() 179 void ClientTrackerCallbackListener::GetSingleStreamVolumeImpl(float &volume) in GetSingleStreamVolumeImpl() argument [all …]
|
/ohos5.0/foundation/filemanagement/storage_service/services/storage_manager/volume/src/ |
H A D | notification.cpp | 33 …id Notification::NotifyVolumeChange(VolumeState notifyCode, std::shared_ptr<VolumeExternal> volume) in NotifyVolumeChange() argument 37 if (volume == nullptr) { in NotifyVolumeChange() 41 wantParams.SetParam("id", AAFwk::String::Box(volume->GetId())); in NotifyVolumeChange() 42 wantParams.SetParam("diskId", AAFwk::String::Box(volume->GetDiskId())); in NotifyVolumeChange() 43 wantParams.SetParam("fsUuid", AAFwk::String::Box(volume->GetUuid())); in NotifyVolumeChange() 44 wantParams.SetParam("flags", AAFwk::Integer::Box(volume->GetFlags())); in NotifyVolumeChange() 58 wantParams.SetParam("path", AAFwk::String::Box(volume->GetPath())); in NotifyVolumeChange() 59 wantParams.SetParam("fsType", AAFwk::Integer::Box(volume->GetFsType())); in NotifyVolumeChange()
|
H A D | volume_manager_service.cpp | 34 … VolumeManagerService::VolumeStateNotify(VolumeState state, std::shared_ptr<VolumeExternal> volume) in VolumeStateNotify() argument 36 DelayedSingleton<Notification>::GetInstance()->NotifyVolumeChange(state, volume); in VolumeStateNotify() 190 auto volume = it->second; in GetVolumeByUuid() local 191 if (volume->GetUuid() == fsUuid) { in GetVolumeByUuid() 194 vc = *volume; in GetVolumeByUuid() 213 auto volume = it->second; in SetVolumeDescription() local 214 if (volume->GetUuid() == fsUuid) { in SetVolumeDescription() 217 if (volume->GetState() != VolumeState::UNMOUNTED) { in SetVolumeDescription() 223 return sdCommunication->SetVolumeDescription(volume->GetId(), description); in SetVolumeDescription()
|
/ohos5.0/foundation/multimedia/audio_framework/frameworks/native/audiopolicy/test/unittest/volume_change_test/src/ |
H A D | audio_volume_change_unit_test.cpp | 54 g_volumeLevel = volumeEvent.volume; in OnVolumeKeyEvent() 105 int volume = 10; variable 110 result = g_audioManagerInstance->SetVolume(volumeType, volume); 117 EXPECT_EQ(volume, g_volumeLevel); 141 int volume = 10; variable 146 result = g_audioManagerInstance->SetVolume(volumeType, volume); 153 EXPECT_EQ(volume, g_volumeLevel); 176 int volume = 10; variable 181 result = g_audioManagerInstance->SetVolume(volumeType, volume); 188 EXPECT_EQ(volume, g_volumeLevel);
|
/ohos5.0/foundation/multimedia/audio_framework/services/audio_service/test/unittest/ |
H A D | audio_direct_sink_unit_test.cpp | 90 attr.volume = 1.0f; 94 float volume = 1.0f; variable 95 ret = sink->SetVolume(volume, volume); 115 attr.volume = 1.0f; 141 attr.volume = 1.0f; 182 attr.volume = 1.0f; 217 attr.volume = 1.0f; 245 attr.volume = 1.0f; 271 attr.volume = 1.0f; 308 attr.volume = 1.0f; [all …]
|
/ohos5.0/foundation/communication/bluetooth_service/services/bluetooth/external/dummy/include/stub/ |
H A D | telephone_client_service.h | 33 virtual void OnVolumeChanged(int type, int volume) in OnVolumeChanged() argument 37 virtual void OnVolumeChangedForAutotest(int type, int volume) in OnVolumeChangedForAutotest() argument 45 void SetStreamVolume(int type, int volume) in SetStreamVolume() argument 53 void SetHfVolume(int type, int volume) in SetHfVolume() argument 75 void NotifyVolumeChanged(int type, int volume) in NotifyVolumeChanged() argument 79 void NotifyVolumeChangedForAutotest(int type, int volume) in NotifyVolumeChangedForAutotest() argument
|
H A D | telephone_service.h | 47 virtual void OnVolumeChanged(int type, int volume) in OnVolumeChanged() argument 61 virtual void OnVolumeChangedForAutotest(int type, int volume) in OnVolumeChangedForAutotest() argument 127 bool SetStreamVolume(int type, int volume, int flag) in SetStreamVolume() argument 131 bool SetHfVolume(int type, int volume) in SetHfVolume() argument 194 void NotifyVolumeChanged(int type, int volume) in NotifyVolumeChanged() argument 208 void NotifyVolumeChangedForAutotest(int type, int volume) in NotifyVolumeChangedForAutotest() argument
|
/ohos5.0/foundation/multimedia/audio_framework/frameworks/native/audiorenderer/src/ |
H A D | audio_renderer_proxy_obj.cpp | 47 void AudioRendererProxyObj::SetLowPowerVolumeImpl(float volume) in SetLowPowerVolumeImpl() argument 50 renderer->SetLowPowerVolume(volume); in SetLowPowerVolumeImpl() 54 void AudioRendererProxyObj::GetLowPowerVolumeImpl(float &volume) in GetLowPowerVolumeImpl() argument 57 volume = renderer->GetLowPowerVolume(); in GetLowPowerVolumeImpl() 76 void AudioRendererProxyObj::GetSingleStreamVolumeImpl(float &volume) in GetSingleStreamVolumeImpl() argument 79 volume = renderer->GetSingleStreamVolume(); in GetSingleStreamVolumeImpl()
|
/ohos5.0/foundation/multimedia/audio_framework/frameworks/native/audiocapturer/src/ |
H A D | audio_capturer_proxy_obj.cpp | 40 void AudioCapturerProxyObj::SetLowPowerVolumeImpl(float volume) in SetLowPowerVolumeImpl() argument 44 void AudioCapturerProxyObj::GetLowPowerVolumeImpl(float &volume) in GetLowPowerVolumeImpl() argument 46 volume = 1.0; in GetLowPowerVolumeImpl() 49 void AudioCapturerProxyObj::GetSingleStreamVolumeImpl(float &volume) in GetSingleStreamVolumeImpl() argument 51 volume = 0; in GetSingleStreamVolumeImpl()
|
/ohos5.0/foundation/multimedia/audio_framework/services/audio_policy/server/include/ |
H A D | audio_client_tracker_callback_proxy.h | 34 virtual void SetLowPowerVolumeImpl(float volume) override; 35 virtual void GetLowPowerVolumeImpl(float &volume) override; 38 virtual void GetSingleStreamVolumeImpl(float &volume) override; 51 virtual void SetLowPowerVolumeImpl(float volume) override; 52 virtual void GetLowPowerVolumeImpl(float &volume) override; 55 virtual void GetSingleStreamVolumeImpl(float &volume) override;
|
/ohos5.0/foundation/systemabilitymgr/safwk/test/mock/common/audio_ability/src/ |
H A D | test_audio_ability.cpp | 43 int TestAudioAbility::AddVolume(int volume) in AddVolume() argument 45 …HiLog::Info(label_, "TestAudioAbility:: %{public}s called, volume = %{public}d", __func__, volume); in AddVolume() 46 return (volume + 1); in AddVolume() 49 int32_t TestAudioAbility::ReduceVolume(int volume) in ReduceVolume() argument 51 …HiLog::Info(label_, "TestAudioAbility:: %{public}s called, volume = %{public}d", __func__, volume); in ReduceVolume() 52 return (volume - 1); in ReduceVolume()
|
/ohos5.0/foundation/multimedia/audio_framework/frameworks/js/napi/audiomanager/test/unittest/group_manager_test/ |
H A D | AudioGroupManagerJsUnitTest.js | 87 let volume = 4; 119 let volume = -1; 140 let volume = 17; 161 let volume = 6; 193 let volume = -3; 214 let volume = 16; 235 let volume = 6; 285 let volume = 6; 316 let volume = 6; 347 let volume = 6; [all …]
|
/ohos5.0/foundation/multimedia/player_framework/test/unittest/audio_haptic_test/ |
H A D | audio_haptic_unit_test.cpp | 580 float volume = 0.0f; variable 594 float volume = 0.5f; variable 608 float volume = 1.0f; variable 636 float volume = 1.5f; variable 650 float volume = 0.0f; variable 664 float volume = 0.5f; variable 678 float volume = 1.0f; variable 706 float volume = 1.5f; variable 720 float volume = 0.0f; variable 734 float volume = 0.5f; variable [all …]
|
/ohos5.0/foundation/filemanagement/storage_service/services/storage_daemon/disk/test/ |
H A D | BUILD.gn | 49 "$ROOT_DIR/volume/src/external_volume_info.cpp", 50 "$ROOT_DIR/volume/src/process.cpp", 51 "$ROOT_DIR/volume/src/volume_info.cpp", 52 "$ROOT_DIR/volume/src/volume_manager.cpp", 101 "$ROOT_DIR/volume/src/external_volume_info.cpp", 102 "$ROOT_DIR/volume/src/process.cpp", 103 "$ROOT_DIR/volume/src/volume_info.cpp", 104 "$ROOT_DIR/volume/src/volume_manager.cpp",
|
/ohos5.0/foundation/multimedia/media_lite/interfaces/kits/player_lite/js/builtin/src/ |
H A D | audio_player.cpp | 245 double volume = volume_ * 100; in CreatePlayer() local 246 if (player_->SetVolume(volume, volume) != 0) { in CreatePlayer() 495 bool AudioPlayer::SetVolume(double volume) in SetVolume() argument 497 if (volume < 0 || volume > 1) { in SetVolume() 501 float parsedVolume = static_cast<float>(volume * MAX_VOLUME) ; in SetVolume() 506 volume_ = volume; in SetVolume() 512 double volume = muted ? 0.0 : (volume_ * MILLISECONDS_PER_SECOND); in SetMuted() local 513 if (player_->SetVolume(volume, volume) != 0) { in SetMuted()
|
/ohos5.0/docs/zh-cn/application-dev/reference/apis-core-file-kit/ |
H A D | js-apis-file-volumemanager-sys.md | 30 | Promise<[Volume](#volume)[]> | Promise对象,返回当前所有可获得的卷设备信息 | 126 | 13600005 | Incorrect volume state. | 171 | 13600005 | Incorrect volume state. | 219 | 13600005 | Incorrect volume state. | 264 | 13600005 | Incorrect volume state. | 298 | Promise<[Volume](#volume)> | Promise对象,返回当前所有可获得的卷设备信息 | 385 | Promise<[Volume](#volume)> | Promise对象,返回当前所有可获得的卷设备信息 | 486 | 13600005 | Incorrect volume state. | 532 | 13600005 | Incorrect volume state. | 581 | 13600005 | Incorrect volume state. | [all …]
|