Alexa Auto SDK  2.0.0
Classes | Public Member Functions | List of all members
com.amazon.aace.alexa.AlexaSpeaker Class Referenceabstract

Classes

enum  SpeakerType
 

Public Member Functions

void speakerSettingsChanged (SpeakerType type, boolean local, byte volume, boolean mute)
 
final void localSetVolume (SpeakerType type, byte volume)
 
final void localAdjustVolume (SpeakerType type, byte delta)
 
final void localSetMute (SpeakerType type, boolean mute)
 

Detailed Description

AlexaSpeaker is the interface for setting the Alexa volume and mute controls.

Member Function Documentation

◆ speakerSettingsChanged()

void com.amazon.aace.alexa.AlexaSpeaker.speakerSettingsChanged ( SpeakerType  type,
boolean  local,
byte  volume,
boolean  mute 
)

Notifies the platform implementation that the speaker settings have changed for a specific speaker type.

Note
Calling AlexaSpeaker::localSetVolume, AlexaSpeaker::localAdjustVolume, or AlexaSpeaker::localSetMute from inside this function will cause deadlock.
Parameters
[in]typeThe type of Alexa speaker being set.
[in]localtrue if the change originated from calling AlexaSpeaker::localSetVolume, AlexaSpeaker::localAdjustVolume, or AlexaSpeaker::localSetMute.
[in]volumeThe new volume setting of the Speaker. The volume reported will be scaled to the range [0,100].
[in]muteThe mute setting of the Speaker. true when the Speaker is muted, else false.

◆ localSetVolume()

final void com.amazon.aace.alexa.AlexaSpeaker.localSetVolume ( SpeakerType  type,
byte  volume 
)

Notifies the Engine of a volume change event originating on the platform, such as a user pressing a "volume up" or "volume down" button. If the Speaker is Type::AVS_SPEAKER_VOLUME, the Engine will respond with a call to setVolume() on each AVS-synced Speaker.

Parameters
[in]typeThe type of Alexa speaker being set.
[in]volumeThe new volume setting of the Speaker. The volume reported must be scaled to the range [0,100].

◆ localAdjustVolume()

final void com.amazon.aace.alexa.AlexaSpeaker.localAdjustVolume ( SpeakerType  type,
byte  delta 
)

Notifies the Engine of a relative adjustment to the volume setting of the Speaker, originating on the platform. The delta value is relative to the current volume setting and is positive to increase volume or negative to reduce volume. The volume delta value should be scaled to fit the needs of the platform.

Parameters
[in]typeThe type of Alexa speaker being set.
[in]deltaThe volume adjustment to apply to the Speaker. delta is in the range [-100, 100].

◆ localSetMute()

final void com.amazon.aace.alexa.AlexaSpeaker.localSetMute ( SpeakerType  type,
boolean  mute 
)

Notifies the Engine of a mute setting change event originating on the platform, such as a user pressing a "mute" button. If the Speaker is Type::AVS_SPEAKER_VOLUME, the Engine will respond with a call to setMute() on each AVS-synced Speaker.

Parameters
[in]typeThe type of Alexa speaker being set.
[in]muteThe new mute setting of the Speaker. true when the Speaker is muted, else false

Alexa Auto SDK 2.0.0 - Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0