Work Mode Overview
Welcome to the Work Mode documentation for the AIBuds SDK. This section covers APIs for managing the device's operational mode, such as normal mode and game mode.
Available Features
Get Work Mode
Read the current work mode of an AIBuds device
Getting Started
To work with work modes, follow these steps:
- Connect to Device - Establish a connection with your AIBuds device
- Check Protocol Conformance - Verify the device conforms to
DeviceWorkModeAPIprotocol - Get Current Mode - Read the
workModeproperty - Set Mode - Call
setWorkMode(_:completion:)with aWorkModevalue
Key Concepts
Work Modes
WorkMode defines the following values:
Available modes
Values exposed by WorkMode and their role in mode selection.
3.unknownThe current mode is unavailable or unrecognized. This fallback value cannot be selected.
AIBudsWorkModeUnknown.normalThe device's normal operating mode. Product-specific audio behavior is not defined by the SDK.
AIBudsWorkModeNormal.gameThe device's game mode. Product-specific latency and audio processing are not defined by the SDK.
AIBudsWorkModeGameWorkMode.allCases contains normal and game. Do not pass unknown to setWorkMode.
Protocol Reference
Work mode functionality is accessed through the DeviceWorkModeAPI protocol:
- Swift
- Objective-C
guard let device = device as? DeviceWorkModeAPI else {
print("Device does not support DeviceWorkModeAPI")
return
}id<AIBudsDeviceWorkModeAPI> device = (id<AIBudsDeviceWorkModeAPI>)self.device;
if (![device conformsToProtocol:@protocol(AIBudsDeviceWorkModeAPI)]) {
NSLog(@"Device does not support AIBudsDeviceWorkModeAPI");
return;
}Best Practices
- Check Protocol Conformance: Always verify the device supports the
DeviceWorkModeAPIprotocol - Handle Mode Changes: Implement
device(_:didWorkModeChanged:)when the device delegate should receive updates - Provide Feedback: Inform users when the mode is successfully changed
- Respect User Intent: Change work mode only in response to an appropriate application or user action
Notes
- Not all devices support multiple work modes
- Available modes depend on device capabilities
- The public API does not define device-specific audio or latency effects for a mode