Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

SDLAudioControlData Class Reference

Section Contents

Overview

Undocumented

-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 (readwrite, strong, nonatomic, 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 (readwrite, strong, nonatomic, 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 (readwrite, strong, nonatomic, 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 (readwrite, strong, nonatomic, nullable)
    NSArray<SDLEqualizerSettings *> *equalizerSettings;

Swift

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