Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
iOS Documentation
SDLAudioControlData

SDLAudioControlData Class Reference

Section Contents

Overview

The audio control data information.

@since RPC 5.0

-initWithSource:keepContext:volume:equalizerSettings:

Constructs a newly allocated SDLAudioControlData object with given parameters

Objective-C

- (nonnull instancetype)initWithSource:(nullable SDLPrimaryAudioSource)source
                           keepContext:(nullable NSNumber<SDLBool> *)keepContext
                                volume:(nullable NSNumber<SDLInt> *)volume
                     equalizerSettings:
                         (nullable NSArray<SDLEqualizerSettings *> *)
                             equalizerSettings;

Swift

init(source: SDLPrimaryAudioSource?, keepContext: (NSNumber & SDLBool)?, volume: (NSNumber & SDLInt)?, equalizerSettings: [SDLEqualizerSettings]?)

Parameters

source

current primary audio source of the system.

keepContext

Whether or not application’s context is changed.

volume

Reflects the volume of audio.

equalizerSettings

list of supported Equalizer channels.

Return Value

An instance of the SDLAudioControlData class.

source

@abstract In a getter response or a notification, it is the current primary audio source of the system. In a setter request, it is the target audio source that the system shall switch to. If the value is MOBILE_APP, the system shall switch to the mobile media app that issues the setter RPC.

Optional, SDLPrimaryAudioSource

Objective-C

@property (nonatomic, strong, nullable) SDLPrimaryAudioSource source;

Swift

var source: SDLPrimaryAudioSource? { get set }

keepContext

@abstract This parameter shall not be present in any getter responses or notifications. This parameter is optional in a setter request. The default value is false. If it is true, the system not only changes the audio source but also brings the default infotainment system UI associated with the audio source to foreground and set the application to background. If it is false, the system changes the audio source, but keeps the current application’s context.

Optional, Boolean

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLBool> *keepContext;

Swift

var keepContext: (NSNumber & SDLBool)? { get set }

volume

@abstract Reflects the volume of audio, from 0%-100%.

Required, Integer 1 - 100

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLInt> *volume;

Swift

var volume: (NSNumber & SDLInt)? { get set }

equalizerSettings

@abstract Defines the list of supported channels (band) and their current/desired settings on HMI

Required, Array of SDLEqualizerSettings with minSize:1 maxSize:100

Objective-C

@property (nonatomic, strong, nullable) NSArray<SDLEqualizerSettings *> *equalizerSettings;

Swift

var equalizerSettings: [SDLEqualizerSettings]? { get set }
View on GitHub.com
Previous Section Next Section