AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <AndroidSLESSpeaker.h>
Public Member Functions | |
SpeakerInterface methods. | |
bool | setVolume (int8_t volume) override |
bool | setMute (bool mute) override |
bool | getSpeakerSettings (SpeakerSettings *settings) override |
Public Member Functions inherited from alexaClientSDK::avsCommon::sdkInterfaces::SpeakerInterface | |
virtual | ~SpeakerInterface ()=default |
Static Public Member Functions | |
static std::unique_ptr< AndroidSLESSpeaker > | create (std::shared_ptr< applicationUtilities::androidUtilities::AndroidSLESEngine > engine, std::shared_ptr< applicationUtilities::androidUtilities::AndroidSLESObject > outputMixObject, std::shared_ptr< applicationUtilities::androidUtilities::AndroidSLESObject > speakerObject) |
This class implements an android compatible speaker.
The implementation uses Android OpenSL ES to control speaker volume. We assume that OpenSL ES for Android is thread-safe as stated here .
|
static |
Create AndroidSLESSpeaker.
engine | The OpenSL ES engine that the speakerObject depends on. |
outputMixObject | The OpenSL ES output mix that the speakerObject depends on. |
speakerObject | The OpenSL ES object responsible for controlling the speaker output configurations. |
AndroidSLESSpeaker
if successful else nullptr
.
|
overridevirtual |
Return a SpeakerSettings
object to indicate the current settings of the SpeakerInterface.
[out] | settings | A SpeakerSettings object if successful. |
Implements alexaClientSDK::avsCommon::sdkInterfaces::SpeakerInterface.
|
overridevirtual |
Set the mute of the speaker.
mute | Represents whether the speaker should be muted (true) or unmuted (false). |
Implements alexaClientSDK::avsCommon::sdkInterfaces::SpeakerInterface.
|
overridevirtual |
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. |
Implements alexaClientSDK::avsCommon::sdkInterfaces::SpeakerInterface.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0