-
Notifications
You must be signed in to change notification settings - Fork 0
Core Volume Control Overview
Mr.P edited this page Aug 25, 2026
·
2 revisions
Volume Control exposes the device's volume-setting capability, its current volume snapshot, and commands for setting or stepping supported volume channels.
Browse the generated Wiki navigation for the pages in this section.
- Connect to the Device - Wait until the device is connected and ready.
-
Check Protocol Conformance - Verify support for
DeviceVolumeControlAPI. -
Read the Capability - Use
volumeSetCapabilitybefore showing controls. -
Read Current Values - Use the optional
volumesInfosnapshot. -
Set a Supported Channel - Use a value from
DeviceVolumeTypeand a level from 0 through 100.
VolumeSetCapability reports .none, .common, or .advanced.
-
.nonedoes not expose SDK volume setting. -
.commonsupports system-prompt, media, and in-call volume controls. -
.advancedadditionally exposes local-playback volume in the current snapshot, but the current public SDK does not provide a local-playback write API.
DeviceVolumeType currently includes system prompt, media playback, and in-call volume. Each setter accepts a level from 0 through 100.
Volume Control is accessed through DeviceVolumeControlAPI:
guard let device = device as? DeviceVolumeControlAPI else {
print("Device does not support DeviceVolumeControlAPI")
return
}id<AIBudsDeviceVolumeControlAPI> device =
(id<AIBudsDeviceVolumeControlAPI>)self.device;
if (![device conformsToProtocol:@protocol(AIBudsDeviceVolumeControlAPI)]) {
NSLog(@"Device does not support AIBudsDeviceVolumeControlAPI");
return;
}-
Check Capability: Do not show write controls for
.none. - Validate Levels: Keep explicit values within 0 through 100.
- Debounce Continuous Controls: Avoid sending a command for every intermediate slider event.
-
Observe Changes: Use
didVolumesChangedwhen the UI must track device-side updates.
-
volumesInfois optional and individual values can also be unavailable. - The current SDK can read
localPlaybackVolume, but cannot set it separately. Add that control only after a public write API is introduced. - Hardware controls or other clients can change device volume after a snapshot is read.
AIBuds SDK documentation · Full documentation · API Reference
- Introduction
- Getting Started
- Core Concepts
-
Core Features
- Basic Features
- Device Info
- Find Device
- Physical Operations
- Work Mode
- Work Status
- Wear Detection
- Volume Control
- Music Control
- TWS
- Equalizer
- ANC
- Audio
- Camera
- Remote Camera
- File Import
- Teleprompter
- Segment Navigation
- Live Streaming
- Device Applications
- OTA
- Camera OTA
- Service Auth
- AI Services
- Voice Assistant
- Logging
- Advanced Topics
- Releases
- Troubleshooting