AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <SpeakerInterface.h>
Classes | |
struct | SpeakerSettings |
Public Member Functions | |
virtual bool | setVolume (int8_t volume)=0 |
virtual bool | setMute (bool mute)=0 |
virtual bool | getSpeakerSettings (SpeakerSettings *settings)=0 |
virtual | ~SpeakerInterface ()=default |
The SpeakerInterface is concerned with the control of volume and mute settings of a speaker. The two settings are independent of each other, and the respective APIs shall not affect the other setting in any way. Compound behaviors (such as unmuting when volume is adjusted) will be handled at a layer above this interface.
The methods in this interface MUST be implemented as thread safe implementations.
|
virtualdefault |
Destructor.
|
pure virtual |
Return a SpeakerSettings
object to indicate the current settings of the SpeakerInterface.
[out] | settings | A SpeakerSettings object if successful. |
Implemented in alexaClientSDK::mediaPlayer::MediaPlayer, alexaClientSDK::mediaPlayer::android::AndroidSLESSpeaker, and alexaClientSDK::avsCommon::sdkInterfaces::test::MockSpeaker.
|
pure virtual |
Set the mute of the speaker.
mute | Represents whether the speaker should be muted (true) or unmuted (false). |
Implemented in alexaClientSDK::mediaPlayer::MediaPlayer, alexaClientSDK::mediaPlayer::android::AndroidSLESSpeaker, and alexaClientSDK::avsCommon::sdkInterfaces::test::MockSpeaker.
|
pure virtual |
Set the absolute volume of the speaker. volume
will be [AVS_SET_VOLUME_MIN, AVS_SET_VOLUME_MAX], and implementers of the interface must normalize the volume to fit the needs of their drivers.
volume | A volume to set the speaker to. |
Implemented in alexaClientSDK::mediaPlayer::MediaPlayer, alexaClientSDK::mediaPlayer::android::AndroidSLESSpeaker, and alexaClientSDK::avsCommon::sdkInterfaces::test::MockSpeaker.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0